Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp227493ybt; Tue, 16 Jun 2020 22:30:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+goO7lzrPY3CMWN4aZT+lK9XBskDz7LDhtX2HRhXGLp06xzrPcQKOnHBWju9lAK+sWs5u X-Received: by 2002:a17:906:d923:: with SMTP id rn3mr6021615ejb.261.1592371846493; Tue, 16 Jun 2020 22:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592371846; cv=none; d=google.com; s=arc-20160816; b=qtj5Tb3Vki5/41pPfBYo3a5zjVPa6Q+gJDOqN6yEnty5I6WmfYLrT9bZg2nCHVZlAa xuFiODcqxNzGV0GyaQwK8JeAH+2wRa0oUNZWNKc22aDnZN9Kj2ZrO1dN1A3K1S+PW5wB v3R3n9bk9avQgxcbyGsXH9fFQoKo6OkqM4+e1eJyWC4NpONoEVH591t9vDjjy+ju2F6E nVcdIh61HjV+Rj6bHFAr+2z0NlosnLXzajuAQQfvpX6ypllhd290k9FV386UrSt/jBnE ff1mOb3ZgfVX9LnCkHxNaBVdaXxhTHQUSBFhuzI/LAcBXzsCqknXT0QoI5v0ceunRvlZ BGsQ== 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=1xjkUNXRrltW0v367905hcdOUoCgRbDmUvJ+4nENETw=; b=cUxNmKTF+/o+OO9zlV/lf9NPGJAy7O6yKNqfTg1Q8bDSiYmAXg3osBv8vFWleuPify +bVljZM0utzq2dDjZNKzuoO/ihKZU5kpht50aK+yOmsPTDyNMkW/mvlE0XpTNMrg4gzv eRTHgaK1A1h04c4+/X9Rj5ea4E7SFcZy4jz9mmq8QhGjOHxL+aZiIQCvOAFmYu9Uxvpk FDao6d/MZN3NkwArtpa1bs/3sRVLoQxtecs5KRXAZ3R5MnjxHhbvwUgprDV2ybDfQBCA c8GNiyrHTmE1Bw7FpDQ06RqnyeRBELBf6sKltPqKwRogCpzYzvUif0q2x5SLop378bQC /eJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="EnsDu/n7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id a17si11840175edx.507.2020.06.16.22.30.23; Tue, 16 Jun 2020 22:30:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="EnsDu/n7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726930AbgFQF1F (ORCPT + 99 others); Wed, 17 Jun 2020 01:27:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726879AbgFQF1A (ORCPT ); Wed, 17 Jun 2020 01:27:00 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28366C061573 for ; Tue, 16 Jun 2020 22:27:00 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id k2so452588pjs.2 for ; Tue, 16 Jun 2020 22:27:00 -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=1xjkUNXRrltW0v367905hcdOUoCgRbDmUvJ+4nENETw=; b=EnsDu/n7ObTOMuNzMgWv+/zLljv5adhFJhPwWDW0B+zK20kJONNEtDVAGtRUm+eNdN yFiJ7UJqUa51Gynnn8GlKK14oTD4h7g0VEOiEsXn2rVeLyUdbvJbCjaJHCsiRKFsTlXz 1FWIAGZYRNj/Z7jwW8YM6sqyPkrV5ca3trdH2iAJbi7J0wvX5sMLVP0N9BoXjbqWLLpu jJ9VIOgjoL562ZRdzLEL2bRA8dhfzZqrvecZYMLi/1ifbxpmalhtwJHo9Gjp/MeZN23v b5lHMeEy9GcGCNTfkeF4AyFDOqmn70EIg3NorqBg2xZCPU8uUZXxqjcC4kDK6WzqoMMg 6rzQ== 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=1xjkUNXRrltW0v367905hcdOUoCgRbDmUvJ+4nENETw=; b=SDOVrGHOLFd6d+TTSvMwf3PTaHIzgIq/4inEFRQLNypDJFbFMJ3ykhAM2B7iUoL+Bk RanYs7pL4z1JVcBhC0StsYaUBOX7co5zEcYWztsbjSOknaipzmeXEaViQQiCSjhuJm9c WXqtmiw+hqApj+P9paoyzfaPYkRbaOY4tzgqzagRP7FWDx+ZXCA8FyBkk2Kl7lzEMi/I m7jCmy8KgNlwGYYj4rwZEU55ALz/uYP4sD+mwDY8x06+LIMx91ioep8mqQgAW/JomWCF xbXWSpkY+X8YMB7dhlV2u2/hoQXu35ViHShZHiRSud8yBLoSzcN/4OL5C20z9kpnIZoh vCjw== X-Gm-Message-State: AOAM533krJZ4mh3CjLii4X0LCVYSn0JT2Z2QywWGhMckhDGyfd2J6RXX VL3aZAADJEGJnVokYv/zb90= X-Received: by 2002:a17:902:6947:: with SMTP id k7mr5232713plt.258.1592371619698; Tue, 16 Jun 2020 22:26:59 -0700 (PDT) Received: from localhost.localdomain ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id d184sm8830068pfd.85.2020.06.16.22.26.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jun 2020 22:26:58 -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 v6 6/6] mm/vmscan: restore active/inactive ratio for anonymous LRU Date: Wed, 17 Jun 2020 14:26:23 +0900 Message-Id: <1592371583-30672-7-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592371583-30672-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1592371583-30672-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. Acked-by: Johannes Weiner 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 eb02d18..ec77691 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2211,7 +2211,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