Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2311572ybh; Mon, 9 Mar 2020 03:25:17 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs8EXE43beOSCmyQsefBJrYjIG3zlRGBrHq/2NJU7wYCpCxgq7+k3q4c4SwgyEIVEeCoXW6 X-Received: by 2002:aca:a98a:: with SMTP id s132mr3356160oie.75.1583749517328; Mon, 09 Mar 2020 03:25:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583749517; cv=none; d=google.com; s=arc-20160816; b=OPSd/M4S9CbfOHkMPznVgx5+FW5a49edLsqAp5sca9pQZPRuO4dEr0utxUg1Fen4D7 5DQWC2t2O7FwZj/AROTQS5mGq5EUYdIaxVON5bwuKHAJHxbDEaRzJMeSRV6T31evHBT0 iyijTy00XrHE4mWxvIQIkKl16yPmF6EGGe2wd9R5mV2YoBPN5rY3fqgYQ6ddjevEiOAR rCPXmgDo2MFCKX6sba6OF0b+KFWCEpRUTLePWtDksVxAP20Ajv0A00cHvDBiRsunnoPu Cs6ewsJUH2wrx+V8i4RKqfN4pTUxvD46M5zyI1rQZwk3AzAw84O15KzT6q2ViQ9A98Py 9l5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=dvgDdAy0zWidzBgy80Pgtcr4prXz51m6ojJnNdb1JlQ=; b=mWYdPAFSupSBzjOdrHkTW/VJKHIbauCfndu0EOiaTMAEyRAEzWeiFcBsEwIYclks2k e7vXHiyEaqqiTuBDduOKYfmaIHHuP4/oILZSDKvX64htdLytuXoPQ+hV4edWndeYGcqM R5V7IqtuSHx4zs2KD2YPpSIgSv+6f4Dz1MIgBUu4QZXuBpy3lsKrf7l2a/lmp30LXq2K yc2mJ82D9cMxiAvQWpQhDGKMCOCauNwtL5oPW4SW92ZZFkkdsclsXQuDdGNV2fdj2W6g hkrMAotdm2/LHEY3aU8R6qQ4T4A4EDLHWLvCAht+QYuedNOmokdjDjjMgAAGP/SSpp+C bIHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bOxiuZjY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10si2485210oto.202.2020.03.09.03.25.06; Mon, 09 Mar 2020 03:25:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bOxiuZjY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726617AbgCIKYe (ORCPT + 99 others); Mon, 9 Mar 2020 06:24:34 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:24509 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725956AbgCIKYe (ORCPT ); Mon, 9 Mar 2020 06:24:34 -0400 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: in-reply-to:in-reply-to:references:references; bh=dvgDdAy0zWidzBgy80Pgtcr4prXz51m6ojJnNdb1JlQ=; b=bOxiuZjY3jCGfxHUDKSLlmpz77PhK5OUOcXTZ1q8J2RJq0ITB+/DKbcOC4LKClZm3yY7XV BpI0+8qxzWSc+MKK0KsuJFjub/9gDtqU1Qp5hPdUtkfh4LRiWUPjgE5T7mR50K1zA/tbqp fi6gh+jFQ823mT5mYQdJftA8gWh7PoU= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-337-0suY0zmYMBynPKWlNGyeuA-1; Mon, 09 Mar 2020 06:24:31 -0400 X-MC-Unique: 0suY0zmYMBynPKWlNGyeuA-1 Received: by mail-qk1-f197.google.com with SMTP id l27so6964211qkl.0 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=ZXLMjC+sq9ZlAXX21UkDXBCH2TwQ6Yrwbi0rCYVZXsEjY54gqkvrgSF7xaM6uu07ic mCH+3unfK0KgI/fQeasgOPEMg2yIKrgINxH8SAzXPcwHW5PleVSlcEfBuqKgXdKgNUJ3 qhFrn+TvRbvb0w0G7XCh5t7fIr/i1XP2XRxoFREhqn7QhFJ6SJaDjsbPoLLG1cM+NS7l /im/wQc14hvOw629ORHPFKDMyl5NymbfNJxXcnzGki/QkvjN4jMKmDW6xet7kq6vGt7R KNy+yVQbKMfEMoSASdlte0u1oco1CNDacR5CaK9dKjj+900jC9bY3smzyPzvF56VZ+jK 7S+Q== X-Gm-Message-State: ANhLgQ0+LTJoTEI85D+1zIgL6isl7NJW5+d0o5YkuU8LiNtwVe+T+DPR 1wGm6l4D9ymkfxiUtAHCh4K1YyGqbUbW9tfw8wgPbqK76NsQX2or5HVjX1VfMi/9O09AKruQgdC 6267qxDGwPy5ZiJNp01NB5HsJ X-Received: by 2002:a0c:b757:: with SMTP id q23mr13919346qve.213.1583749470560; Mon, 09 Mar 2020 03:24:30 -0700 (PDT) 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 07, 2020 at 08:47:25PM -0800, Tyler Sanderson wrote: > Tested-by: Tyler Sanderson > > 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 = total inflate). > > 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 > > 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 > > 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. > > 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. -- MST