From patchwork Mon Mar 23 05:52:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonsoo Kim X-Patchwork-Id: 11452387 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C1FE1731 for ; Mon, 23 Mar 2020 05:52:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 38D4920719 for ; Mon, 23 Mar 2020 05:52:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Qir9PLF3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38D4920719 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4EF676B000E; Mon, 23 Mar 2020 01:52:55 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4C5C46B0010; Mon, 23 Mar 2020 01:52:55 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4022B6B0032; Mon, 23 Mar 2020 01:52:55 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0123.hostedemail.com [216.40.44.123]) by kanga.kvack.org (Postfix) with ESMTP id 290C46B000E for ; Mon, 23 Mar 2020 01:52:55 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 76BEF4404 for ; Mon, 23 Mar 2020 05:52:55 +0000 (UTC) X-FDA: 76625558310.21.edge27_70ce3dca8681a X-Spam-Summary: 2,0,0,e946197559439599,d41d8cd98f00b204,js1304@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1359:1437:1534:1540:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3866:3867:3871:4321:5007:6261:6653:7576:7875:9036:9413:10004:11026:11473:11658:11914:12296:12297:12517:12519:12555:12679:12895:13069:13161:13229:13311:13357:14096:14130:14181:14384:14394:14721:21080:21444:21451:21627:21666:21740:30054:30069,0,RBL:209.85.214.193:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: edge27_70ce3dca8681a X-Filterd-Recvd-Size: 3926 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Mar 2020 05:52:55 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id g2so5468681plo.3 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=oMQXBoOBniJFac9+qsx18dpWf4f0US70df1oC7VIrxal/zYjt9SQ4NJ/JpsPvUn3Ur NrZ771wg1Bj33CKl0V07cL8/NxP2+2tJehh//ozfKr9tXORGhH18jNGOzAJyNLVBnYXi UcwYmJCI9XeXkw99q4mItDSGwmqEvEAcDK3AjxKZt2AKBvHym+OndxSvwI+akdmgdGvS DyXTR+xCASyY2Bmr8oolm9TpLgJVutnLHZfOeS7cvTPBJT3orT8UoryH7bTrPQrcIToi +Nn6bMx+RFUINsn3i6u9i3jN6O6PrAosLoP+7moR8iA416VNnIZ6CjDAmU5z27SuvCso TLuw== X-Gm-Message-State: ANhLgQ0Bxi2vQim3uLjoYbLvlI8Rxlzi8abAsqDc3IrSVfXaNocV3UsD VyC+9Pef0ACkTdOq35YqF+A= X-Google-Smtp-Source: ADFU+vuzird/5rQcdmAFYzXID8FO2PLNyrazWn68ripd9cs2SNTAxvfsmjDyYomHo93k1G/GZgrxbg== 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Acked-by: Johannes Weiner --- 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;