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 6E260C3F2D1 for ; Mon, 9 Mar 2020 10:15:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3284520873 for ; Mon, 9 Mar 2020 10:15:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Wk3X+l+2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3284520873 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 ABC876B0003; Mon, 9 Mar 2020 06:15:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A6D3A6B0006; Mon, 9 Mar 2020 06:15:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 95C116B0007; Mon, 9 Mar 2020 06:15:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id 7C1896B0003 for ; Mon, 9 Mar 2020 06:15:05 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 298268248047 for ; Mon, 9 Mar 2020 10:15:05 +0000 (UTC) X-FDA: 76575415770.12.boys36_83a5690da800e X-HE-Tag: boys36_83a5690da800e X-Filterd-Recvd-Size: 6159 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Mon, 9 Mar 2020 10:15:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583748904; 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=cmSk7uS4sK6vz8mp9dXydlh8p01gf9je3f5KyOyW32Q=; b=Wk3X+l+2rpNQwnaz001iyPWWquYlYGSbvSkzjwi1Sal9MVtML69Ln3dTElA6r59ljyJ9Jq 7bOYiczMQ74QSVsctqcinr8TGVNxIyHLiJ1MuGV2wBDUL4Iyh/oQHPAmOrjJU4O/XVtjXW ltwbIZI/W7Cm4ocpiCMDt/Ex/MUoC5M= 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-383-bZT2l2ibNo-jZFi54CJYPA-1; Mon, 09 Mar 2020 06:15:02 -0400 X-MC-Unique: bZT2l2ibNo-jZFi54CJYPA-1 Received: by mail-qt1-f198.google.com with SMTP id d6so3640737qtn.2 for ; Mon, 09 Mar 2020 03:15:02 -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=77GwOo3dJvMMY5EsUFtosa5OLtVohxUzfDzSlHPcPtQ=; b=CnMvuDmYq0FePjrpeO0+kBKW9fJm0DeSJsvtmvuXWIbl4g7tXPEPw3YvO2YFnu66Rs JVtHSdjF70f6aqYawpNqVk1cLBl3hQWZpvZoP9oa9xnyqHjcfKS/u0X4i8tyZctiPml6 oATTVqbPHT++J6iXfC85xxmK0Uw2hdt0FXMn/THeVbQSHMrd5ravfrEpTHSUZKUozvmG RLm9HxKrtNo2uO3iKqgPJO0SVUoRCRks57FPAn3bTpi76g5mzXDTZjRPj9hEfJ+PvrYO pPh0QqKogH6bpigWbpuUWB3T8147tDhu+xl9hkNOxwpxeVuxeGwqgzWaTZYN/mWZwZ/n hvog== X-Gm-Message-State: ANhLgQ3ywYU7C9IA8a8jfKIg4HbkjKWsdm/mh7f+cqoQP53HgQkOHsQR kA4wawbvq6D/B7ys3GzLLwkoOhb+4gl3mlB1uv6xPV4BEubFO3erUmNRGi1befMSWhZeSjH+Doh sEtFlwiHoBmQ= X-Received: by 2002:a05:620a:45:: with SMTP id t5mr14504897qkt.183.1583748901946; Mon, 09 Mar 2020 03:15:01 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtfD5xstQ+O6d+qn8lUbNErH2WtviwPZFrpi5EEEd3e9u07levRrO15iYSkAMgTmNP7vp20Mw== X-Received: by 2002:a05:620a:45:: with SMTP id t5mr14504877qkt.183.1583748901718; Mon, 09 Mar 2020 03:15:01 -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 184sm5164615qkh.63.2020.03.09.03.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 03:15:00 -0700 (PDT) Date: Mon, 9 Mar 2020 06:14:55 -0400 From: "Michael S. Tsirkin" To: David Hildenbrand Cc: Tyler Sanderson , 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: <20200309061403-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> <86453fed-1f39-dfcc-33c6-54241478e2ab@redhat.com> MIME-Version: 1.0 In-Reply-To: <86453fed-1f39-dfcc-33c6-54241478e2ab@redhat.com> 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.000256, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Mar 09, 2020 at 10:03:14AM +0100, David Hildenbrand wrote: > On 08.03.20 05:47, 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. >=20 > Thanks a lot for the extended test! Given we shipped this for a long time, I think the best way to make progress is to merge 1/3, 2/3 right now, and 3/3 in the next release. > --=20 > Thanks, >=20 > David / dhildenb