Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3397600ybh; Mon, 16 Mar 2020 22:44:41 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuUjGuoujwNpG8OnDQ8lCUUd5e8GvoCW0F7RbHYbYderC4S7H6lLfl1IR+MOS9HaPL0RkH2 X-Received: by 2002:aca:210c:: with SMTP id 12mr2174079oiz.0.1584423881038; Mon, 16 Mar 2020 22:44:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584423881; cv=none; d=google.com; s=arc-20160816; b=nF2VlP9tV1Yft5xaC8DbtTnHEmtCDxa84AzigZiqHUmSQMaJ9s9StuSHs4oJjYaXCP hc4PYLeOkSrfsU7AAYpvBCDsE0kfLakkDAEcI1w0gjKY+LafgLRHgS5Ak3QhaSExdQIO a+Maep1aSs9Z+y7fE1lxpnxWKmPFTzog8X2QxgSR1u+7waKiYlRRlmosCnWx5jh6iv9v GgXJh3Yp9yBtdV/e89u6W66ulA1RRktwyWMU3CaWEDVVqDkPO21pSEiYyFhB4SPWT1iP FjEeiETevGK2+H5pJyrFExJkvOf9ZsFAW0Az0+wjqmE2Tnh6uilgIexsgrk0w0dMoN/1 rvgQ== 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=o4CLhDYq+FGIprmObkMYtkhVUuruZ0piz70id6GR6caINt3Bo3qUrZ8KGVwIFJtu/9 iBYeInXkblam+uVh67H7L6vLAcc5JtCwIDgwV9EUi6G5V+pbnqy2Uxpd1Wo9BbMO62PT KpfY2TVbbf/UiSQcoS9o83mwFB7ExesXkCLcR/G35kPeXdpbL+dXju0mCkqb7ap02aL6 HrCMGvOJ20jHtAeSXLKmgjc1gm+2JIivaY/qJykFSyasQnCWpBxxOZgj9gSerm2PwIlC j56FofMwH1GJUDFzeaQK10ahUOo+n2so4zyALWkOZLDTvXXfr8wWaAT4Xzwy4j4B65y8 kWSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Epg5kfm3; 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 t71si1110950oif.84.2020.03.16.22.44.28; Mon, 16 Mar 2020 22:44:41 -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=Epg5kfm3; 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 S1726626AbgCQFmf (ORCPT + 99 others); Tue, 17 Mar 2020 01:42:35 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:33479 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbgCQFmd (ORCPT ); Tue, 17 Mar 2020 01:42:33 -0400 Received: by mail-pf1-f195.google.com with SMTP id n7so11321326pfn.0 for ; Mon, 16 Mar 2020 22:42:33 -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=Epg5kfm3vsnkL5NY4VcE5Www5oTkkErgJNkHAVcm2ej39BWsfwW9nUespyJ4auOArc kbptxhy9JzTOgVFQM2Gp2zOWrzoipDa2+nrx7JTRHsDSUXd245Ev71piraeS/AWj4Cl0 VMvHWVc3cVoyDI92T++Ue2adH3kyB34uRUKIYSk/MAQg1ZXuVTz6VC6z2U6eDXCCvDtx 4G0wdNrH9Tv04j1JllvnFmnR235GhAAOIgnBUeOALKHwI5w1j+hUDFIAQGlOFJdp8VBe 6UDbVegPHLs3vBk1sXyluJBosjvBnSG5xoj+EVLHTDh1fUn5OtUd/+yazeoNrvaiY4Ro n6xQ== 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=iQyVcWkI5PswrFeRubq320itVIaW2Xyv4Aq84THZLf33ncFkh/TnxX5o1xswSth2BT fmx1dt/fE7+n6M6/jnv4Lnv2ZD0QLQTHfiAB94NXGXvDgttHFAuXO4C8IyEAI+NbfAUn OTHc9QZLsaxiKM7NF+ayDYo56CWZu6t8+qaxDMWDPpcCgDPfo5OG4s4shKH/CkA2C+Mg I6uMCtHBfo9m40TWHTIzECejguKGGbfOouzikee3dXV3/Xl84KogD0Xltyd5efKUXLMU Va3nqzvD3ELKQyYvegLWoSw8EGhmtLomkmvYU+QZHg5RXLlz7H6LpW+l2FneXNHRl2Qf nsEw== X-Gm-Message-State: ANhLgQ1kx1tZ5xbuY+FYup34sIaEn8lDcJ3ZlNzSYf8GhbfLkmkRNzMl wYztNJwRSoSBXbbTgi0yERY= X-Received: by 2002:a62:778d:: with SMTP id s135mr3550673pfc.21.1584423752601; Mon, 16 Mar 2020 22:42:32 -0700 (PDT) Received: from localhost.localdomain ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id i21sm1141757pgn.5.2020.03.16.22.42.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Mar 2020 22:42:31 -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 v3 8/9] mm/vmscan: restore active/inactive ratio for anonymous LRU Date: Tue, 17 Mar 2020 14:41:56 +0900 Message-Id: <1584423717-3440-9-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584423717-3440-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1584423717-3440-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