From patchwork Wed May 9 11:57:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10389267 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 75A7760318 for ; Wed, 9 May 2018 11:58:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6447D287F8 for ; Wed, 9 May 2018 11:58:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 583BE288B4; Wed, 9 May 2018 11:58: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 ABF74287F8 for ; Wed, 9 May 2018 11:58:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8CD5F6B04F7; Wed, 9 May 2018 07:57:59 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8A27E6B04FA; Wed, 9 May 2018 07:57:59 -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 71E4D6B04FB; Wed, 9 May 2018 07:57:59 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg0-f69.google.com (mail-pg0-f69.google.com [74.125.83.69]) by kanga.kvack.org (Postfix) with ESMTP id 245466B04F7 for ; Wed, 9 May 2018 07:57:59 -0400 (EDT) Received: by mail-pg0-f69.google.com with SMTP id f19-v6so19648995pgv.4 for ; Wed, 09 May 2018 04:57:59 -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=QcMWtAEy+0VHDZmDG6jQCfIQudxP7WG5YAbPgRBEqd0=; b=X3kzjNK8BVSes/NL+MZFOK9ijCYzOoOhE8UZ/fgMQTG6pg0Dxmbj6mLZLczYGkjmtt 0qjVk5Q26K+IrmFnscCTari70FUWi8LRL+HLVhJ9BsLBZfUilWwWEmGZFOy4T/iWSf4Q JDokfnZ9/6jTMbNOLEjV9VD9tZXjEqLpMed8BDDp2avUaVEw1Hj8NhqVi9ujqEgXFD43 VTsrq/NVAJa5gX85+nwhgbeHs4oCIgJ/DAXy3zfQFYKgi/xS4nkhT9Mnjj6lP9NMCKs/ XmMsXlIa5tjSaz6iXRsFiS8EBnRJv86goHWpbTqu4KGo3qv1fsBNYc7QG44A9ayQBkrw N31g== X-Gm-Message-State: ALQs6tAIKwojEesqGCvj/Cp9eVhVh1Z/zbHYzDwAnbDzx71VE0R2A1cX IWjD9GPV8htPFBAl51zQTDZT36iufQHIw8XD7xDJTCoFoUmvK/kaFMiUlbI3hGPN4Wh8aTEdjwE PKbI1Oect/DdEYu8HG6UGLgvbxBNflUp6AfOwT2E+3KY4IWZ8ns/TxS+xUeOFUucBnw== X-Received: by 2002:a65:488c:: with SMTP id n12-v6mr35871466pgs.155.1525867078823; Wed, 09 May 2018 04:57:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo6KIxtp1sB/2Cqc8MQSP6JHdWIQVf09Qlzt5V2LvccSEQS+sDS+fAH8h3ArX0/KEyh7lcV X-Received: by 2002:a65:488c:: with SMTP id n12-v6mr35871424pgs.155.1525867078092; Wed, 09 May 2018 04:57:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525867078; cv=none; d=google.com; s=arc-20160816; b=dPAVoY4Ht2obMdSei1WjgO00fRFrwW1pgUJ/i6uLzIOvXMHp4e29eZ4STAlbbG2Fct SeCi2OMoZ0L5S3pAnSvSBnjvQ5mhg8BPbFRrL9Yt7YFq0p2e/ZFacLDBDkYz0jy70NrX kaJexGjSgRcybDrrghRa691GjjlC7hMyUpuFpbZZnHWyk1YNVT9c/OKoS+6brooPo+vH 56zAeLnQm3a8DE9yAGvrz7sMCZU3dYS+MJrssCTdFt+exl5ueyoF0DdsuQ+AFJPCq2MK HC9J+rLtqBfOpkMKBKp4AYRm6XY7aj7U4MGy62al7xlJNRDhyie84RZVkc36jhIRgA3d VFRg== 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=QcMWtAEy+0VHDZmDG6jQCfIQudxP7WG5YAbPgRBEqd0=; b=PqZFtkG/p/p7OrCYGXsW17pLqDOlp8Lrr1a4+KPysq/UXvmCQ4gniMvZv96hiSM8yF OsnZU2DPfqos/IrILeYPvUeObURTQ+KVUkjDWF4zhrGjdvB4Cbw6faJ8v/CqKxXSs5Q9 N6t7Pf5WyJmuckygl7E3XOL0pHNLqrxaEUp1KU4CL8JyAu5BedBIffhOUizTAS+PcfjU w55gc1BFBcED4677ZK/UOJGg4K+lzKRTGLg6qf/bLGZk5/TVcrHSAHaMOLEbHHSDVouY Hwh7lyOseOFDM/MNs86se1laggebGq5+Z7JZewaHYLkIjPLEub8bXFSaSAhSjeSI1y3M 0UJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=e8NYrCOG; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.112 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-he1eur01on0112.outbound.protection.outlook.com. [104.47.0.112]) by mx.google.com with ESMTPS id q15-v6si21507344pgc.303.2018.05.09.04.57.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 May 2018 04:57:58 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.112 as permitted sender) client-ip=104.47.0.112; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=e8NYrCOG; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.112 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; bh=QcMWtAEy+0VHDZmDG6jQCfIQudxP7WG5YAbPgRBEqd0=; b=e8NYrCOGlf5x6Ph5m+/nF4ATKvwcxSojaUTSLH3H3ldp7QCzOrl1glQ8aPsfNsAL3fSmOxF8z26XEC7h5vzWBpQuMWA9zFlPUsjQMWKLBH0BaswmUWtTqVSzC9DwYNlY5qi1WWNR7Uqh5BAz/wCrVuE5RZRCiyl/hsVjcnDNMxM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (195.214.232.6) by AM5PR0801MB1330.eurprd08.prod.outlook.com (2603:10a6:203:1f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.755.16; Wed, 9 May 2018 11:57:51 +0000 Subject: [PATCH v4 06/13] fs: Propagate shrinker::id to list_lru 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: Wed, 09 May 2018 14:57:48 +0300 Message-ID: <152586706851.3048.15461278706880255477.stgit@localhost.localdomain> In-Reply-To: <152586686544.3048.15776787801312398314.stgit@localhost.localdomain> References: <152586686544.3048.15776787801312398314.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR02CA0097.eurprd02.prod.outlook.com (2603:10a6:7:29::26) To AM5PR0801MB1330.eurprd08.prod.outlook.com (2603:10a6:203:1f::8) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:AM5PR0801MB1330; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1330; 3:5vJHU26FVLrmLAvpamPck4kh76hTYguiBHfHKJkl4YjmoK/k44JziU2XjIRQ28KvpSY0gQOSnjqy2no37VkF25xNdAuD3cj+H6t0YigmATdo+0DmFtZuZs92C7hY/3m3w8hmEVhhbLQEEb/d7HwW6VAmBz6K5SPNRvMBrKgXAUqPlUA1jHk+YZtIIbTKHrha76orKynvjbwUUyue7nTyzhiWgegEkzZaavablRArRpy0FU/45JNyj4MlkQx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DjHxgYKpzq6oScMr8mNW9X2rwf5Sw3R5Ac5jQ/F8AmoU6e/FVJlPbCIxaJGf2Sqs2hjsZGVWyg2vswYQtLJ0kfO4f; 4:WLK3iWcPccPI2B+RQrLcsGI8hmcJ8+s6oNmlX0Dhb//JjJd/cXq+uB+NrSEfvhmxKrRmOHsWyaScnyuDdk7r3fA004HoKCFAltg+bqMUrluDJX1eFR9IYBh10GhyV0zc+ijIOmab1KzFxlZggROLjL3GwoJeUa/DaghN5No86kHsWQm3AepvyCrga+yIN4mjB38jNtE+t6bCtGD+nB9ZMdCkIJTiil4K7r7yNHW4GPECsqkgWFgEthlI+6/WyZTqQExcBhasfp4tfx1ucYJKUg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:AM5PR0801MB1330; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0801MB1330; X-Forefront-PRVS: 0667289FF8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(39380400002)(376002)(346002)(396003)(39850400004)(366004)(199004)(189003)(2906002)(186003)(230700001)(6666003)(305945005)(103116003)(86362001)(6636002)(7736002)(478600001)(11346002)(16526019)(58126008)(53936002)(476003)(6506007)(106356001)(39060400002)(956004)(105586002)(68736007)(5660300001)(7416002)(2486003)(446003)(25786009)(486006)(61506002)(316002)(97736004)(55016002)(23676004)(52116002)(7696005)(81156014)(81166006)(47776003)(8676002)(8936002)(50466002)(33896004)(26005)(386003)(9686003)(55236004)(6116002)(76176011)(66066001)(3846002)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1330; 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?MTtBTTVQUjA4MDFNQjEzMzA7MjM6cVA2T1J0WVliRmkrMURIUk1GZGFVWU5z?= =?utf-8?B?dG5wbmNzUmp3TUJJZEdSNFR4RmdtcWhPSTUzak1neXZhZTFYRmtVbHUyemlR?= =?utf-8?B?VFdXZTNUL3FEUzZGU2FsOTNEUGc1eTNCcVMwMkZFNFM5WXE0LzlsZ0pjeUdG?= =?utf-8?B?QWF4bWNMV1dTL3BoTGlOYWM1ZFBpWmw3Y1h5c2RZTnkzckg2TERsbDVkckRF?= =?utf-8?B?eUswcCszWnpYWGhYaVlFOGpjWW9TWE9rNGpmTHQxUHRPUnVJTEdLSlBDckdC?= =?utf-8?B?Ry91QUhkSVFCUWJiK09jVWtCNlZjSFJXNTJxSDFSQjRSRko3U0x4TEdaanlN?= =?utf-8?B?MzJxZVZBMUovRzUxWXVJT2JVQisraTBTYVNKVE02WlFEUFhBamFhRkgvam5J?= =?utf-8?B?T215ci9wSWt5cTl0QlBWVEZJME5hL2RRTkphNXErWUUxM3FPK1plRmJSN2g5?= =?utf-8?B?d1RLTGt4Ny9vMjdhMXhLelI2Y1FOL1JpSU1CVHZ5TE12QVpnUlUwcDliTS9O?= =?utf-8?B?L1hsek56aXZlWW1PTUE1aEkxY01Hckc0akM5cFNtWTQwbWVabVp2KzRvcDZz?= =?utf-8?B?YThRQVphK1pCMHRhTGMyNUNKRUNQUldydzBwTmdaaGFxVDNFTXZ2eXhia2l4?= =?utf-8?B?MUxndkFIVGJIa2ZxVEl6Uy9oRVdDVGNEQ1NSTWFTNUJZcDA2MFUraXVFN1pP?= =?utf-8?B?SnhrN01CWmRUWTZobFpFUHJrc0dQMlZDcjNYejZSSFFkdSs2Z3IrWkgrV2k5?= =?utf-8?B?alZPWG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LqQsKfM/h8A6FB7D9mabCSVlo0Jc1EyRtIn+8cFDLfNpGHAya9cgcW7964Jwiu54xeLWI2sHxazB0LinK1Fp9Bun6YTuvIIyx5uwh3OEBk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1330; 7:ANrm2NUe8+StToUxo8YAI76zfIP4r9iJ4O55ea/596PVR4+L83lqxbAYPa+2rmGXCayzP0CGHh/1+ggf5L/sE965xwiXqvp2so/zVVkN+QE0cTe2w0ehI0TQCI6xoAswxbqcU4Jy28ttndGkDn5lfwxQW4ZpRghCTbow62G+bR7trIOsL64JcbcGzCYgt1I+csG94H3jWywYiN9uNj4C/arGUabe+OcgdFTnndR0oeT8YubSOWJNrIhu3pYM2Tra; 20:m36MRCVjBz9OReJ3uApy2GFTfQZsdHj73uIh4SYiHAPfTbyheB6nONbiMdw8mp8/wPgNGvufzKIRyX82YN+BaJYUlvyQosDiouE+jTHTFe83SPOOUa87XRCimwQ45hbeD/TaHhUROWW4Do95E6JxGMh9BuZlBx8vYTDa458Jg9I= X-MS-Office365-Filtering-Correlation-Id: e1750353-0292-4aff-9236-08d5b5a418b5 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2018 11:57:51.9885 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1750353-0292-4aff-9236-08d5b5a418b5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1330 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 --- fs/super.c | 4 ++++ include/linux/list_lru.h | 1 + mm/list_lru.c | 6 ++++++ mm/workingset.c | 3 +++ 4 files changed, 14 insertions(+) diff --git a/fs/super.c b/fs/super.c index d95fa174edab..c9a6ef33a98b 100644 --- a/fs/super.c +++ b/fs/super.c @@ -258,6 +258,10 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags, goto fail; if (list_lru_init_memcg(&s->s_inode_lru)) goto fail; +#if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB) + s->s_dentry_lru.shrinker_id = s->s_shrink.id; + s->s_inode_lru.shrinker_id = s->s_shrink.id; +#endif return s; fail: diff --git a/include/linux/list_lru.h b/include/linux/list_lru.h index 96def9d15b1b..f5b6bb7a8670 100644 --- a/include/linux/list_lru.h +++ b/include/linux/list_lru.h @@ -53,6 +53,7 @@ struct list_lru { struct list_lru_node *node; #if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB) struct list_head list; + int shrinker_id; #endif }; diff --git a/mm/list_lru.c b/mm/list_lru.c index d9c84c5bda1d..2a4d29491947 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -567,6 +567,9 @@ int __list_lru_init(struct list_lru *lru, bool memcg_aware, size_t size = sizeof(*lru->node) * nr_node_ids; int err = -ENOMEM; +#if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB) + lru->shrinker_id = -1; +#endif memcg_get_cache_ids(); lru->node = kzalloc(size, GFP_KERNEL); @@ -609,6 +612,9 @@ void list_lru_destroy(struct list_lru *lru) kfree(lru->node); lru->node = NULL; +#if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB) + 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 c3a4fe145bb7..b8900573db25 100644 --- a/mm/workingset.c +++ b/mm/workingset.c @@ -534,6 +534,9 @@ static int __init workingset_init(void) ret = __list_lru_init(&shadow_nodes, true, &shadow_nodes_key); if (ret) goto err_list_lru; +#if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB) + shadow_nodes.shrinker_id = workingset_shadow_shrinker.id; +#endif register_shrinker_prepared(&workingset_shadow_shrinker); return 0; err_list_lru: