Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4602759ybv; Mon, 10 Feb 2020 23:28:33 -0800 (PST) X-Google-Smtp-Source: APXvYqx7XP5TaD06Etb2Nmva/FVW+HkyGBFmHQDhUzodOOogM3vNI+ftIMcMpEaFDfLor51HSQEE X-Received: by 2002:aca:5106:: with SMTP id f6mr1964408oib.112.1581406113425; Mon, 10 Feb 2020 23:28:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581406113; cv=none; d=google.com; s=arc-20160816; b=ncaoTEmJf6feYn+am4dQn12IDlMSiQaFoisKyJg+uHmOWtUOC0D+t0VQPI+8ddcTvN PDgKqPsQv9InitcHLAGzRTNgANKdtv+XtFPsCggXA/lm5J47uk7zI6FNxF9uEfPIDXqg 2vLwKuk96m0U4RUqSwgaKOLmtTho5TkZYb//zJ3x5T72rGOcKd/+NRIEKrn5CeqfGuVu 43hILZIxl3DKonAccS2ev3jxl8+haGKRUFnJa6C2r5FVvnIfP5ALBOUEReuFyIbiFXPe 2oIgeKp0Z3RsaSF+sPo3967fk2b5r7qrOvHWE1WrS+m4kBEKQ3sMhJZppHmSZmApeWWh 5jbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=hUsW4h0Q2Yi32kJtCDyUXPnl4z2/9q9YG773fr2bDbk=; b=auNx66aI7aCMNGq9LtLOFcMKc2MdIl1MI8XkUAeMEGqdxCVo7UQVHo55p/TDmDfPEd H0VdDxQSu7hwlTxug1+EpwYXYLfTACLGhR+8f7d9Usv2bfHOwveZvNRHAaJ4f9G6Cfgp LY1KnlcH3TDYSgKX+vJOuhOpEL+YXYdELiTKd785w/5ZJTcZ7kjjRtip9fF/Ir3GzemK 1VXuUCOKPxlaxARq33W171sXDAD6c/bhD9YFnorMXF41lErR5tF1gRItiXTl8tEp7PnL +3bI9L6TbkY1ODrhFUk11JM6x7gmS74FBbfvvz943J2tYxZT/9WJI9Cxb+RjB5eAoTui a1Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mY1euNlO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w187si1414203oif.94.2020.02.10.23.28.21; Mon, 10 Feb 2020 23:28:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mY1euNlO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728337AbgBKGUg (ORCPT + 99 others); Tue, 11 Feb 2020 01:20:36 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:39944 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727938AbgBKGUf (ORCPT ); Tue, 11 Feb 2020 01:20:35 -0500 Received: by mail-pg1-f194.google.com with SMTP id z7so5157787pgk.7 for ; Mon, 10 Feb 2020 22:20:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hUsW4h0Q2Yi32kJtCDyUXPnl4z2/9q9YG773fr2bDbk=; b=mY1euNlOdCA2C6rfWChJVGDCpurwr/b+T7/UB0h6nIHFYoz71noGGGSGS29ZkpzL2I TVP8L96ffUqVW62xSZL0EkG3nN3QucnMY+9uLzlcIgG8qwC1w44yhCm6QzYVo9tcSOKA Z2Nt9zie6BA+MiOtky5RKTkOxWjd4/Zka+MzcvKNxpDRNBLvZCBKr6q9uwvjvUtaM7ng T1nerxeZjHRGYegeaSdyV9lv/HFnB/mkNU61rAo09yDTsQVbERs9C7ay+mXwtZFMwlcf Evjl4AKaTAsu+W6tVrMehcF/8DUc92pQv9nEZODLDMxcLNq8EPPUEpLROvtK0xswy764 EbAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hUsW4h0Q2Yi32kJtCDyUXPnl4z2/9q9YG773fr2bDbk=; b=dWJ4WOFmJUCJx63z6uDoMgflGe5Oarr/uWTppLGqXrlamkqWHSdFRBANg3GQeHQamn oEVZ7m2Jzy+J/ZeAek9w79MolNjG0XTQYh6gyCMvx/p2Mxvq84CQkUw5hDIrezXKL4l7 xvdtepPBkMbD4xpLcvcWadQyK0biqopCUjdJYL/75EedGce3ygQRZgNRo9K6hOwW7EaB 3w1nnb/ia/LycstP7E3bmCoqUOK9aFwRoDYvldO+eE0KMv8HJw5SLlIp98HCJXrSKAlD 280oB8TcSqdkFFjI+tFsu1uIRiVifdrSghhNz/x2+tVUS1pVX7tcemzbSrU3vw7pXlwp jJAA== X-Gm-Message-State: APjAAAUUriIMhGGBRysdoQWxlGs430v/Oin5NgY6ikcMv7JS56mOEZcT RkA+tuOd3bD1CYpi8f/n1N12azuWrtI= X-Received: by 2002:aa7:8b17:: with SMTP id f23mr1737594pfd.197.1581402035048; Mon, 10 Feb 2020 22:20:35 -0800 (PST) Received: from localhost.localdomain ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id x197sm2578696pfc.1.2020.02.10.22.20.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Feb 2020 22:20:34 -0800 (PST) From: js1304@gmail.com X-Google-Original-From: iamjoonsoo.kim@lge.com To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Johannes Weiner , Michal Hocko , Hugh Dickins , Minchan Kim , Vlastimil Babka , Mel Gorman , kernel-team@lge.com, Joonsoo Kim Subject: [PATCH 8/9] mm/vmscan: restore active/inactive ratio for anonymous LRU Date: Tue, 11 Feb 2020 15:19:52 +0900 Message-Id: <1581401993-20041-9-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581401993-20041-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1581401993-20041-1-git-send-email-iamjoonsoo.kim@lge.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Joonsoo Kim --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index a1892e7..81ff725 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2237,7 +2237,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; -- 2.7.4