From patchwork Tue Jul 3 15:09:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10504325 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 C346F601D3 for ; Tue, 3 Jul 2018 15:10:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEC9628B50 for ; Tue, 3 Jul 2018 15:10:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2E0928B5F; Tue, 3 Jul 2018 15:10:09 +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 0594228B50 for ; Tue, 3 Jul 2018 15:10:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7842D6B0281; Tue, 3 Jul 2018 11:10:07 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 75A616B0282; Tue, 3 Jul 2018 11:10:07 -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 5FB4C6B0283; Tue, 3 Jul 2018 11:10:07 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg0-f70.google.com (mail-pg0-f70.google.com [74.125.83.70]) by kanga.kvack.org (Postfix) with ESMTP id 130B16B0281 for ; Tue, 3 Jul 2018 11:10:07 -0400 (EDT) Received: by mail-pg0-f70.google.com with SMTP id w23-v6so1110468pgv.1 for ; Tue, 03 Jul 2018 08:10:07 -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=TMPtzsojoekgXneCfcFzOGmVnQ9EeB+30PcBR1e5KmA=; b=HAYDjME7oKPxvceNxMTMN1jN/o4oWep78V8Wdxho+dvGBWQzUy7VGnsaYGCLgQ970J WKZRePu55E2eSgTWPbyiVpPKgJd14L4qVhI6gJJxwMIkWzFWZ8f7tnW9M95toQ81QU6T xUKOzfC/Bf5q7JlYSWm+puNhnk7MRPePnjeNcoq6ErawcxUNx3XR7BdFXvncXWEaMhva JumNrdZht8fpzeZkTjW7iOiXSYa2zq1nYE53rQ61mLXUKcnunfJWmDZuPP3oOt5HKyYG oYFljeT6Co2PPx/WNfe9q9OkQ4Te9qEuJx5Knlg1OpkM+Ld2fXj4uh0pZxUfFlLlqpwB FZbw== X-Gm-Message-State: APt69E338ZwvXhe1/kmYdBccPNntjYJ/1zX8uY2JR9fVj4owfAtRMDum w01mtSS1y9oPRjbw9NL87He3gIpw8zTAReHQDyYy3icDM7gdqWHIBtWeGDw4QibPTCFvPW5k/Hp 3z2i90Mn5Fq7sO60HsVRHNVDbHpLWMXc3g3Tg7KBHixjRiLUr81MtD92nIiNLtr4Xew== X-Received: by 2002:a17:902:28ea:: with SMTP id f97-v6mr29619821plb.55.1530630606763; Tue, 03 Jul 2018 08:10:06 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJOuMjwDbXk/x+ITOPPriO5rgl5hbeCPQ60dAjAxCGpfn7v93wKcIEQjqWumNeN7bveCAzr X-Received: by 2002:a17:902:28ea:: with SMTP id f97-v6mr29619729plb.55.1530630605454; Tue, 03 Jul 2018 08:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530630605; cv=none; d=google.com; s=arc-20160816; b=mSb9g4u+GJn7Pbv4DEBo7zcwHjST4SMDdknYZU3YYXJapyv/vn6QoRig6ulxtvUeFA 8pJZ7fCH60rZ3UlRtSylDWxy7771AYsADxbXZyOxvl4JXvBFFpZExrdGHfPuw8MZ/gKm iGBbQGyBLyIEKf+dYA5o9Ew/5RA/qH9USqTa0dulBf33/iKn3wYVwv4C7/lh4AwA/JgN TuQoSK3jnV/kLyVrtyAa1qxip7pEEb19RFSCDZvSqzvUwMAS8aT8AaMYq+rFdaIon+9q vzTLO6hsrkg+9lD6nrvQB0TMumF1T4ApVCovpOXIC2Dfg3R1hzL6tNwTnYRBp+SFI4xh iFog== 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=TMPtzsojoekgXneCfcFzOGmVnQ9EeB+30PcBR1e5KmA=; b=ANWC7Yz4aAbm7a0S3CRD3GwSEKk/TNqy7fvXU5zfdP7hpTHHC63t7A2Tvs6M1Qk6bW rxSmNRnuhqydgW/+BMnDH/OhHYb2a6dld4FbDuk3VM9Ic/9K1cg1Dj5dXv7n1NhyJ0+b E60RajAupA5RHbJNFxge3SNqUGuyuQz73HNy6X6eN9C0bXQJPdSM/WWIAGfxi98gD7cH 61oZmfWgOcA4DAJB2FP1MKQjVTatgaR2FEIFi7CerfSARQ55PUkkTgPZWhSW1qarQMB0 89Nplv1E6oV+tqkS8Sc0uiWxPZ9l+OCKE0YC061jx6px8sJk59rmc0SCajXnxn3fZH+a DmNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=eoRbMdGL; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.6.124 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60124.outbound.protection.outlook.com. [40.107.6.124]) by mx.google.com with ESMTPS id o123-v6si1220069pgo.190.2018.07.03.08.10.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Jul 2018 08:10:05 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.6.124 as permitted sender) client-ip=40.107.6.124; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=eoRbMdGL; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.6.124 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=TMPtzsojoekgXneCfcFzOGmVnQ9EeB+30PcBR1e5KmA=; b=eoRbMdGL8I5zRW6y4Ab0vH0w+Di1Y3cH5n25FQGiOAAk3CtaAjA3iZZ9Vcq3y7ORh6qKqpurIYQKUIL7flRLlyIMQDED6QqhNccuIdoVECay3ncC2qZxKxKhjKwr89t43r9wdNsPcAU/Mk/BZYcoEZg3pv0n/TV2HopfWiw4jQs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (185.231.240.5) by DB6PR0801MB1336.eurprd08.prod.outlook.com (2603:10a6:4:b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.24; Tue, 3 Jul 2018 15:09:59 +0000 Subject: [PATCH v8 08/17] fs: Propagate shrinker::id to list_lru From: Kirill Tkhai 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:09:57 +0300 Message-ID: <153063059758.1818.14866596416857717800.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 X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: AM0PR02CA0028.eurprd02.prod.outlook.com (2603:10a6:208:3e::41) To DB6PR0801MB1336.eurprd08.prod.outlook.com (2603:10a6:4:b::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef02d6d3-15bc-4efc-09fe-08d5e0f70c66 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DB6PR0801MB1336; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1336; 3:8kXYxEFNpLoFlh6wE66Yth0sbqeFIehJr/fuj4cEfA0gkFklCMgSmIPdKolS3mpVF9rt2N0zSy5EhPpTtFgs+J0RNfva5xtLYLoqyWlpWYf9zei/YRgKp4rMDWONDxlk2pUdh5ox7acba0vbhv/4h5Wg0xS9NSy0oQolGnefmFcg6rcQWTCRQ9HfxYU/rfMbll+N3soNZRsBW+ADMDw2hVsoRRewCqVmo76LxHcMjgQ7mUgAjXb4JrtRRRbAkgQU; 25:EpEnoxcAZMcxXL48K8rL0vBIJo75aa/S8U7e1qThu1+bhov8dbyoNKTaGzQ5f6A4UOMlviGpwOPwjLhE6jErtMZOnLgOABtX/cujnNjqBAKQFCmj4j7jBIFekUIJzmZW6RHLYVJ6TlHiyL2hHPKsCraQAknSDwSIq0FjCBAD0OvTyArX+xB40CIcqCmMUFjB4TRaNG5afSnPiHIKNeg59g244acDAPkSPQWvv27YhlPD9MwlBWB1CXyFlZWyty/BSl9hARmaNWqmsPZ6q2U+D1J9wd4PJLfujHO86jUA1VLsP2NIebUU1uoSxbYLTPbrSDfJI6VW7051YfcCocx8Yw==; 31:h20K/1Rc82hxYPGvy0lej3Ua6WWaBb3w+q3AOXh2RLbmsl3wgmTucWRrQtgibyH0ssIpCrFwVPAiKGonhLntoHLAZXnrvRuRXzJGwUdSxH72WmdM93LO5xC1ujK+YLLaQ0U6bNA1iJowTRqCU32N+nuxIFqeyTH4LE4YQF+rett1PDLR4YDdCixMTrlcx8k0C74xXomFsfoAJir0krZTeZSLzfbcA/XalRwJ2nQ+dKM= X-MS-TrafficTypeDiagnostic: DB6PR0801MB1336: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1336; 20:tDIoR3oaX1uKzV+zOXwx6DmKHVt4NboDRMiNyWCtXQitF7juVLY7XbhO3jj8/5kXemaqI9KRxLzunDqWBMxTMqaTkZwykFA8B88dfJRcsS8wKmAX+1BuwoAnRY38+/kpn8qK0Bh6SgHH2+Rne+sNvJRnQvzvK1V419DVI0N7CBUozLhLXePrLWet/xKncEC+ohwMwS88yHjJFkmrczbskR4khN2aeYxj83vR0AxjXl1t02G05QMHxYweVDYsC26YIK3iG41OaGspHEF44K1y2+/2i+tVK/sceD3lfMBtNyDBnC5+ejHmmZdajKcoKJilel1ryIenyH+NNkYT6TVZ1ZgPumowmxVFwbPUaB6syOxPVCmm0teayP3MuPGMVdG/wGSQRoEXrWo+JIh8OV8IFAEyE3ojkrSwEu4iVr5Pd6PVT11OLFrdAFDeojkjvNT8cGBgreeEBf8s+eqB9K726JCKMwGwrjvTY0cD/BOfV44daj4RfK/TTbUoYkhnUSMZ; 4:j+s/ioJ79MGyI4ux/DpH5DqWhSMSpQB2C5YOdpFbqJ6uk0oxtT7D32yWfLNRjM7xieje9k4CHCQeCIaIppY3O5ZA+YYp0PCUeOSGrccz6I7vHDJKFcQeeeR3AqLjnVS/rney25bpANXKqIv7BRlcUoGx3ojYB2OOzbpNfbiO6xRBJM7my6OPpgKzoQZY65qm8WmIxBLN6oxp1QifJ9OMO3O+OlFiA6npJAhB/UwTf7JX2Cj39i42SzhTEgKAbZQiUcjSBdbBeMkqKzaP5Z176et8smtqtjTI1oEvRAi3kpPklJ4yOcM0LZMvkPvc14JKa5JPoLA4j7FzrdPXR/sL77dx9upkaNMtZnj8bJKwwEFfajH8AeH3+YDeND/h89C6VJ16UlycHSQgtK2gzj1jYwOIHmk8DbcspFftyIMT7WU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85827821059158)(211936372134217)(153496737603132)(17755550239193); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231254)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:DB6PR0801MB1336; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0801MB1336; X-Forefront-PRVS: 0722981D2A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(366004)(39850400004)(136003)(376002)(346002)(396003)(199004)(189003)(478600001)(26005)(16526019)(2906002)(23676004)(14444005)(103116003)(39060400002)(186003)(66066001)(47776003)(2486003)(7696005)(53936002)(55016002)(52116002)(6116002)(105586002)(25786009)(106356001)(3846002)(5660300001)(8676002)(97736004)(50466002)(68736007)(8936002)(316002)(956004)(476003)(7416002)(81166006)(446003)(11346002)(230700001)(61506002)(9686003)(76176011)(386003)(7736002)(81156014)(58126008)(305945005)(486006)(86362001)(6506007)(33896004)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0801MB1336; 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?MTtEQjZQUjA4MDFNQjEzMzY7MjM6SVlCZnZ1SGdBQVdncnJUMGxGVjJtRlF1?= =?utf-8?B?aEJHbDVDbUM4WXgvdzRVVmszNWQ0OG13NFpvcTRWcmNHRlNpeU9ncTJINmMw?= =?utf-8?B?UGhIY3EyalNHN2ZrYUJZbTRpV3FPbVR6ZVQrekhPU0oxNmZjYjQwa0R5Wjla?= =?utf-8?B?Wm9oNE0xb2dQakQvcVF6US9WTkFnWUZuQUtqTmppVkY0MkdYWWVSakZxWmFp?= =?utf-8?B?aUNDTGUzOVZNaVRBamhnSTFyNGR1YU10VnFDZWlZUVI0WEE1YUE4MjhseGVU?= =?utf-8?B?MlFVVkF3Y3ArNVI1aGpxTG1jR2Q1Zyt3aEgxQzdiLzZDMDBIalBvSTIxemVU?= =?utf-8?B?QUZKTm00aGYzN1BZSFdRblZSOVRadnl1a0hZT2VUTjdURHZDRjlNdExmcnd1?= =?utf-8?B?MUI5djdyamc1dTVFeEtJSHFXTDVrOHpjcjVWdkROM0NVSlBUV0Z5SVQyUHNR?= =?utf-8?B?S1N2UHlKTDJxTGhZYlcwRkI1eGd3cU1QUWhXdVpNYXJvRitCU2tvVk9ENWJj?= =?utf-8?B?cit6SUYxN3RXSFpOUW92d2lTRm83V1ZoRFZXa3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kKqwASay8n0svw7sJWl8Td26IosYMVTQ7PQHZw6SRR1BdmR8loIPDc1izZLpiu6Je1pNkgY68U6/ThuphM+VUJ1QB5WYh6Z7Kt97WJULZp/fDtAoNy/qOrsST6A==; 5:f/0YFjLDZPoPCdyrDvH12AzCsYDf7OfyHVJPeFlPAFGyFkkWasJXmyZ+/VA8/DI6poZdW9VE8dnoSL4wxA/Ho5UYQ7zH6u7QwRMm2oObnCdg3/zmnEd1CRj+eefbnJMwSUn+BrbjcnrChtwx9kv4uyddk6UvVFaVTmSTjpQDyG0=; 24:oKVJUqQUzsKNxOjgjLNF1RghkKVxZoJKaNo5R6p8d+J8Fc0RXGsH4SCmohAdYSiuzuRlJgn72onvBIKxfXDdr/CbhT26qyrn5Iu5M8rc1+Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1336; 7:sE6jyPDJfP3g+vqb4Q4TTIGDGZ1VQXYeIMvZtYdLcPSZMbtLH6t6USck6TsVUFJjQZESoYWXLpk+1pChBObHht4zFFgjzvy0ujwokQ5GsEG+GcAoFpxP4hZAZbKIxA16rYQoqZTSxh5p+c9NHks+YBvesx48lX0bRr6AyqeajQjDhXM9PVqojl5qBMPTqgBIdoFXoDxL67F9gIpxxrN3jFu/xyK6oOpciGxcRvbUelO1AM/Iso9h6Sa1ZQhK9YAd; 20:VH5RY5uRe5D3pQeoA84yhnofNdeG5Mff9N729Hh1O7nr3M+kCbqLR/s0kozb81iyBGung+Tm9Uqi4ItsCMBrm+80T0KqbtIMzooFJtiLq34jJUhuKhlQSUcEouMmYsfvwdlBgO5yNiPSBdXVh4fHnum9FKQJnaAeHvJljhC2IDI= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2018 15:09:59.3985 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef02d6d3-15bc-4efc-09fe-08d5e0f70c66 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1336 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 The patch adds list_lru::shrinker_id field, and populates it by registered shrinker id. This will be used to set correct bit in memcg shrinkers map by lru code in next patches, after there appeared the first related to memcg element in list_lru. Signed-off-by: Kirill Tkhai Acked-by: Vladimir Davydov Tested-by: Shakeel Butt --- fs/super.c | 4 ++-- include/linux/list_lru.h | 17 +++++++++-------- mm/list_lru.c | 11 ++++++++++- mm/workingset.c | 3 ++- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/fs/super.c b/fs/super.c index 002e46d874da..f858178f74fe 100644 --- a/fs/super.c +++ b/fs/super.c @@ -260,9 +260,9 @@ static struct super_block *alloc_super(struct fs_context *fc) s->s_shrink.flags = SHRINKER_NUMA_AWARE | SHRINKER_MEMCG_AWARE; if (prealloc_shrinker(&s->s_shrink)) goto fail; - if (list_lru_init_memcg(&s->s_dentry_lru)) + if (list_lru_init_memcg(&s->s_dentry_lru, &s->s_shrink)) goto fail; - if (list_lru_init_memcg(&s->s_inode_lru)) + if (list_lru_init_memcg(&s->s_inode_lru, &s->s_shrink)) goto fail; return s; diff --git a/include/linux/list_lru.h b/include/linux/list_lru.h index 5d7f951f4f32..c4cdda4dffa0 100644 --- a/include/linux/list_lru.h +++ b/include/linux/list_lru.h @@ -54,19 +54,20 @@ struct list_lru { bool lock_irq; #ifdef CONFIG_MEMCG_KMEM struct list_head list; + int shrinker_id; #endif }; void list_lru_destroy(struct list_lru *lru); int __list_lru_init(struct list_lru *lru, bool memcg_aware, bool lock_irq, - struct lock_class_key *key); - -#define list_lru_init(lru) __list_lru_init((lru), false, false, \ - NULL) -#define list_lru_init_key(lru, key) __list_lru_init((lru), false, false, \ - (key)) -#define list_lru_init_memcg(lru) __list_lru_init((lru), true, false, \ - NULL) + struct lock_class_key *key, struct shrinker *shrinker); + +#define list_lru_init(lru) \ + __list_lru_init((lru), false, false, NULL, NULL) +#define list_lru_init_key(lru, key) \ + __list_lru_init((lru), false, false, (key), NULL) +#define list_lru_init_memcg(lru, shrinker) \ + __list_lru_init((lru), true, false, NULL, shrinker) int memcg_update_all_list_lrus(int num_memcgs); void memcg_drain_all_list_lrus(int src_idx, int dst_idx); diff --git a/mm/list_lru.c b/mm/list_lru.c index 6743cdb76ea6..f8ae4a04ef36 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -559,12 +559,18 @@ static void memcg_destroy_list_lru(struct list_lru *lru) #endif /* CONFIG_MEMCG_KMEM */ int __list_lru_init(struct list_lru *lru, bool memcg_aware, bool lock_irq, - struct lock_class_key *key) + struct lock_class_key *key, struct shrinker *shrinker) { int i; size_t size = sizeof(*lru->node) * nr_node_ids; int err = -ENOMEM; +#ifdef CONFIG_MEMCG_KMEM + if (shrinker) + lru->shrinker_id = shrinker->id; + else + lru->shrinker_id = -1; +#endif memcg_get_cache_ids(); lru->node = kzalloc(size, GFP_KERNEL); @@ -607,6 +613,9 @@ void list_lru_destroy(struct list_lru *lru) kfree(lru->node); lru->node = NULL; +#ifdef CONFIG_MEMCG_KMEM + lru->shrinker_id = -1; +#endif memcg_put_cache_ids(); } EXPORT_SYMBOL_GPL(list_lru_destroy); diff --git a/mm/workingset.c b/mm/workingset.c index b16489c60471..a682306db49b 100644 --- a/mm/workingset.c +++ b/mm/workingset.c @@ -511,7 +511,8 @@ static int __init workingset_init(void) if (ret) goto err; /* list_lru lock nests inside the IRQ-safe i_pages lock */ - ret = __list_lru_init(&shadow_nodes, true, true, &shadow_nodes_key); + ret = __list_lru_init(&shadow_nodes, true, true, &shadow_nodes_key, + &workingset_shadow_shrinker); if (ret) goto err_list_lru; register_shrinker_prepared(&workingset_shadow_shrinker);