Message ID | 153063070859.1818.11870882950920963480.stgit@localhost.localdomain (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 2B045601D3 for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 3 Jul 2018 15:12:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1831A285D3 for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 3 Jul 2018 15:12:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C4AB286FB; Tue, 3 Jul 2018 15:12:01 +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 2B854285D3 for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 3 Jul 2018 15:12:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A92596B0292; Tue, 3 Jul 2018 11:11:58 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A40336B0294; Tue, 3 Jul 2018 11:11:58 -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 893936B0295; Tue, 3 Jul 2018 11:11:58 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f69.google.com (mail-pl0-f69.google.com [209.85.160.69]) by kanga.kvack.org (Postfix) with ESMTP id 357886B0292 for <linux-mm@kvack.org>; Tue, 3 Jul 2018 11:11:58 -0400 (EDT) Received: by mail-pl0-f69.google.com with SMTP id j22-v6so1355116pll.7 for <linux-mm@kvack.org>; Tue, 03 Jul 2018 08:11:58 -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=WYMLxZz3q21wtAr0uqaZ8PHYehZSeLRe1kIlsfY4X3w=; b=SqzUd2cxUoEPqcGWy20Jx2CJ1gJa1OuUYEjP2MM3x7cS/mS5nbWKt2LQ3wx90ToDft jie86GxDemXpAWb7Uyqb1YFkOapccfbTdB4xVgk0R5Iaq6De1i5SkHBxJombZ6QspddU tLdI2ml53MzAyhxKdEUmRMQPyfe8+q/lF2d6Pk9yGPlNssB41Sz+Z6K7Xnc7mtFMpPlZ LKP63Uv/z1TbGFvcwi0qiUvUaoAZuta5bXVSNQ+drPXm9sUZmb2yh7lPUZZC9a/NnwT4 WRV0fggYROqNCy3Zx2MbBBv0idkh1P48uVJBryv8hvq060Nt31WDXrfVbv3zfDh/awOu IqUw== X-Gm-Message-State: APt69E2l2XdEc1lznI5qyigSAurntccPzR32I3ycza6wDEcYTd2Uorpb afTlZCEjZizecA2+RVHY1ieied8uMuS1NJ0KeHILck/jGgfn35JwT3XaPvk7Gi1SFxLtbDIc/z2 tvhPqwZEatpouluZvZxkn6vfnAzPLwtBxmxmxdJEIz2yZ32hyMUiRDRQpQPnLFsH2ZA== X-Received: by 2002:a63:c312:: with SMTP id c18-v6mr22465930pgd.449.1530630717857; Tue, 03 Jul 2018 08:11:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc9XFzVOsfmegnzQUj1e6LGjGNpNvhTQMJV5VU/ge6fmATGjM1pDFYvTYaYRwP63GWNdTcx X-Received: by 2002:a63:c312:: with SMTP id c18-v6mr22465860pgd.449.1530630716533; Tue, 03 Jul 2018 08:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530630716; cv=none; d=google.com; s=arc-20160816; b=z3syyLDSQf4Eq4by4Wxr8WZqMJgEcwhgggwd1h1uuVDojCx+f8mw0VZBe4eUwMkLY4 mq10wTQZQpqzDmfvJZmdglVvYvmcaNfoEq93JoXcDqEUOI8StyiRdqnp9lmuXmOhFJlu 7CDwNdj+6u0fV8KuTdywOIMYfe/5oKcJr0AGpGLnyRqMtbEijFe5qbttdZzp1O8xzuJq u2gH+BiupR0oAX6ebTJe2bWsMbpcqRv025T6Z7rUmX9kTXdggc4iB4gdQPyEQ1B6xtq/ F4/Mo/MVOMEYenNWHV2sXXd5Vy+ZtzBMUmb0WVu9nKVHarsH/JQN/uagF8a06C7qRuPQ XEIQ== 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=WYMLxZz3q21wtAr0uqaZ8PHYehZSeLRe1kIlsfY4X3w=; b=QIlned5Fw/wFj6Z10jeQ3MmqBmfWWSRmF/a/75IYGntDf7J2Zy1t82OFb05x6WMhc4 ByJhsR4w6S/gKO3MzHp4cP/b3gnI/jdoRXMjZ50ofBW/z89TgqBi7kSIIYN0w3lge1SM Gen1rMsuncvJ83MqF4qbpQZ1S2cAy2GXM5bhn4PEKQXd4+mwPUrPr9YvZCjiQs2xP8HH lSW+n2sNxzi7/1CpTYjonl1ZIxN2kal+MUyzfhWmGiceWqm6BM2Ca6MtBauFfDKhkZ7t u9zwbgKuMlzOqCOLgQoBmM1sexahs2CJSwU9xIcpvJvwbPbsDLGEDuqY7rC8CDalzr5v Cytg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=a5+8GVX4; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.2.99 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0099.outbound.protection.outlook.com. [104.47.2.99]) by mx.google.com with ESMTPS id d41-v6si1260499pla.162.2018.07.03.08.11.55 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Jul 2018 08:11:56 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.2.99 as permitted sender) client-ip=104.47.2.99; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=a5+8GVX4; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.2.99 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=WYMLxZz3q21wtAr0uqaZ8PHYehZSeLRe1kIlsfY4X3w=; b=a5+8GVX4WAAVqe5E2ULEOuiJINl64Q+P1dd9nSoGcgwc5m6d3oU8gAlINalD/bDQxOvcWt5iFrkP3aV7i2gYFAVW1IuF+oQC5yfHSy2KHk6k4IR+ggknfHmjbroQFFp6h2ZTkg1iMGKpPCQMM9PUxP+qiDuFOhdrOMPepUwbuDA= Received: from localhost.localdomain (185.231.240.5) by DB6PR0801MB1334.eurprd08.prod.outlook.com (2603:10a6:4:a::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.18; Tue, 3 Jul 2018 15:11:51 +0000 Subject: [PATCH v8 17/17] mm: Clear shrinker bit if there are no objects related to memcg From: Kirill Tkhai <ktkhai@virtuozzo.com> To: vdavydov.dev@gmail.com, shakeelb@google.com, viro@zeniv.linux.org.uk, hannes@cmpxchg.org, mhocko@kernel.org, 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, akpm@linux-foundation.org, ktkhai@virtuozzo.com Date: Tue, 03 Jul 2018 18:11:48 +0300 Message-ID: <153063070859.1818.11870882950920963480.stgit@localhost.localdomain> In-Reply-To: <153063036670.1818.16010062622751502.stgit@localhost.localdomain> References: <153063036670.1818.16010062622751502.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: [185.231.240.5] X-ClientProxiedBy: VI1P193CA0015.EURP193.PROD.OUTLOOK.COM (2603:10a6:800:bd::25) To DB6PR0801MB1334.eurprd08.prod.outlook.com (2603:10a6:4:a::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ae705b7d-532e-430c-aa08-08d5e0f74fa9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DB6PR0801MB1334; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1334; 3:ptEWlPhrNOfqxgSkO0q3HhIEonK3coAtoZjhjrZJT4xoONtrNrL6eJOlzjh101zyt4XLm6hDKr6RVbRQKiScbXrZmoZ7nTTKGCwFPpxCIxamSdYWzilFrNuOKRaWZK+5Vrpf5kv/qqdrpgUpiAVsQyoK/qIaiCc76I8sep5ZQf1icFU/n3Rf75TEgd8+Z4Kvu6vvv0Tfn3Rq0tE5bliAXd3j4+B+Hn1l8qAm98rJMHr+0l/hngImw0xP973HfPB8; 25:oWph7baQrMRFIg6MpJNhIJtwh8+oWW5sa1uE8jh1I+i9byCZk8jB6icXQLDtAQXlV945kf9S9F/1eW7jMpLtuHOU9qd5J4AA1nj0wN3j1qPPUw0JKUh8wwxLdCcRY4xKONguYAhbrab6cdsAIIwyGuyiidDNtftiAmIpi5fqxjg6EF6evLgOGir3v+1guXR/MMdfUXobMz0jrdsg+AN13diQIgJrHy0FAVpZ4sr0bNbzM39wXXn8JRTAGtNeiMSjzgb0oVchYYEQ85T2GXytMMoE2N1XVfVZ3QdMZLaW2hpjmaF3X8nDUcaGHWPZNJI9EXqJY3R+KQjjRHsgXm//WA==; 31:LnL3G38rRT61lWTwDZtK749xtAXgvgEu0zy3IkOT1N/5lI05AxW4T9M+6VnkKgB19HFSlxBRTvH6XuNxIqpYeXzMLsVcLLUbJZ3Bq7l1Vj27wRvQMSJPV86Ber5Q3I3RekgJaDY2wTa0jdC9Wb9a4QVKTK5MKiuryyWa4WRLgrKXQhLkiH/PlOlMxG7fXoXDZZQB82Q51f8WzwMANZk/RXKMO8QxT4eCaePVkP3JBS8= X-MS-TrafficTypeDiagnostic: DB6PR0801MB1334: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1334; 20:7/eKlwzAwJHv3ghERPs1vF7yoX5So2WXbrP0R/GRX/yK3YQvHfV00kqSbzhtwlV8N265texzkMjjp1k6a8RBIM1A0FstYmFXqc3cBaBX5yCaKlPm7DFCZY3BWPiimxQpPJWaM6VzA2yEPNmizYSxvr1Br3f8cE5o7UrDYJjxgw4WUj0SXqvzAjRKK9QKjCVvJt4b5rzmIG+vHuGnGNP0e9Yt+/uMw9FIYJD2MPylsgpH3Z1oSWkHof2rsNkupzBlrZhQOnO5eXSTKa19c76wpav+BUYX07d3idFXz8GfVlQBiAnnhapzSR88vrw3gXjWPFquX/FrvztzV7ibNfJdshdZr4DlmvjtxZvEpt4tkv8oJXfvgLmWfKIFcApoADUswj/JzGPEYx62NQWVJ710Fg7M9aETGxZkWiZ6D5dfk6TQkK4KHInYwJfLGxzcs88yC71Cjtnl/4/jQne7f2WY5BeyqaciZ86qsPqLOHf5C7VFA1EkUug3peGUFfXmpaP5; 4:r/vOYBMO3XJIs1JiqCgitJLfS522LEO+mxIB6BRPMVgSDzUrCG49TRJuMSBwjLV+95HGJfmmIUdDoC40LlW2MPWGsA1jahsXMKPvr7dMZ8XDx4ulrZMGHN9JaeKRUvBh+0Ya5H5Hbp8ebDSHMQqaZpshOaKORiesZPlYlYSL1AG8gNfhSjPsWK8X3XDaHK3nOf5YcqgcQfquzykGUJZxP/xHG0GGKWzRoHhcY85sAAtdF9uz9SByXBhUteoSYHU8TbixdseYEkKpWaklNasFNNL/iJoc33+wWCT9cIv1gZpJFyqrWL0ihQQvLCmIk9jMs3hgvCGp6AKQUehUY/GqOXreA88M2SnmRjDM7tkx+9qCqP9kibVv5e+HhTZ7GjtfZ5UgsrvQg4FNfOpT2/KcFxq8vKzHsxlTYci3nAOzKxw= X-Microsoft-Antispam-PRVS: <DB6PR0801MB1334C73AF33E06A8FFDCAAD8CD420@DB6PR0801MB1334.eurprd08.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(20558992708506)(85827821059158)(211936372134217)(153496737603132); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231280)(944501410)(52105095)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:DB6PR0801MB1334; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0801MB1334; X-Forefront-PRVS: 0722981D2A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(136003)(376002)(366004)(396003)(39850400004)(346002)(189003)(199004)(53936002)(5660300001)(39060400002)(6116002)(3846002)(106356001)(23676004)(316002)(2486003)(86362001)(575784001)(478600001)(33896004)(7696005)(105586002)(52116002)(76176011)(6666003)(7736002)(50466002)(8936002)(305945005)(7416002)(81156014)(81166006)(230700001)(386003)(25786009)(2906002)(6506007)(8676002)(66066001)(103116003)(68736007)(97736004)(14444005)(486006)(26005)(186003)(956004)(58126008)(16526019)(9686003)(61506002)(47776003)(55016002)(446003)(476003)(11346002)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0801MB1334; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjA4MDFNQjEzMzQ7MjM6dHhteXJ4Z2YrYW5xOXVOYTlpVWVZd004?= =?utf-8?B?eXRVRlg3dWl0RU5XdnhwR3JJWEoxc1FwSkFpSG4zem56UjhVbUNWUStvZ0hN?= =?utf-8?B?NEowdGNiUXd6NlJqOEhxNXJqVmdBbjAvTENBY2U3VGxwSjVPUTRvNnMxZGNN?= =?utf-8?B?UnJpdm10Z0JJcWdSNUxYcU9rRlZlbjNubysrb3U4Y3F1VEFERjUyOWw2Mzhq?= =?utf-8?B?NmJZdHY4eEU4NFlVWEdOWStRdTM5M0kyTGFFQjlRSmZvOWVCbXpGc25tZFhk?= =?utf-8?B?N25VcW5iWnI5akdQVkU1eHdBL2ExS1Mzc01KRkhQeHNETzFjN2VjbzdPMEcx?= =?utf-8?B?R3ZzaDNQSTVhMD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f-8?B?ampud0d5UXoxaGNST0dEQVhuUzNlZVA2a1RVMTNpOXNSVUxkQ0xQV1RIVTlv?= =?utf-8?B?Yk9TTkF2ak13WmsrNlJjbzdlWWhRcEJmSjJSay90bVRINzhFdURIM1BHeU5K?= =?utf-8?B?Z0pJUUQ5aTY3RjZqN1NrY2RLZ09SZTNDSlNFaktiNkM3VjdMbXpTR3NaNkJ5?= =?utf-8?B?N2htTnIrVER6bi85b1pISXVuNWcrMHhNUGhuTTdVa215dWpyYzdpWERvRVJV?= =?utf-8?B?WTRLQTgydWFaUWdaemN5bVNNVjlEbXM3ZWdiTy9PUTVsZTBoTk5IZXFUeVAz?= =?utf-8?B?d2traWxUVXVydEF0UDMxSEgzem5FUkl1QUF5MTZEN2J2eFRxK0V0YmszNTRj?= =?utf-8?B?ZlNIdks1VEtoSmRvMjVKOGowQUNkTUtFQUxsbWw5Rm5IdEp1eXJubG4vZlFH?= =?utf-8?B?andSOWorUHU5RGRGTTVVWDdFU3ZoQW5waSsrQnNvZFNKcisvTmdpNzVXeVIy?= =?utf-8?Q?A4GAt0vo+WHSFGoYMKjgYCy4Jpnaw7VpZlyohz0=3D?= X-Microsoft-Antispam-Message-Info: MRHUZXXKpdddOyf6z6knxIeff7VvpbwIAtd9w15YqymDOuPmFHQduEUGXYVtLFw+jsqz0/Hs9wmS9AuqvJ/eFkKydoxGN48mFL8ffeR9F54lknAGrTAh7J3HV6dpo+708zbukMnUT4833Ie6qv59K5DAyORTZ3oApCsZ3Kz5JvF8FrQnpP7vMPPwU7dpiJomHMsIchwbursQP4Tl64wGqSzpeJbQiN3IdKQpLFXBBaZ+UvnYZH/lbyb2+A2+8r+lefwiP9jNk9qEcenhf+LifRsFmPyPDYjrflsvr/pwoS4zdaloCVFMLXenPaCT37eenZeyza61esehXzbmkMjGK890nfLExnhr6xj9L/lG2SA= X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1334; 6:yj2Q9djzk9sSK7JSJ484AWY4V2e7ms7XSHmjS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jO+94jUCUHnkRupnWmX5jw3oh9jM9K3HO7BtYupS/0CQfJFIfU6RWStLTykNDxyU5obJr2s4txfrY76g10CCs47pE6u8osXn5wpL3zpfOhlvfIsQHFHcfb3qPNalZM5G5h+fmN71bNVDAjiEU= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2018 15:11:51.3143 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ae705b7d-532e-430c-aa08-08d5e0f74fa9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1334 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: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index c6ea182ca54b..c79c4a54c0ee 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -1316,6 +1316,8 @@ static inline void memcg_set_shrinker_bit(struct mem_cgroup *memcg, rcu_read_lock(); map = rcu_dereference(memcg->nodeinfo[nid]->shrinker_map); + /* Pairs with smp mb in shrink_slab() */ + smp_mb__before_atomic(); set_bit(shrinker_id, map->map); rcu_read_unlock(); } diff --git a/mm/vmscan.c b/mm/vmscan.c index 96279b5f1f6d..45d153508d1c 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -597,8 +597,29 @@ static unsigned long shrink_slab_memcg(gfp_t gfp_mask, int nid, continue; ret = do_shrink_slab(&sc, shrinker, priority); - if (ret == SHRINK_EMPTY) - ret = 0; + if (ret == SHRINK_EMPTY) { + clear_bit(i, map->map); + /* + * After the shrinker reported that it had no objects to free, + * but before we cleared the corresponding bit in the memcg + * shrinker map, a new object might have been added. To make + * sure, we have the bit set in this case, we invoke the + * shrinker one more time and re-set the bit if it reports that + * it is not empty anymore. The memory barrier here pairs with + * the barrier in memcg_set_shrinker_bit(): + * + * list_lru_add() shrink_slab_memcg() + * list_add_tail() clear_bit() + * <MB> <MB> + * set_bit() do_shrink_slab() + */ + smp_mb__after_atomic(); + ret = do_shrink_slab(&sc, shrinker, priority); + if (ret == SHRINK_EMPTY) + ret = 0; + else + memcg_set_shrinker_bit(memcg, nid, i); + } freed += ret; if (rwsem_is_contended(&shrinker_rwsem)) {