From patchwork Mon Jun 18 09:46:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10470543 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 7C1BA6029B for ; Mon, 18 Jun 2018 09:46:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A88728474 for ; Mon, 18 Jun 2018 09:46:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DCE32899F; Mon, 18 Jun 2018 09:46:23 +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 0FEB528474 for ; Mon, 18 Jun 2018 09:46:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 102656B0008; Mon, 18 Jun 2018 05:46:21 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0A3C46B0270; Mon, 18 Jun 2018 05:46:21 -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 E61836B0271; Mon, 18 Jun 2018 05:46:20 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-it0-f71.google.com (mail-it0-f71.google.com [209.85.214.71]) by kanga.kvack.org (Postfix) with ESMTP id B9E366B0008 for ; Mon, 18 Jun 2018 05:46:20 -0400 (EDT) Received: by mail-it0-f71.google.com with SMTP id 7-v6so7905236ita.0 for ; Mon, 18 Jun 2018 02:46:20 -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=CDgGBmo2eJjnmVlU73uiwIVsw2prgfEKX1PzIFaqDBI=; b=Mg1RDXg8Am7gtc8I0o0IpOa7/0GYOzb2YjMwsPSihjpY3hIMOarakZR6i1rZgVou09 jllpYCjgsKniQmFJhOyy47ypGb0pY14SEZz+XSi6Df1a+YIOawS9OtBlkZluWMqKLciU ZsZPry0bn3Et5aqqUu5kChOK0TNWUsxjmTPQdMe868mtvCDkYKNzjejXvxiStbOi8mfV j2bMU2JkD/we5iQj9rzOlRIPnN1lJyun6F3ESDSAgpaW2yTPktUImLEQGBIuIXvAEcpx M5Q5/sFPpX06onzSoxOTT+PQ8t2MBQCMY4iq6c2cq7lj5g+EraDRr+mS8k8zMS9k/SPV CYgA== X-Gm-Message-State: APt69E1iHCeZqaIZgNKSgDBep9AdzTZG/6PmnAPc4e1Vyzlffs82NGAY JHWWjBUYTc2QGgZ/RgMRVaoNL94YYclHJqY1TW0zDWdPgl9ltACGEUpogz6MZaxM9Y/IoRoZ7VQ cZzNN/rsIm2aKPlfZ9xPvN0NYZrATIvA/JySGd1TeZRbwGFzgET6Pvl+3K306COypzQ== X-Received: by 2002:a6b:8dd8:: with SMTP id p207-v6mr9812848iod.303.1529315180523; Mon, 18 Jun 2018 02:46:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIApjIubN2dfcOUohrxlFHbCWc/wy+JIf3ecfARCJRfBnuyYzhSrX5mKEqJfV3LbGjHLDDN X-Received: by 2002:a6b:8dd8:: with SMTP id p207-v6mr9812817iod.303.1529315179757; Mon, 18 Jun 2018 02:46:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529315179; cv=none; d=google.com; s=arc-20160816; b=yxWKW50NP6BsVCWKCiOthFMxuCHokv6VDS+eTbohF7qnOnDnTzS8jmcCSfx6pBSvu8 6/jLkHJ1G7KnOG9x/qZQvEUe30y5b9fOaoBgmpV50uRosqp5wlQT3v4xlLOLGwM65u8F NnVxUm4f6Am25wAk6+UdKsQWjddNVYFYywTMlXS9tzn8PJjnJthdOc1gSXgerkhQOZvs rWdE13MBK3xyDQFVJjCtjoMFGXy2F1NRTqSYCLz+MjM0BOfSg14oIxNyJNzt9LJAYhwk 9DemkAt6BFrJtDf7kz9/ncgCNdEbEyj+7nUvnAYCLOBfclFZDwXjxT5KyRS55V4im8yy WfKQ== 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=CDgGBmo2eJjnmVlU73uiwIVsw2prgfEKX1PzIFaqDBI=; b=qvuN5sqWc506BZidPqrUHNClE9wEJKKGBF8IeIxpEdmIh/G9osyU3lI8fQ0NQoYvLv ZESC8WVbR4peJco2/VdWcCkuxhvo1oEfi4GvbYJQ/eVLK14tL/4UTSJVuCh7kj4WOaQE GCi/os63fuXuyEqmq5h+osEBK5QbIVHyhYFyzbl3e2my2vzsVU9HXTCDMeN+juJh3mqx ZY5N4LxVaMnFYQyF46WKuNMr20bN/lH/m6e0ADhn1JihTtt4mYWOCVQjvjDydtvqfUIz OedvAwfCq6kFDwmQCDfCWdHC55+50Qi1Znqu+gZAxki8oWKwQke+yaIE5h/BxEIXLKB9 mkrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=SlsTelIQ; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.96 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-he1eur01on0096.outbound.protection.outlook.com. [104.47.0.96]) by mx.google.com with ESMTPS id w186-v6si6174735itw.142.2018.06.18.02.46.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jun 2018 02:46:19 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.96 as permitted sender) client-ip=104.47.0.96; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=SlsTelIQ; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.96 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=CDgGBmo2eJjnmVlU73uiwIVsw2prgfEKX1PzIFaqDBI=; b=SlsTelIQ+aqa4Sj1DEuF7BOf+KlBK6l2MJMMdOFsiYQ9RIDAOSjvM3VjR9Zt3FE19vCOqfBetTefJmo4pUu4eqYCiW2hUF32/9+4tZ1wg0hDPORU++TCTPJo0NbMo9x8vHLlq2PzY6ctUREn2iGwdRH8J+dV/7yxA72wHP3N35I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (195.214.232.6) by DB6PR0801MB1333.eurprd08.prod.outlook.com (2603:10a6:4:a::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.14; Mon, 18 Jun 2018 09:46:12 +0000 Subject: [PATCH v7 REBASED 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 Date: Mon, 18 Jun 2018 12:46:08 +0300 Message-ID: <152931516881.28457.17649784047022122337.stgit@localhost.localdomain> In-Reply-To: <152931506756.28457.5620076974981468927.stgit@localhost.localdomain> References: <152931506756.28457.5620076974981468927.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR08CA0066.eurprd08.prod.outlook.com (2603:10a6:7:2a::37) To DB6PR0801MB1333.eurprd08.prod.outlook.com (2603:10a6:4:a::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5665cc04-85a8-43de-0d85-08d5d5005519 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:DB6PR0801MB1333; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1333; 3:vG230BU4EfEH5vwCtar+713VC2WvgIaqR9O0apbhMqjH8KYJTHjBLBPgF72GkUm+Bzn/6g/GRd3kEO0W45vb+6UeRwCK9JAoW0n4zC0ULwyZ0YG4DDqqnXLp6NNEZ/hZWm0dWmd7ObVmfuJKKMgmCvCLG86n9s2EK+9ew9SP6usHgpBK1h0Vu7Zan1CieHCQt023CBrPV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ihQBv95uQDJw/ohavKEmqO6ycpnFI0gY6q0wx4fzidaGi5aKcdkyjrr7aeWmfNALyzaXKqc21HhMts5c08rgV6jwHjnh9xrkH5R2MbRBDLRbWJyqXW6/Njs6Ka5jjGUbp05b5+EZEuSZL/MeDsMARLom; 4:1uPhKNqmllulzXnJIg4BCfETUhGG37hbH1ouGsUL7ie8k9H849qcxtVWs0txvCIrNP1rGz/8ZSnaLMh5AHRN4ufzGN3upkxmd0SrtiY8Xr4oOqndnhpvK3sO3gfq9GKFw+8lRB+ErHsmNordekuY6BZWFKPyPbGVf9J7WLLXisFn8++F1YAyTcYQ1535luJB0MQhgqD5V+wMKkb/7Ry/V/Gy7596zqqmEbTKQvzyAzCaDFxr7t+Hc3ZfLaNnYx44Jl9Ay8SfMImy2qkp38DrRGZ3ekgTzapeGdTbMJCO3bcMl0f7EhDW8bhJNo8IaVaEvl6opiOvfd10FmKj37Gzlg7lFNnjf3VJTv9R3DbUe6uOEaxdZygZ7/O0s+7Nb3S2 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85827821059158)(211936372134217)(153496737603132); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:DB6PR0801MB1333; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0801MB1333; X-Forefront-PRVS: 0707248B64 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(366004)(396003)(39840400004)(376002)(346002)(39380400002)(199004)(189003)(55236004)(26005)(7416002)(305945005)(97736004)(47776003)(66066001)(53936002)(25786009)(478600001)(8936002)(5660300001)(8676002)(9686003)(6666003)(59450400001)(6506007)(2906002)(386003)(103116003)(230700001)(16526019)(7736002)(186003)(6636002)(81156014)(81166006)(61506002)(33896004)(486006)(316002)(6116002)(68736007)(58126008)(76176011)(39060400002)(23676004)(55016002)(476003)(50466002)(52116002)(86362001)(2486003)(575784001)(105586002)(3846002)(106356001)(956004)(446003)(11346002)(7696005)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0801MB1333; 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?MTtEQjZQUjA4MDFNQjEzMzM7MjM6MzNabDZOZS9iaFhLWm9FUzN3L0NUR1Ev?= =?utf-8?B?M0QvVHdFMDlPVW1tUTNEZGRVWFB4Z0U1emtwTUlLeDlsYmJwd2tKSExJbnYz?= =?utf-8?B?QU1odWJWYzFscGh1dmtvS1ZweFN4T1d4WW5HWE9Db3JWRFVMSmpZK0V4emRD?= =?utf-8?B?Y3c5RFUzTjMzN2plTDVHN3BWQUQvOC84a3JZRjRJcjRtUzROZFN6bnhtZkhv?= =?utf-8?B?aWh1RHdReTJQcFFkcVAzNWlzeUt1b1B1R3AzZ3lVVkVwbFB2clpZRlBrU2VG?= =?utf-8?B?OEJkb1lIamUzT0ZBZ25jQ3pma3ZGalk4T3Z5bEp3aDBaUmFuenBkZWFEWk9Y?= =?utf-8?B?Zjd6SVhNa3VnNlBtRTlKMDVzSXh4czR6d0hGdEJYZFM5MlR4aTFqMHNPMXRu?= =?utf-8?B?STZ1elhxTXd2M3J3YVN3dWVhLzZiNWVzQ0JOU3RHT2duWktWSCsrcUtWK3pl?= =?utf-8?B?Ny9QV1lqTkxtdDZiWHhPRXN0dVVuL2o4cEYrY2Vld1VMazcrVXdCaldnSkhQ?= =?utf-8?B?M3RVWktFVmdIcHd4V3hpcGVVRTZNajcwOWVzVGdnWVZ3Y2gxVlRKZEo3L2RF?= =?utf-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1szG0e1FbKo= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2018 09:46:12.6878 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5665cc04-85a8-43de-0d85-08d5d5005519 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1333 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 | 14 +++++++++----- mm/list_lru.c | 11 ++++++++++- mm/workingset.c | 3 ++- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/fs/super.c b/fs/super.c index 78227c4ddb21..f5f96e52e0cd 100644 --- a/fs/super.c +++ b/fs/super.c @@ -261,9 +261,9 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags, 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 2d23b5b745be..9e75bb33766b 100644 --- a/include/linux/list_lru.h +++ b/include/linux/list_lru.h @@ -53,16 +53,20 @@ struct list_lru { struct list_lru_node *node; #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, - struct lock_class_key *key); - -#define list_lru_init(lru) __list_lru_init((lru), false, NULL) -#define list_lru_init_key(lru, key) __list_lru_init((lru), false, (key)) -#define list_lru_init_memcg(lru) __list_lru_init((lru), true, NULL) + struct lock_class_key *key, struct shrinker *shrinker); + +#define list_lru_init(lru) \ + __list_lru_init((lru), false, NULL, NULL) +#define list_lru_init_key(lru, key) \ + __list_lru_init((lru), false, (key), NULL) +#define list_lru_init_memcg(lru, shrinker) \ + __list_lru_init((lru), true, 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 7621084d5a7d..077956f8d58f 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -552,12 +552,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, - 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); @@ -600,6 +606,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 c3a4fe145bb7..79099bc5c256 100644 --- a/mm/workingset.c +++ b/mm/workingset.c @@ -531,7 +531,8 @@ static int __init workingset_init(void) ret = prealloc_shrinker(&workingset_shadow_shrinker); if (ret) goto err; - ret = __list_lru_init(&shadow_nodes, true, &shadow_nodes_key); + ret = __list_lru_init(&shadow_nodes, true, &shadow_nodes_key, + &workingset_shadow_shrinker); if (ret) goto err_list_lru; register_shrinker_prepared(&workingset_shadow_shrinker);