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=-8.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham 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 BB5FCC433DF for ; Thu, 2 Jul 2020 13:45:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 89D9D2068F for ; Thu, 2 Jul 2020 13:45:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89D9D2068F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1C0698D0002; Thu, 2 Jul 2020 09:45:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 172386B0008; Thu, 2 Jul 2020 09:45:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0376A8D0002; Thu, 2 Jul 2020 09:45:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0250.hostedemail.com [216.40.44.250]) by kanga.kvack.org (Postfix) with ESMTP id E308B6B0002 for ; Thu, 2 Jul 2020 09:45:28 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5FA4A2C8B for ; Thu, 2 Jul 2020 13:45:28 +0000 (UTC) X-FDA: 76993257936.09.bun73_4b0c7bb26e89 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 31BFC180AD81A for ; Thu, 2 Jul 2020 13:45:28 +0000 (UTC) X-HE-Tag: bun73_4b0c7bb26e89 X-Filterd-Recvd-Size: 3029 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Thu, 2 Jul 2020 13:45:27 +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 1EAA1AD88; Thu, 2 Jul 2020 13:45:26 +0000 (UTC) Subject: Re: [PATCH v6 6/6] mm/vmscan: restore active/inactive ratio for anonymous LRU To: js1304@gmail.com, Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Johannes Weiner , Michal Hocko , Hugh Dickins , Minchan Kim , Mel Gorman , kernel-team@lge.com, Joonsoo Kim , Matthew Wilcox References: <1592371583-30672-1-git-send-email-iamjoonsoo.kim@lge.com> <1592371583-30672-7-git-send-email-iamjoonsoo.kim@lge.com> From: Vlastimil Babka Message-ID: Date: Thu, 2 Jul 2020 15:45:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <1592371583-30672-7-git-send-email-iamjoonsoo.kim@lge.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 31BFC180AD81A X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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 6/17/20 7:26 AM, js1304@gmail.com wrote: > From: Joonsoo Kim > > Now, workingset detection is implemented for anonymous LRU. > We don't have to worry about the misfound for workingset due to > the ratio of active/inactive. Let's restore the ratio. How about: Now that workingset detection is implemented for anonymous LRU, we don't need large inactive list to allow detecting frequently accessed pages before they are reclaimed, anymore. This effectively reverts the temporary measure put in by commit "mm/vmscan: make active/inactive ratio as 1:1 for anon lru". > Acked-by: Johannes Weiner > Signed-off-by: Joonsoo Kim Acked-by: Vlastimil Babka Thanks! I still hope Matthew can review updated patch 4/6 (I'm not really familiar with proper xarray handling), and Johannes patch 5/6. And then we just need a nice Documentation file describing how reclaim really works after all the recent changes :) Vlastimil > --- > mm/vmscan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index eb02d18..ec77691 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -2211,7 +2211,7 @@ static bool inactive_is_low(struct lruvec *lruvec, enum lru_list inactive_lru) > active = lruvec_page_state(lruvec, NR_LRU_BASE + active_lru); > > gb = (inactive + active) >> (30 - PAGE_SHIFT); > - if (gb && is_file_lru(inactive_lru)) > + if (gb) > inactive_ratio = int_sqrt(10 * gb); > else > inactive_ratio = 1; >