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=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 416A8CA9EB9 for ; Wed, 23 Oct 2019 08:08:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DC4AF21925 for ; Wed, 23 Oct 2019 08:08:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC4AF21925 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 204446B0003; Wed, 23 Oct 2019 04:08:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1B4956B0006; Wed, 23 Oct 2019 04:08:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0CB676B0007; Wed, 23 Oct 2019 04:08:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0038.hostedemail.com [216.40.44.38]) by kanga.kvack.org (Postfix) with ESMTP id DF28F6B0003 for ; Wed, 23 Oct 2019 04:08:27 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 78B453AA7 for ; Wed, 23 Oct 2019 08:08:27 +0000 (UTC) X-FDA: 76074322254.29.son01_f9611d55355d X-HE-Tag: son01_f9611d55355d X-Filterd-Recvd-Size: 2374 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Wed, 23 Oct 2019 08:08:26 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 99998BB64; Wed, 23 Oct 2019 08:08:25 +0000 (UTC) Date: Wed, 23 Oct 2019 10:08:23 +0200 From: Michal Hocko To: Hillf Danton Cc: linux-mm , Andrew Morton , linux-kernel , Chris Down , Tejun Heo , Roman Gushchin , Johannes Weiner , Shakeel Butt , Matthew Wilcox , Minchan Kim , Mel Gorman Subject: Re: [RFC v1] memcg: add memcg lru for page reclaiming Message-ID: <20191023080823.GH754@dhcp22.suse.cz> References: <20191022133050.15620-1-hdanton@sina.com> <20191023044448.16484-1-hdanton@sina.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191023044448.16484-1-hdanton@sina.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Wed 23-10-19 12:44:48, Hillf Danton wrote: > > On Tue, 22 Oct 2019 15:58:32 +0200 Michal Hocko wrote: > > > > On Tue 22-10-19 21:30:50, Hillf Danton wrote: [...] > > > in this RFC after ripping pages off > > > the first victim, the work finishes with the first ancestor of the victim > > > added to lru. > > > > > > Recaliming is defered until kswapd becomes active. > > > > This is a wrong assumption because high limit might be configured way > > before kswapd is woken up. > > This change was introduced because high limit breach looks not like a > serious problem in the absence of memory pressure. Lets do the hard work, > reclaiming one memcg a time up through the hierarchy, when kswapd becomes > active. It also explains the BH introduced. But this goes against the main motivation for the high limit - to throttle. It is not all that important that there is not global memory pressure. The preventive high limit reclaim is there to make sure that the specific memcg is kept in a reasonable containment. -- Michal Hocko SUSE Labs