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, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 4A989C433DF for ; Tue, 30 Jun 2020 17:27:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E65A720723 for ; Tue, 30 Jun 2020 17:27:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E65A720723 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 294FE6B0005; Tue, 30 Jun 2020 13:27:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 21E666B0008; Tue, 30 Jun 2020 13:27:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0BFAD6B000A; Tue, 30 Jun 2020 13:27:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0079.hostedemail.com [216.40.44.79]) by kanga.kvack.org (Postfix) with ESMTP id E758B6B0005 for ; Tue, 30 Jun 2020 13:27:44 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 49AAF180AD80F for ; Tue, 30 Jun 2020 17:27:44 +0000 (UTC) X-FDA: 76986560448.24.cook76_5a0fbf326e79 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 1B62F1A4A5 for ; Tue, 30 Jun 2020 17:27:44 +0000 (UTC) X-HE-Tag: cook76_5a0fbf326e79 X-Filterd-Recvd-Size: 3614 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Tue, 30 Jun 2020 17:27:43 +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 1BF59AE2D; Tue, 30 Jun 2020 17:27:42 +0000 (UTC) Subject: Re: [PATCH v6 1/6] mm/vmscan: make active/inactive ratio as 1:1 for anon 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 References: <1592371583-30672-1-git-send-email-iamjoonsoo.kim@lge.com> <1592371583-30672-2-git-send-email-iamjoonsoo.kim@lge.com> From: Vlastimil Babka Message-ID: <7a5c8298-a1e5-93f9-eea6-214b0732ca33@suse.cz> Date: Tue, 30 Jun 2020 19:27:38 +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-2-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: 1B62F1A4A5 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, 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 > > Current implementation of LRU management for anonymous page has some > problems. Most important one is that it doesn't protect the workingset, > that is, pages on the active LRU list. Although, this problem will be > fixed in the following patchset, the preparation is required and > this patch does it. > > What following patchset does is to restore workingset protection. In this "Restore" sounds as if the protection used to be there and then it was removed. If it's the case, it should be said what commit did that. Otherwise I would say "implement", not "restore"? > case, newly created or swap-in pages are started their lifetime on the I would rephrase it: "After the following patch, newly created or swap-in pages will start their lifetime... " > inactive list. If inactive list is too small, there is not enough chance > to be referenced and the page cannot become the workingset. > > In order to provide enough chance to the newly anonymous pages, this patch "In order to provide the newly anonymous pages enough chance to be referenced again..." > makes active/inactive LRU ratio as 1:1. Here I would add: This is just a temporary measure. Later patch in the series introduces workingset detection for anonymous LRU that will be used to better decide if pages should start on the active and inactive list. Afterwards this patch is effectively reverted. > Acked-by: Johannes Weiner > Signed-off-by: Joonsoo Kim Acked-by: Vlastimil Babka > --- > mm/vmscan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index 749d239..9f940c4 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -2212,7 +2212,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) > + if (gb && is_file_lru(inactive_lru)) > inactive_ratio = int_sqrt(10 * gb); > else > inactive_ratio = 1; >