Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1486964ybt; Thu, 2 Jul 2020 06:47:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpXpOZlSbkCo/CarAR07zevS7cFaLo8hEOu3r0tNGq2MEM6CJI1HaBxGe9QMMpXApF8JBr X-Received: by 2002:a17:906:384a:: with SMTP id w10mr28765547ejc.235.1593697622912; Thu, 02 Jul 2020 06:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593697622; cv=none; d=google.com; s=arc-20160816; b=0POmD8XWhMKwRpGpnxm2Raj8mMVel0vMnKi8kqvrQzQYUYga6Hj5ueWVLWyp/iyS2k JgPrCsYluUM3bozmEX/SxS6hsGqJepXl0ATc78UXPN07HSVIs5b7eRBo7zTVB3uZEl/f 3ceg3Bn9lGxAEFTPErFtthh/B482fEH0U6LgLhqeMQgDEIJB66HZ9plBm45wasfkZClp AG+r+WMG3fP0rSp3vOc0SjOVfoOqEy7oWyzpM9omDfLRc1/J7BCXo5gnCaP7MLbVAWCi svnWE+seEzrN3o2P8Kyo0GwcHcGb5Z5A3hZgWeXKbympO/QUvKBPsJZZr/8d3+eQmvwn +ChA== 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=XPEJ0BkWPJOQnUIkXbQvycLK+ER8qpHfzwPQc3kfIiQ=; b=v9JLU5WFMhUDxrmTXVMh5fBZAAl5daygvQMdb+9sR0o0gIw+XmcT7FhXGz26GThjLK Q93VBlgcrQ1b073NL3ZEsYzGbceI0kymwP7PHWbfoVJfMkDBb268uTpDdbhcrrljpcsF 50Or0CuKF+pkOqnYmDBBKmzk2gjRNavGaUAM3edYhjOZT8+9FV7ElWGVOg2sXqmnMwSc VoNAhy4PCwhjLcZhZRo425khXxAIm3tj4FVCo0BIhcW7Z+8o28+QX64rb4vSpIMPPE8z T8pawjKqdq0k2bZvf2Mo2+XQoes1iaFwsybaXhTx/BCjDia9ZjR3bQ8XI2mQoexXXb5/ t5jw== 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 l12si5865246ejq.20.2020.07.02.06.46.39; Thu, 02 Jul 2020 06:47:02 -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 S1729402AbgGBNp3 (ORCPT + 99 others); Thu, 2 Jul 2020 09:45:29 -0400 Received: from mx2.suse.de ([195.135.220.15]:45060 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729047AbgGBNp1 (ORCPT ); Thu, 2 Jul 2020 09:45:27 -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 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 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 > > 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; >