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.8 required=3.0 tests=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 A1A8BC2D0B1 for ; Thu, 6 Feb 2020 08:57:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6FE5021741 for ; Thu, 6 Feb 2020 08:57:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FE5021741 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 066DE6B0006; Thu, 6 Feb 2020 03:57:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 03D166B0007; Thu, 6 Feb 2020 03:57:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E95106B0008; Thu, 6 Feb 2020 03:57:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id D04546B0006 for ; Thu, 6 Feb 2020 03:57:10 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8671652DD for ; Thu, 6 Feb 2020 08:57:10 +0000 (UTC) X-FDA: 76459097820.14.chain13_3e8885d485432 X-HE-Tag: chain13_3e8885d485432 X-Filterd-Recvd-Size: 3810 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Thu, 6 Feb 2020 08:57:09 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2020 00:57:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,409,1574150400"; d="scan'208";a="404425769" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga005.jf.intel.com with ESMTP; 06 Feb 2020 00:57:07 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 6 Feb 2020 00:57:07 -0800 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 6 Feb 2020 00:57:06 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.126]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.98]) with mapi id 14.03.0439.000; Thu, 6 Feb 2020 16:57:05 +0800 From: "Wang, Wei W" To: David Hildenbrand , "linux-kernel@vger.kernel.org" CC: "linux-mm@kvack.org" , "virtualization@lists.linux-foundation.org" , Tyler Sanderson , "Michael S . Tsirkin" , 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 Thread-Topic: [PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM Thread-Index: AQHV3EIpfQc0Q8o+LUGdBo475Vlup6gN3WAA Date: Thu, 6 Feb 2020 08:57:05 +0000 Message-ID: <286AC319A985734F985F78AFA26841F73E4237B0@shsmsx102.ccr.corp.intel.com> References: <20200205163402.42627-1-david@redhat.com> <20200205163402.42627-4-david@redhat.com> In-Reply-To: <20200205163402.42627-4-david@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thursday, February 6, 2020 12:34 AM, David Hildenbrand wrote: > Commit 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker"= ) > changed the behavior when deflation happens automatically. Instead of > deflating when called by the OOM handler, the shrinker is used. >=20 > However, the balloon is not simply some slab cache that should be shrunk > when under memory pressure. The shrinker does not have a concept of > priorities, so this behavior cannot be configured. >=20 > There was a report that this results in undesired side effects when infla= ting > the balloon to shrink the page cache. [1] > "When inflating the balloon against page cache (i.e. no free memory > remains) vmscan.c will both shrink page cache, but also invoke the > shrinkers -- including the balloon's shrinker. So the balloon > driver allocates memory which requires reclaim, vmscan gets this > memory by shrinking the balloon, and then the driver adds the > memory back to the balloon. Basically a busy no-op." Not sure if we need to go back to OOM, which has many drawbacks as we discu= ssed. Just posted out another approach, which is simple. Best, Wei