From patchwork Fri May 18 08:44:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10408801 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 53272602CB for ; Fri, 18 May 2018 08:44:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40D3828462 for ; Fri, 18 May 2018 08:44:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31CC02888D; Fri, 18 May 2018 08:44:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67AF628462 for ; Fri, 18 May 2018 08:44:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D0C6B6B05BC; Fri, 18 May 2018 04:44:23 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id CBCCB6B05BD; Fri, 18 May 2018 04:44:23 -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 B83CD6B05BE; Fri, 18 May 2018 04:44:23 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f200.google.com (mail-qk0-f200.google.com [209.85.220.200]) by kanga.kvack.org (Postfix) with ESMTP id 8E6636B05BC for ; Fri, 18 May 2018 04:44:23 -0400 (EDT) Received: by mail-qk0-f200.google.com with SMTP id h15-v6so6338115qkh.3 for ; Fri, 18 May 2018 01:44:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:subject:from:to:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding:spamdiagnosticoutput :spamdiagnosticmetadata; bh=5ph2yXX7x8Q7d1qnUfzwvWD/X9Mq0MObtjdmrodZ3YY=; b=gvfKlM3i4QWZRwHBHoQoUfHem9XqeJFg6EKnoYQfMUrb0gS3szsHF1mYiNnH4n3/Xt jbH4xOWeO/AOO5kvWXJHminhlhC1r07FuWTtFaXMzdxHrIX31dlzehdZlZOSjTe3iVKN zhrhthmRZBUX8HlcqkGOFJa2AsK9CzB/qZluvgzogRBwu9tQhdJAR01fZ8aHkzIL4Iyi 3ZqGwijsnQSu2vMZ1OILBv9bWeVkkTayzd1vAnVuLNMVOjtyQHNH5iXzayhyt+m3GfNE F/OP8fkKubjPJec7mrmF1kzoYhz80zln2aAOwi9RDKVsF3b7+o7gmhFMiFKRx8I+yYNw pnbQ== X-Gm-Message-State: ALKqPwdKSvZRYsOVbi5gO3nhUe5BKIVC1YM71gwHrRbYPu2s+8J12GRB AZIOH4DB/WtVoeTfn1roDqShkIYeEXSKSpbPi+94+qhgLAoMW59OpqpD5Vzh7iRwEediuoIlZt4 uMX0b9eTcqdbpY8DnRLI3c2iNAQz7npSD8s+w6EgHVMy6BOI2KmPMiMJktpcj90TxEw== X-Received: by 2002:a37:cf50:: with SMTP id e77-v6mr7674333qkj.290.1526633063386; Fri, 18 May 2018 01:44:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoRgKN89nxb1ipS5qOg9NMPXQdG4SI8BBZ5FxkE3953yFuxFiWhEulfbEyV0YsQsGJ165Wc X-Received: by 2002:a37:cf50:: with SMTP id e77-v6mr7674324qkj.290.1526633062829; Fri, 18 May 2018 01:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526633062; cv=none; d=google.com; s=arc-20160816; b=bDo3OII7KnUO0DLIPPBapWh8aY9zNiLOgD0Qq5Qj9Jz263HwNAL0uHkRMYIy2F6PQM CVXqH1ne46CsVcPM34mFxSpeK9S+lETkRXf3B0hgp9ic1vbrlJUK3gSkid9JN56R9xmQ I4T0i9Gc8xnZhDgRQtNT13OHeKFTszcceqGHaYZUPJkEtTJpASsbd8w0NvzeBx1ogeJb 6PSt3z4+bFQ4sWWC3pw49incUyAhE80K4yE0F9+Mv+QDHW5Xqdw0D/9rO0CUsEg6a7Ab crlR22OTj71xsAU0ElP2eu8YiP+vXBCvV/LygIcCe6sGguRtH73FTBEBC4tIQPnGA9Sv krwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=XhksaLdOYeeVyaXaHDHn4AbGoBqU8LGa1/4rk16AnrRjcIe4fSleexe2cxLX0apcdX MMyws2l6KECyQDffaAO6Dah0Ed1LaBo+xs4EuP6XTKhGPEHn8q0z/2r8jn3Gvc6rLQXa JMlJ0XLN39Ly276L6un7Emaw+ipuf9wdg1bx9k60+0E1YBpZtS6baRskazmmGKb8RKT4 QdjdyJTf/5iW7xo/GH+3aKyHYGfAP5VugFFN3ycp+W6nr4cUQ3HdZrQhYMqMmJS5AmqM 06FxbcuSi74llfUJ3LJAGbPzxImmRpaDkooc2MtQ9mf8GmKvDYa9pNnGY/uzIEF150B1 7zRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=aywkgK78; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.107 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0107.outbound.protection.outlook.com. [104.47.0.107]) by mx.google.com with ESMTPS id y2-v6si204155qkj.300.2018.05.18.01.44.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 May 2018 01:44:22 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.107 as permitted sender) client-ip=104.47.0.107; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=aywkgK78; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.107 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com 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 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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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?Q1lXd2UxY2wvUGp5R3JtejdQUU9PWDBDdml6MHJvWjB4bHd1QnhIVE1mazhK?= =?utf-8?B?c01rYVA1YlNhWlVhbmlpSCt2eTN0OC94NzhhUmRFVVM2NllJcDg3ZzlRN0Yv?= =?utf-8?B?MTJ3a0NSa3FhRVBSSVhUcWQrQmZvS2hhUm5McDFtV1grd2ZPMzNXM3FIbE51?= =?utf-8?B?Rmh0Umc1cXFwbXh1dnF2eCtoSlJES1ppc0hxQXlPeG92cGlIZkdKcGkvRTU3?= =?utf-8?B?aDc2TVYwZlZWNmhDR09OWE1MaFRRb3hLZU9Jd0Y1S29aeDNFWlgxeXlQdDNx?= =?utf-8?B?SzZoSmFaMFVVYjlCYVJ6dXV3MFVpcm5SWlh0OXFwaUQyWW4wd0gzY0xaMEtr?= =?utf-8?B?ZVFpTlFGSXFZdlF4VWI4eW1kdzBqdzhxT2ROUlpUbCtLZk1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QNbcOrUOd2dqMEIAn/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 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: X-Virus-Scanned: ClamAV using ClamSMTP 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;