From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCBF9C10F27 for ; Mon, 9 Mar 2020 10:24:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9F30720828 for ; Mon, 9 Mar 2020 10:24:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JwsTKFnI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F30720828 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 510766B0006; Mon, 9 Mar 2020 06:24:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4C0F66B0007; Mon, 9 Mar 2020 06:24:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36A6A6B0008; Mon, 9 Mar 2020 06:24:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0249.hostedemail.com [216.40.44.249]) by kanga.kvack.org (Postfix) with ESMTP id 1B6A36B0006 for ; Mon, 9 Mar 2020 06:24:34 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B9DD11EE6 for ; Mon, 9 Mar 2020 10:24:33 +0000 (UTC) X-FDA: 76575439626.04.knot13_44e1ffbdcd704 X-HE-Tag: knot13_44e1ffbdcd704 X-Filterd-Recvd-Size: 6008 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Mon, 9 Mar 2020 10:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583749472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qt8SWsO5MfUSglcNPYsDEnv+qEAfPK1Y3vD/3LYmWcs=; b=JwsTKFnIxKUd7eiY9mzCmvIOZ47y05QO2FBQCcLmcUdlintO1PZ0bUgl9M7z0hmnshWZYV D297XZicsBHrAO7zVOKvuMNhr9cWf3OORTOlwtPNAL6CKgIDzG2wyLPkwJWNDyd6aOgwAG IUnVatSMaFVpqmB18qkdkDzcWVH1fFE= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-423-WeDSYsNuNZm-wmWbk0DYNw-1; Mon, 09 Mar 2020 06:24:31 -0400 X-MC-Unique: WeDSYsNuNZm-wmWbk0DYNw-1 Received: by mail-qt1-f198.google.com with SMTP id o10so6419577qtk.22 for ; Mon, 09 Mar 2020 03:24:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dvgDdAy0zWidzBgy80Pgtcr4prXz51m6ojJnNdb1JlQ=; b=gO9CBRTfGDkmfqAmgqszHaM6LwzV9tfoIzpoHhft/T00p60JJr4sa0puaYgpIjS8Gf xkgg51MysSv2sCJXGLZ198QqJp2FYzrm0PW0X9Q4iLWPjLGMQxsIR28uOET9ynxVOfXT jqQKsMclmwn0IAyVSFtEukI4kwyvArvqZ5hxpfu8CoRuaXEs6gBge0NoDf87ZcCYhLGe to8rDGFgHZ048Aj6jvgUUnR6w8D3e9hkUZjeEMdP4y+TXofQAqd1YWacrK2mg7TYU4Mr Ja5mJIWPltvdjkfdO5sooXWzAIeWesh8pIqd/o/HA0JeLjvXothrxBKskFa8W7Vv9Dsq 6cfw== X-Gm-Message-State: ANhLgQ3PqYCEeY9KtEwLN2mSPHkexPRcpRpx6esnzhOFQHHKpXwnYIPx 9Rwu6vC9zYle9LOCfY8bieUGHHViAJajIsTQIrEET1XaSmSPThSrvg6kqDIUFXIY647CswibwQa BTHIXuFQQshg= X-Received: by 2002:a0c:b757:: with SMTP id q23mr13919342qve.213.1583749470560; Mon, 09 Mar 2020 03:24:30 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs94BstrUypTvkiq+ZB1SWuvp4PA0n76GPDFRgcGKLKhcm6kiXzdCnIcquLiXGnqsLFDRSIzg== X-Received: by 2002:a0c:b757:: with SMTP id q23mr13919333qve.213.1583749470343; Mon, 09 Mar 2020 03:24:30 -0700 (PDT) Received: from redhat.com (bzq-79-178-2-19.red.bezeqint.net. [79.178.2.19]) by smtp.gmail.com with ESMTPSA id n5sm21958459qkk.121.2020.03.09.03.24.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 03:24:29 -0700 (PDT) Date: Mon, 9 Mar 2020 06:24:24 -0400 From: "Michael S. Tsirkin" To: Tyler Sanderson Cc: David Hildenbrand , linux-kernel@vger.kernel.org, linux-mm@kvack.org, virtualization@lists.linux-foundation.org, Wei Wang , Alexander Duyck , David Rientjes , Nadav Amit , Michal Hocko Subject: Re: [PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM Message-ID: <20200309062311-mutt-send-email-mst@kernel.org> References: <20200205163402.42627-1-david@redhat.com> <20200205163402.42627-4-david@redhat.com> <20200216044641-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Bogosity: Ham, tests=bogofilter, spamicity=0.000108, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Mar 07, 2020 at 08:47:25PM -0800, Tyler Sanderson wrote: > Tested-by: Tyler Sanderson >=20 > Test setup: VM with 16 CPU, 64GB RAM. Running Debian 10. We have a 42 > GB file full of random bytes that we continually cat to /dev/null. > This fills the page cache as the file is read. Meanwhile we trigger > the balloon to inflate, with a target size of 53 GB. This setup causes > the balloon inflation to pressure the page cache as the page cache is > also trying to grow. Afterwards we shrink the balloon back to zero (so > total deflate =3D total inflate). >=20 > Without patch (kernel 4.19.0-5): > Inflation never reaches the target until we stop the "cat file > > /dev/null" process. Total inflation time was 542 seconds. The longest > period that made no net forward progress was 315 seconds (see attached > graph). > Result of "grep balloon /proc/vmstat" after the test: > balloon_inflate 154828377 > balloon_deflate 154828377 >=20 > With patch (kernel 5.6.0-rc4+): > Total inflation duration was 63 seconds. No deflate-queue activity > occurs when pressuring the page-cache. > Result of "grep balloon /proc/vmstat" after the test: > balloon_inflate 12968539 > balloon_deflate 12968539 >=20 > Conclusion: This patch fixes the issue. In the test it reduced > inflate/deflate activity by 12x, and reduced inflation time by 8.6x. > But more importantly, if we hadn't killed the "grep balloon > /proc/vmstat" process then, without the patch, the inflation process > would never reach the target. >=20 > Attached is a png of a graph showing the problematic behavior without > this patch. It shows deflate-queue activity increasing linearly while > balloon size stays constant over the course of more than 8 minutes of > the test. OK this is now queued for -next. Tyler thanks a lot for the detailed test report - it's really awesome! I included it in the commit log in full so that if we need to come back to this it's easy to reproduce the testing. --=20 MST