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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 8CEFDC433DF for ; Wed, 14 Oct 2020 14:47:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C3091212CC for ; Wed, 14 Oct 2020 14:47:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=suse.com header.i=@suse.com header.b="D1h4MCa0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3091212CC Authentication-Results: mail.kernel.org; dmarc=fail (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 232616B005D; Wed, 14 Oct 2020 10:47:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1E3E5900002; Wed, 14 Oct 2020 10:47:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 121256B0068; Wed, 14 Oct 2020 10:47:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0073.hostedemail.com [216.40.44.73]) by kanga.kvack.org (Postfix) with ESMTP id D9EE86B005D for ; Wed, 14 Oct 2020 10:47:46 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id EBB6E3629 for ; Wed, 14 Oct 2020 14:47:45 +0000 (UTC) X-FDA: 77370810132.03.fang57_63150e52720c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id AB3BE28A24B for ; Wed, 14 Oct 2020 14:47:45 +0000 (UTC) X-HE-Tag: fang57_63150e52720c X-Filterd-Recvd-Size: 4341 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Wed, 14 Oct 2020 14:47:44 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1602686863; 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=d0xfzK/P5eLinDBy3ga78A8Ls66NBJ6oWjZAU7/Nwuw=; b=D1h4MCa079bmcaaQEhwlP7Xne05Xz5IXDY8oml7BPa7aeAUTyTGnw8bLe9w7b+Q8u1vCNc C3TKa/SZuQAAU0PsyLCYq+662La4u4U15d0InCrVCOsZppzNvN+5A3/vwEobuaqcY75llv +ONFXfadjP7hxUpo2kLFYY+vWvrAWfY= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id BA1D4AC4C; Wed, 14 Oct 2020 14:47:43 +0000 (UTC) Date: Wed, 14 Oct 2020 16:47:42 +0200 From: Michal Hocko To: zhong jiang Cc: hannes@cmpxchg.org, akpm@linux-foundation.org, linux-mm@kvack.org Subject: Re: [PATCH] mm: Do not deactivate when the cgroup has plenty inactive page Message-ID: <20201014144742.GH4440@dhcp22.suse.cz> References: <1601034552-95831-1-git-send-email-zhongjiang-ali@linux.alibaba.com> <20200925120758.GF3389@dhcp22.suse.cz> <20200929160207.GK2277@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.003991, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed 14-10-20 22:21:58, zhong jiang wrote: >=20 > On 2020/9/30 12:02 =E4=B8=8A=E5=8D=88, Michal Hocko wrote: > > On Sun 27-09-20 10:39:22, zhong jiang wrote: > > > On 2020/9/25 8:07 =E4=B8=8B=E5=8D=88, Michal Hocko wrote: > > > > On Fri 25-09-20 19:49:12, zhongjiang-ali wrote: > > > > > After appling the series patches(mm: fix page aging across mult= iple cgroups), > > > > > cgroup memory reclaim strategy is based on reclaim root's inact= ive:active > > > > > ratio. if the target lruvec need to deactivate, its children cg= roup also will > > > > > deactivate. That will result in hot page to be reclaimed and ot= her cgroup's > > > > > cold page will be left, which is not expected. > > > > >=20 > > > > > The patch will not force deactivate when inactive_is_low is not= true unless > > > > > we has scanned the inactive list and memory is unable to reclai= m. > > > > Do you have any data to present? > > > I write an testcase that cgroup B has a lot of hot pagecache and cg= roup C > > > is full of cold pagecache.=C2=A0 and > > >=20 > > > their parent cgroup A will trigger the reclaim due of it's limit ha= s been > > > breached. > > >=20 > > >=20 > > > The testcase should assume that we should not reclaim the=C2=A0 hot= pagecache in > > > cgroup B because C has > > >=20 > > > plenty cold pagecache.=C2=A0=C2=A0 Unfortunately,=C2=A0 I can see c= group B hot pagecache > > > has been decreased when > > >=20 > > > cgroup A trigger the reclaim. > > Thank you, this is more or less what've expected from your initial > > description. An extended form would be preferable for the changelog t= o > > make the setup more clear. But you still haven't quantified the effec= t. > > It would be also good to describe what is the effect on the workload > > described by 53138cea7f39 ("mm: vmscan: move file exhaustion detectio= n > > to the node level"). A more extended description on the implementatio= n > > would be nice as well. >=20 > Hi,=C2=A0 Michal >=20 > I'm sorry for lately reply due of a long vacation.=C2=A0 But that indee= d breach > the initial purpose. >=20 > Do you think the patch make sense, or any benchmark can be recommended = to > get some data. To be honest I have really hard time to grasp what is the effect of this patch. Also memory reclaim tuning without any data doesn't really sound convincing. Do you see any real workload that is benefiting from this change or this is mostly a based on reading the code and a theoretical concern? Please understand that the existing balancing is quite complex and any changes should be carfully analyzed and described. --=20 Michal Hocko SUSE Labs