Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3826521ybt; Tue, 30 Jun 2020 11:58:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwN0XojzpipEcEfGrayE625D68nb9p+qcU1FHsJUTbmeycRB2vnZPRFrPrKYXRBDyKQ4bbw X-Received: by 2002:a17:906:4c41:: with SMTP id d1mr19804120ejw.463.1593543053482; Tue, 30 Jun 2020 11:50:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593543053; cv=none; d=google.com; s=arc-20160816; b=kCvMbEULS7+ZnfkgIV9GuAu5NW6qCigcYRPbUlv8y5i/5Z1/xK61MR6FtyACzucEsK gJGhPJ0ek/kJFTx6Mw9aG0S+gbbTjs1Kk5q5cWlWSE+ma9wRsKTy8kMFre2R7vHQtnfx GabZ5MDxEOSq/uxOZ/X7R2TVFmy6u/QlnBuU0yjddpYCmDS/FfMy9PFcHqQ+GJfVDdXw axrKyxPa38rWBZu+nts3QDOAKGra2fFErt8cojFRyRzrANnfjlknkURNPMLzS2hVzB3L I3AldCRDIMom+QjOjnV3cR/dmWab7CB+xZXZZiiS9Hv8/r2VCMlZWmxlDkqPLjCwg9b1 yyKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=eE6awXinoIeWEluBEWJNssKdnxDnszSh6rP5TVPiphA=; b=0HAAz1igGIjZY7y21p6xml2ENLmCbRciAM3dy/NgfKNOFIq7jKOP4BkfSTp1vkH01O v4pnRKsIY2/Gak9H2jAZtK4PxK4lOQ257doAIggx/Seb8ckq7p08fKYQ2/dO4iUXrP6E GgYJM5f4jB+FdNSfYRq4JV+pQPzPHKrvXEq3VVsLhfCH3AG3I7BfO3c5vUpaCVZvvVK1 ADg9gdDJJ8Tyhcj7wF3Xtcul5HOATjf1Dfj+tWidqLY3b/5OFh9Uh1Lkic8XIr8C/G03 IVLCSuNxRVFcYrTTHNASL64qF0qhRgqZmkFNptmEXHlZkuw42Ajx8T/6CI9SQ0eFIy6y MPoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si2218610eje.437.2020.06.30.11.50.30; Tue, 30 Jun 2020 11:50:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733219AbgF3R1o (ORCPT + 99 others); Tue, 30 Jun 2020 13:27:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:36356 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725872AbgF3R1n (ORCPT ); Tue, 30 Jun 2020 13:27:43 -0400 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; >