Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4247441imm; Fri, 18 May 2018 01:44:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrMnmkOkCKkp/ojKKvoJ2qBCTz5oDT/Kli8xVapuwqiqswBZbOOKCRuTNONHp9+hMz2R+G8 X-Received: by 2002:a62:ca98:: with SMTP id y24-v6mr8431808pfk.187.1526633096028; Fri, 18 May 2018 01:44:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526633096; cv=none; d=google.com; s=arc-20160816; b=RR3ZmgO31OQl9C4Ny11JIFfBA8RoCLPeel1XJa6pVX/TiUKSMU1dNlEvjkWwUzxXan TAsBmA3jFmmSNO3XUKst/3fYJDe4RL7IURzooO05nJhWSvbx9f0eSLX/+W1+WYICpPrx yvNuySw/tyJuER0HFcvznQo+jyG8OEB3IakVxDNhzpkGp0sbBPI0c7iqapqnaOoTAmI6 7aJMClQ3srrvvqIz3zukC56KbRtmE52a+hlRpeRU9ajI3bQKYctjyL21bdgYw1KLuof+ iVJz3Q7l3g3PfHicqSZz32ijOVveIaj+N/NaenkRSyADYFy7f8SLOq9XY9XL/wJGeS5Q gmAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:to:from:subject :dkim-signature:arc-authentication-results; bh=5ph2yXX7x8Q7d1qnUfzwvWD/X9Mq0MObtjdmrodZ3YY=; b=QQkaeUh9i3tD+nV67xRhetkdNWnOPTuvTKiyHJ4+1P5RWfSVaE0PfKmSaHBkUeB4mw q2/GbxBWNhTHbCUxzVGmlmdlU9I5XVIZms0yh2M6KuR/V/+T+pv9P2coRJTi958FHKib IjY6NrVkpJRjieT63uyamFB9EeldoyGOjippMuUGkrP3kAJ/Togdvqw1cV1T3FXwjyja WUqpUcYq0eQpv6UWP+MfgJXsCUVCe8AD8X+OWVn0an3iE4FrJR4xS/3cChcPZ8sL9abH XcRU4DsVkfQMpte3zqNHmqxjCZJaq0Dkfx18+s/KUcak9aUP4xc89P0ylObxkDIvu+e4 D5Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=aywkgK78; 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=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h8-v6si7166324pfh.278.2018.05.18.01.44.41; Fri, 18 May 2018 01:44:55 -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=@virtuozzo.com header.s=selector1 header.b=aywkgK78; 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=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753973AbeERIo2 (ORCPT + 99 others); Fri, 18 May 2018 04:44:28 -0400 Received: from mail-he1eur01on0132.outbound.protection.outlook.com ([104.47.0.132]:58617 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751744AbeERIoW (ORCPT ); Fri, 18 May 2018 04:44:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5ph2yXX7x8Q7d1qnUfzwvWD/X9Mq0MObtjdmrodZ3YY=; b=aywkgK78ch4DrB8JYXxkP9PWC6eIPykQWWoWOMjp2RR19mtcpsaIUfj9iVW6XhwzmglhOHSxqFA/gjJJSGu8o62U2aXVoXvpU/oXmxzmicHclLsGHGz/Rgs80tzsXauu4nt+tINA7TsgwUVXTkUP6+FeqU2bJFNV2Ps9dNgeWwM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (195.214.232.6) by VI1PR0801MB1343.eurprd08.prod.outlook.com (2603:10a6:800:3b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Fri, 18 May 2018 08:44:14 +0000 Subject: [PATCH v6 15/17] mm: Generalize shrink_slab() calls in shrink_node() From: Kirill Tkhai To: akpm@linux-foundation.org, vdavydov.dev@gmail.com, shakeelb@google.com, viro@zeniv.linux.org.uk, hannes@cmpxchg.org, mhocko@kernel.org, ktkhai@virtuozzo.com, tglx@linutronix.de, pombredanne@nexb.com, stummala@codeaurora.org, gregkh@linuxfoundation.org, sfr@canb.auug.org.au, guro@fb.com, mka@chromium.org, penguin-kernel@I-love.SAKURA.ne.jp, chris@chris-wilson.co.uk, longman@redhat.com, minchan@kernel.org, ying.huang@intel.com, mgorman@techsingularity.net, jbacik@fb.com, linux@roeck-us.net, linux-kernel@vger.kernel.org, linux-mm@kvack.org, willy@infradead.org, lirongqing@baidu.com, aryabinin@virtuozzo.com Date: Fri, 18 May 2018 11:44:11 +0300 Message-ID: <152663305153.5308.14479673190611499656.stgit@localhost.localdomain> In-Reply-To: <152663268383.5308.8660992135988724014.stgit@localhost.localdomain> References: <152663268383.5308.8660992135988724014.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR0101CA0016.eurprd01.prod.exchangelabs.com (2603:10a6:3:77::26) To VI1PR0801MB1343.eurprd08.prod.outlook.com (2603:10a6:800:3b::7) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:VI1PR0801MB1343; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1343;3:nbMLuTed+eNp90g1gfD5px8jGDAi+hEjGBZr6McnK5/ilicH9a2pWYh5kkIJADnSYhzxYRLei/EuHmi55+zQF61BQHIRZFDAH03B7JlbBNCDxEv52GODaU1+JlJLMllh9AMqmARYEUbubVR6H3n91eRzRii8270vlnjrAdAK/jTUs0CkAv/Mb9Ojcp7e6by+F5cTwbcA1xqXmdzL2BtRpiQ8U1wz/5TFR2hplUwuV5h/cGwr7EXDFrAMp9AvrhWS;25:SYzW3WVfdw4Wj+pVF15WMcsdFlBpzdBEuxosNbdzzm21PRT0Pl0Uy/YKK/H21nmc4T5SLu11aSgOZt+6k3oUghhqMSDw9miRGKYlmXfDH7jPOuOqz7fQm4VnipEHfxR0otq5AedaIdxxaNH6+N24wpm5u/HFWeWJGPxlj0NCWACvLE4lzvA8Mu6ecYWVpY++9jPoOkYlzjVCU2WWwrJx7QHYBwu2o5+AHFNlZI1PY5D4oEkonhOiq6ahcbRgRh3dg9jHhmGW0Q3MeSqzr2zuP+kqd4cXfe60N2iLpb91fK2rusieFfEBTj26crHuMa6BuF69nb/GRlTeFGR3ZmuSsw==;31:PwHODIpDf0bC8fBwg/TRu0R7mNWKidd/kt+o6Kk3Q4LQMxVsgV5o+Q0NyZaSbR3oFk1CiiAkFsUbwS81uenUew40pe0veB+QgR6U8Z1ziytrHU1bwrXQO9ciT+qsYo1vDFNdJQ0E6RFvStb1sh9GU+P4NmBvCcVLQADgfH+e2qB1RB21EulUkP6DgSDvmXXaYkFqVRgfQVwpWArYOEZcNm/sHW81Db+8ljogr+7gqaU= X-MS-TrafficTypeDiagnostic: VI1PR0801MB1343: X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1343;20:WidgSgaU9vw1mCJIOFMaGmzcwVvWTr40F2CojjwgGIldNaiRGk8um6Pks0ZhZinI1Xwj0kD2iXKGmn/3Bfnuhlv1+47y7jU0x5tZBWTV6PnAVEJ8HFM9rQibO5KOVcXuJsMJQKuVGL9NRCFMlNQRDJny6Rh9UPX97X0Bk6BPAYlERgGZmVc0JQwLgjGMFwkt/w8uBkTGpyEqVrDe5Q0cBe6KK3Fv/0Tu5CX22UJALzegoBI5Wxegwts1fCVgreLYUIKEF++0c/vl1Fdg3Em/GyHnAWdPkfvzzdiL+iI+j8/fdCQbgdPwqcO1DC+YlnqhzensiP28/oAJQumzrKbNlCjc8P39Jz30CME5FTHaQ6t+Va4mwMfpf4Ay9mObNEM+d2EndE7ckYx3gVlvGBQPlt+Rm6Tsgz6PvfLJPRuMa+CBPrCd4FpHJWeGbON6N8l7JWiTwnc0VU4fHtpXtmuh4aA+cH6hxew2S5gj/NhQT9QWY6I+SfJQ60XRNsSKxUYV;4:PoVSa9i3Ktd2/ShmKoKItoUGHtx/W78bTNZEB+C3b2P3kohLzcQ6KVzbe+fh5rXaSoQitrKe3DXoLSB4aKYKYBooQ8rZE3s2Su7r1tj/vgUWVMYUOYvRxLidiF4kp8KXczUxCMkFQH6t/jWpn3vWuvI6SyoSyEmorNDpuqJBGknq+llNpVW8zUP8UFNqTm2ZGhfhbWs0KRnGFYPtolTEIe2wX1omIy/vCosIidSoP8O+KkkxoUbM7Q29Jsh19D0gfsVdipM9tZuRp90JZoCYngIukHzit9OeKCaFDbSzviKD/vp8i+CwtUSWM1R6auDA X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85827821059158); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(6072148)(201708071742011)(7699016);SRVR:VI1PR0801MB1343;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0801MB1343; X-Forefront-PRVS: 0676F530A9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(346002)(376002)(396003)(39380400002)(366004)(39850400004)(199004)(189003)(6636002)(6666003)(81166006)(11346002)(476003)(446003)(956004)(47776003)(50466002)(103116003)(106356001)(66066001)(2906002)(81156014)(105586002)(486006)(7416002)(5660300001)(61506002)(7736002)(305945005)(8676002)(8936002)(39060400002)(23676004)(16526019)(478600001)(2486003)(186003)(26005)(7696005)(76176011)(230700001)(6116002)(25786009)(33896004)(3846002)(86362001)(97736004)(316002)(55016002)(9686003)(52116002)(55236004)(68736007)(53936002)(58126008)(6506007)(386003)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0801MB1343;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA4MDFNQjEzNDM7MjM6eUhQdmsrVTdMYTRsTGRRZTlzWVFKNGJI?= =?utf-8?B?SWZhcC92cmpJcDBpRlZVeWsrUUx2Nm8za1BOclppdFBISllCUGVwZGRZaUVN?= =?utf-8?B?M0szUXgwL1k4YS9OT2FQdFdJRzkzajVsUVg5dGtFOThPNzNRSGV5REZhRDNl?= =?utf-8?B?cVVxcWo3U081eG0zbGIvckx3bTFRME9QY2xUSXFmbXJYM3BwV1FFc25PSWt4?= =?utf-8?B?UU85VTBtUWdKcDgzNFhNMUQrczBSTmlVM2U4NUU0a01wamI1d3NIekQrTzlx?= =?utf-8?B?Q1lXd2UxY2wvUGp5R3JtejdQUU9PWDBDdml6MHJvWjB4bHd1QnhIV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+Ggq98MgKtYeO3XPIERDiaXmQxxJOb71xYXZfHPzTregMXQ0P/iEaXxw7wpI544mxCXfd6C49JzRaxpKOzOycd40/8n75iPk1N7hUYn95sWK93PlUwdlCXy16KfO0pdw+bOFOtulXH5L90/AV/e7C7X/VK7AtiE/uJ7omYEKwLEdIRy0hJHN6lboOOEKkabb1qB1euXQPPa8YiUGvdz57UYMh6fa3FHlbTNWD89bgfqbgHfeWUaQVuOkKX3N7EGj4wwK+/J3i/W5ngMbrIxPacszR4IU4MMdZ5or7Bsm2Vl4Jru8Q8NYzze751LmO0nwqOzbSwBl+xOnTAewaiQv6z2KDHACrslitrL25gfPofR4Y42ekiWgUCA==;5:7Bb9LDNvDWL+v081zUk6kRz4+pjYAEdlQQsVhCtBe+UbEP3yM2lZtQ1KxT/JJerKoQNbcOrUOd2dqMEIAn/U1W/VRE050QW5JSF9XkEusdwdgzsgfny7GjIyLWJaJrsvoGPpxBRFaWY19/HBVwKywTBGmccqnWWRSAmZt9L1cv8=;24:TqZ98bVBwAhwMXHOrJXKVFazJ9ZTP55kBxpRZ0/92D8e5v6CkBRYkR7KQGzKUY9TUUrHhKR5BAAGB8/HHEtIxcPVwiQitg+eT0zLYN+H/Go= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1343;7:7hk6gysHr513Rezn0qSbATxKiexNN3mHE0jemk/kC9pcsBrw8fvpnDFxW719gam3TOw6nH48WSsexWLkkbtdJYiD5T5RWOF9MyvDFXOpA2WjmYZcQ90j/P1T9kGf2tKWJWrJqGVRGC3OzjWFI2Ne1f8Ago46ietMTepWrGubujmFNi1S7LOnJTRdbHKGNOnlpyew/THhtZ/CkYLP4CrcdgWokp+iSx3KcOhLVrtlcQXzX+LUr+poTSoUF/7/Hge9;20:LsCttxcs3puCX2zwRdNuTuuId9O+lQu5823gmofDazBh0yVTwhee+M4Mknx2RdBbZ31vmI5SflYi8O7myJ3xozx0Gg80M2NdO4a81pCajYh9CE2By01M6FQ24SvQ+S9Ao1p5q9TX7LqpVZ/AsfLsyTxfKKNqDHbaHoWRUdKh+F0= X-MS-Office365-Filtering-Correlation-Id: b1b5555a-e8d3-4ed3-52cf-08d5bc9b8a33 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2018 08:44:14.7520 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b1b5555a-e8d3-4ed3-52cf-08d5bc9b8a33 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1343 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladimir Davydov The patch makes shrink_slab() be called for root_mem_cgroup in the same way as it's called for the rest of cgroups. This simplifies the logic and improves the readability. Signed-off-by: Vladimir Davydov ktkhai: Description written. Signed-off-by: Kirill Tkhai --- mm/vmscan.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 2fbf3b476601..f1d23e2df988 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -661,9 +661,6 @@ static unsigned long shrink_slab(gfp_t gfp_mask, int nid, .memcg = memcg, }; - if (!!memcg != !!(shrinker->flags & SHRINKER_MEMCG_AWARE)) - continue; - if (!(shrinker->flags & SHRINKER_NUMA_AWARE)) sc.nid = 0; @@ -693,6 +690,7 @@ void drop_slab_node(int nid) struct mem_cgroup *memcg = NULL; freed = 0; + memcg = mem_cgroup_iter(NULL, NULL, NULL); do { freed += shrink_slab(GFP_KERNEL, nid, memcg, 0); } while ((memcg = mem_cgroup_iter(NULL, memcg, NULL)) != NULL); @@ -2712,9 +2710,8 @@ static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc) shrink_node_memcg(pgdat, memcg, sc, &lru_pages); node_lru_pages += lru_pages; - if (memcg) - shrink_slab(sc->gfp_mask, pgdat->node_id, - memcg, sc->priority); + shrink_slab(sc->gfp_mask, pgdat->node_id, + memcg, sc->priority); /* Record the group's reclaim efficiency */ vmpressure(sc->gfp_mask, memcg, false, @@ -2738,10 +2735,6 @@ static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc) } } while ((memcg = mem_cgroup_iter(root, memcg, &reclaim))); - if (global_reclaim(sc)) - shrink_slab(sc->gfp_mask, pgdat->node_id, NULL, - sc->priority); - if (reclaim_state) { sc->nr_reclaimed += reclaim_state->reclaimed_slab; reclaim_state->reclaimed_slab = 0;