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=-4.0 required=3.0 tests=BAYES_00, 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 0B6D9C433E0 for ; Mon, 3 Aug 2020 14:37:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C8DCF2076E for ; Mon, 3 Aug 2020 14:37:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C8DCF2076E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 56BFC8D0102; Mon, 3 Aug 2020 10:37:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 51C548D0081; Mon, 3 Aug 2020 10:37:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4324D8D0102; Mon, 3 Aug 2020 10:37:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0111.hostedemail.com [216.40.44.111]) by kanga.kvack.org (Postfix) with ESMTP id 2F18D8D0081 for ; Mon, 3 Aug 2020 10:37:13 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8DF2D180AD802 for ; Mon, 3 Aug 2020 14:37:12 +0000 (UTC) X-FDA: 77109509904.26.songs19_2d09cf326f9e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 357991804B654 for ; Mon, 3 Aug 2020 14:37:12 +0000 (UTC) X-HE-Tag: songs19_2d09cf326f9e X-Filterd-Recvd-Size: 2150 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Mon, 3 Aug 2020 14:37:11 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 08AE3AE87; Mon, 3 Aug 2020 14:37:26 +0000 (UTC) Date: Mon, 3 Aug 2020 16:37:10 +0200 From: Michal Hocko To: Yafang Shao Cc: longman@redhat.com, Johannes Weiner , Andrew Morton , Linux MM Subject: Re: [PATCH] mm, memcg: do full scan initially in force_empty Message-ID: <20200803143710.GS5174@dhcp22.suse.cz> References: <20200728074032.1555-1-laoar.shao@gmail.com> <20200730112620.GH18727@dhcp22.suse.cz> <20200803101226.GH5174@dhcp22.suse.cz> <20200803135636.GN5174@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 357991804B654 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 Mon 03-08-20 22:26:10, Yafang Shao wrote: > On Mon, Aug 3, 2020 at 10:18 PM Yafang Shao wrote: [...] > > You can use memcg limits (e.g. memory high) to pro-actively reclaim > > excess memory. Have you tried that? > > The memcg limit not only reclaim the slabs, but also reclaim the pagecaches. True but drop_cache doesn't distinguish different kind of objects either. The reclaim will simply try to drop unused cache. All or nothing behavior of drop_caches is exactly what I dislike about the interface. Memory reclaim can at least consider age and reflect the general usage pattern. > Furthermore, there is no per-memcg vm.vfs_cache_pressure neither. Why does that matter? -- Michal Hocko SUSE Labs