Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3368530ybb; Sun, 22 Mar 2020 22:55:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vttOguM6pogP0PuF/ezL11BWSon2wGmhRsRE7y5OKRW2O698RQ7b1FOvD7fjsvHZ2bx3pVH X-Received: by 2002:a9d:5e8b:: with SMTP id f11mr17169992otl.110.1584942913208; Sun, 22 Mar 2020 22:55:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584942913; cv=none; d=google.com; s=arc-20160816; b=SHQEwjrhb39AK3vqsRz/7cfW94mLkZlYdMbL+3lrJENVcsZ1r+We0HFtVM+KJRVhbF Q8KtdnCno0cjg071fsj80+VRymARvztG7hOX0HiqDYH4wGG05lMpuF/5aykzoGBH1tEm dLpVwoehx9HPSxqZ0VoHRfi+wblzVYGkhez0ldJ+FYT1sKe7BT2wCSPAxl/twPyRHRRt nEBe1RNaMINA1fov6GxtnYU8+ZwcnGdNd4JGCuZeooNcudmYVl3xlH8/uBZH0Sq/ITZ/ +v1dnT55Ie+bI/wlJmkIFTFmocx+VPEgQXIkbKieIp2Rrba2GJ+2trF3Izanx795xfc1 yRyg== 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=Bs9uueH0blNyu1UBuP0fQK6SW+2/EajcrnZfP/uZxx8=; b=LKmq5yMcCoEEdIiUmsNeLr4lTY2EzaEWRTDZs6imWPpxglKRYtD5PXoLuEqJm0D72t vZUkWCK99Z9lRXLMk45eOSLRo+SAwDcUOWtwIT/VmD6FztIISKdnHas9cseafQyhI5wS vAU2gGXlHnnxYRWDfagdaqQoraMR8OjrtYHEGX4rOVUfY2kRqIV5N5QGcLnmcUgZbGru kzz0QytUo6cmUd5lNGPQBHR78/4BTgz4xKVPOwFaoOUfPL86fVdEqN8qdN9FRZKUMQ73 sFzZ32utxBag3MPuVMxwWoN8Yw97KTAXj2fhT3z2746FP7PpPGGhErdmpUW1Hqc+rSe1 EZQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Qir9PLF3; 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 q23si7409017otg.271.2020.03.22.22.55.01; Sun, 22 Mar 2020 22:55:13 -0700 (PDT) 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=Qir9PLF3; 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 S1727362AbgCWFw6 (ORCPT + 99 others); Mon, 23 Mar 2020 01:52:58 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:45308 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727323AbgCWFw4 (ORCPT ); Mon, 23 Mar 2020 01:52:56 -0400 Received: by mail-pl1-f194.google.com with SMTP id b9so5455752pls.12 for ; Sun, 22 Mar 2020 22:52:54 -0700 (PDT) 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=Bs9uueH0blNyu1UBuP0fQK6SW+2/EajcrnZfP/uZxx8=; b=Qir9PLF33Ng5Lj3XADyW+LntTiZ6vnLYv3JMHBnICF+CG575H5klswKFi+hfrJgzUy 1CKWjMYT8s51Lpjf4jJAGWnOldtEI8PuhtzUBlTMN1O7EZxAC0vPRg5FwlfsjwvNXrx8 ui+pAznSrunnWGov60060Trope/AWLBKMnENsYPAALAli1WgpLD/JPVai8NukSUyVnKl 6b253t2EUj/ONBIaghC6QXmhGIqinCPEsVnOK7eKvOvN9HYxj5MPvLNb5p+/VNJz0FIc stReR6Qdu7c5CXaj207Qfvqxta8p3dQe4zDZiS9ldZOYgsoqpSCG2GixPSUdFHMN3/pV 780A== 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=Bs9uueH0blNyu1UBuP0fQK6SW+2/EajcrnZfP/uZxx8=; b=rjU2tb3EuaHpTOlmyqSe6mUIj+Q0BybhDAf7YCCVnK1Vka89YqoUGMr4o+X8yMe+at yYhYE/NIWMWHTp9MQbv9qmNSwH81hkskraV41ipbelh+Au6+t1tCktOAm5Gsnm8hzteM 14GSFKQ3FTmfnuX65jNhCPYJvA895TcQLSTLFo33MJ3GI8amAOFWjWDK7DHPEwRaf2hQ ydmtKDcdbrhX6i33xB86rI3//L7zk7crVP38EPlH29ZJHCUuU6iCy0GGl3wHzHag9vbi Dj5fLrckXeB6RvQqxygkkxeByYqH/nlfNQQ5Km/iaosoCiUGsVwVjgdmtQowryrIJc29 XA6g== X-Gm-Message-State: ANhLgQ1rkygLYKmJESwNB1Dwv0VdfrXGs/anWlGNm9qcecwXR31KVMHO 9gCv0xw7S1ieAEM24w8rgg4= X-Received: by 2002:a17:90a:a40e:: with SMTP id y14mr14654850pjp.63.1584942773645; Sun, 22 Mar 2020 22:52:53 -0700 (PDT) Received: from localhost.localdomain ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id y30sm12563058pff.67.2020.03.22.22.52.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 22 Mar 2020 22:52:52 -0700 (PDT) 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 v4 7/8] mm/vmscan: restore active/inactive ratio for anonymous LRU Date: Mon, 23 Mar 2020 14:52:11 +0900 Message-Id: <1584942732-2184-8-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584942732-2184-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1584942732-2184-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 b37cc26..3d44e32 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2218,7 +2218,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