Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp269706ybv; Wed, 19 Feb 2020 21:13:23 -0800 (PST) X-Google-Smtp-Source: APXvYqzeYvtnawQGQFN4bOHCU7x7q5cCN4FpiA7qyznXpCHEl8LW7VO52Bae5ovMjcjP3z2SQ74d X-Received: by 2002:a9d:7999:: with SMTP id h25mr22123915otm.347.1582175602799; Wed, 19 Feb 2020 21:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582175602; cv=none; d=google.com; s=arc-20160816; b=svSaf5K8WLL6HErYpS/6ebZNiod3dyQWWnOtksBYqH0+mrdoqrZQ8GMKiprgO0Pk6N qkY/VpdFiIOJ28dqwJ13LfjIgfzFppwYRzA2BMDLnJN8pGfBYVfl3pvGc6087MFw2CHM UI24mqkN2yUUqqFCw4ffpD7U9CGcBYpWTbMiUSHPq4TIEyEVRAxFr1A/efCOmJK18Uc/ oTwiRDPI2arRDfZylxfXZYQrCJJ6XxDL1NIOY3kZIJmaI2fGfDdJNSCzGQK37kRIzaRo fSrwX0Y4dnjZIP08AMRnmK0lOmNlrltWDnrzEfxAcaRL9XtmoY3LbXHKLeQKurs8etsW 1x7w== 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=jTyEhCq9HKRdVIORPpBy8K+j/pQqceOxgBBUJu6cCk0qJO2eN/8XkSLrxKDTGZgZT+ VcZwcgtglOKeF8TATFslWY3sKWuhnGBrPoFv/MnXjzmWo11ITSuap+fN0niImX6hpXin f0TzdlfeGZIfUpEjghKFrSg7McALtayAdg8CDqb6UilVzUD802tj0jnuzAMV83r18naf sl1MMGNvMTkqeUsOqek5lHM1i7J8PdBu5Nr2sA3qAAV1t0qXnopR86sPu51v1a5jLv6C c8oaVS8w2nQFaxamQ77jyuamue0iLH/5WWFNRCT92Paq4u8WUWBbTb+BDBmcQQLwicjv ftTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ijsd5XFM; 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 69si1162257otv.190.2020.02.19.21.13.10; Wed, 19 Feb 2020 21:13:22 -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=Ijsd5XFM; 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 S1728035AbgBTFMb (ORCPT + 99 others); Thu, 20 Feb 2020 00:12:31 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:33797 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727993AbgBTFM3 (ORCPT ); Thu, 20 Feb 2020 00:12:29 -0500 Received: by mail-pf1-f196.google.com with SMTP id i6so1313618pfc.1 for ; Wed, 19 Feb 2020 21:12:28 -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=Ijsd5XFMlVWt+u3REu2ESkhMH9nwmtcDM+4DK8CMdHohtyBnLDFJ1omEsqUwaJ0eD8 jK7xTiHGs1vQtvP6MxRGPhxI1TSLcP2sO6RXdcfz+BboZS8VP3hGZYTM3hAZ7HTjAV3H JbjzBYGEI3ht7gHuptnIQejt1tWuLt/ZcPZYsJqOcvv0yOvTNTJpp6LXemW+zbYSx2BX zV32/BBHyMql7pii+R8MRIQqFzAHZk9F9EDxMFCiK+OV82fYch0Ubc4hC87MQIGnX3BO Lc+xlfZDP0h6UWDcVKe5LrKk5MtB1r4By9jfmhJMSaQbBx48gHSFoY4Bx/+H6ET2rnQp quAw== 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=M6+eTjTiA8mF1ZKHsx+8nYqmn9cQNFj1R0KTtK2g7RFmt7Z/dXVj72tyKIZMrStly9 xbTxItYNhM4iKJZFl+EJo3xz0IAnMKmW8GMjzdILabMXXjadCZo31UFx1JHJewBdeAgv TQjkH7t75zf5VN0nasvrjwqW+MFQ7cQjKDAnFaqoexo6csvp6IIsx4KjzlYhyeKz2XBc zNCNtBz5fsJ5VoEQwNvGFM5oYwFxS0Cd+LOWsdRGhrU656Wr+xcC99QBgbq1q+1D1Skw ccUjkE+wJTbfCH7BkYD9yLLa97VFjFPIwLk7B9sUbTm5Fgwhxtl9JLrW6QUaBvFQs7oD mUrQ== X-Gm-Message-State: APjAAAX52pptXJMFKq90RGEVitoEOs6+bNe5RgH3Uy7WYq+ag2WNgWMO 7hlQwXGMe6BI1Z5p+tCSrUY= X-Received: by 2002:a62:7c96:: with SMTP id x144mr31443823pfc.7.1582175548395; Wed, 19 Feb 2020 21:12:28 -0800 (PST) Received: from localhost.localdomain ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id t15sm1472599pgr.60.2020.02.19.21.12.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Feb 2020 21:12:27 -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 v2 8/9] mm/vmscan: restore active/inactive ratio for anonymous LRU Date: Thu, 20 Feb 2020 14:11:52 +0900 Message-Id: <1582175513-22601-9-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1582175513-22601-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1582175513-22601-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