From patchwork Thu May 10 09:53:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10391529 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 E764860353 for ; Thu, 10 May 2018 09:53:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D507C26E54 for ; Thu, 10 May 2018 09:53:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8D4C289BE; Thu, 10 May 2018 09:53:16 +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 2B74C26E54 for ; Thu, 10 May 2018 09:53:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1C0B96B05E3; Thu, 10 May 2018 05:53:15 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 149DE6B05E5; Thu, 10 May 2018 05:53:15 -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 F2A6D6B05E6; Thu, 10 May 2018 05:53:14 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-io0-f198.google.com (mail-io0-f198.google.com [209.85.223.198]) by kanga.kvack.org (Postfix) with ESMTP id C85526B05E3 for ; Thu, 10 May 2018 05:53:14 -0400 (EDT) Received: by mail-io0-f198.google.com with SMTP id m24-v6so1814198ioh.5 for ; Thu, 10 May 2018 02:53:14 -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=8/B+TBMb5ysBcID+OJHfZs70BbVua2S4F3QxszUwNac=; b=ZOMSC6gO/0yWKUBYDnB8i6Uw1f7a0eSUfX3WjCyzeSy8tk3cnM6bLLtxPRkzvNDJQ5 pvhzdyQYH4Dt2s1X2wONWoE2H1vsYHI8X3qn2Gf3XBVi39/H7O1tbUCp0oVLzReaJogX mjGd5nDYBRFZFYjJFGBZccOSKAaXut/Ue5vT7t3Oi7g6gCq2hZpqAdrRXp3S4ErsGP+S ZycnhHSW9KB6bF1UdTW7ns0a7LUw3tY2Les/3d4KaP+Z82aPBwP+JEnoDy4TXQ8eD0c+ +M+qpWWb/d/DJcxrRVjyQXohY55eTvmcSE3gjmA/eGUwjRuSGswNEdxPqVxesZ1FWaqz 2R8Q== X-Gm-Message-State: ALKqPwcAwlkCK+qHpLjQMbR/81VbYE/OiqT97udxu01hiJ2AAopBjHa6 An8fk0VvaW0pV5lfYNmKaNIS6DiLWEdzd6JitYQwqTBdMUe2HSYpFh8/OBkdsCnAAs/YG8tF8gg MoOpJbgdul0TIILEA369qAXo70rL/aGy9ktbtDSqY41mz3PRmRbrOvSLMwQa49/SMrQ== X-Received: by 2002:a6b:98b:: with SMTP id 11-v6mr750982ioj.90.1525945994588; Thu, 10 May 2018 02:53:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrgPGC9gS21eSb6Lqmt0V6c6qMI56TNiCbWkYTegVDRf1BOg+4eLhavqKSt91TmzI1QM+EA X-Received: by 2002:a6b:98b:: with SMTP id 11-v6mr750954ioj.90.1525945993847; Thu, 10 May 2018 02:53:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525945993; cv=none; d=google.com; s=arc-20160816; b=KbahkSCdcejW6PwHYplr9MMiCcDBzT2ENK5l+slCu4PVk7gAf5oWwPXJpwpIwaESTm IhsYCxtD0c/2o2jZYmjmQSXrMmHo//aGzpCZmLwt/jGjE1bI9lQfJLxkz/pWK6dBb3d4 F/zhnYjAHnPn3nPKSYb26qsNZeoWouRrbxSctIpQVcarhm+fE0VrPJCYR5HzsC0wiKtk nSBYfIth33SrvQU1tzXla9kOfaDndWfuh52RblJWBbZ6T0BbBcMRJCCxrerHcBl4dG25 xu3AjmB0wZdkhl+XW3B4DDds8GzVum/Q/G7D1VlpRRFyHXbr0tnuFLa8pXfcYL4JSlG1 IuFg== 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=8/B+TBMb5ysBcID+OJHfZs70BbVua2S4F3QxszUwNac=; b=MDr1kP09aQYOUNTpGbAp/RTtGlG3dbLdRWC3Hgh4y7LZ5STC4LKmpYAYkUyEuvqulL P8Vo3v4KbD6ZbzMTHsKlJEXfgWSZakDzsgwfosZEt35bvYNCnuYW2N4n2rlf1NYejO1W 0GuVqP+zaspJ6BIPm977rt947YckwKpkAjHRWW3dULPL/HRKR4eTff2yzdhiJGkzY3Fs Z99mpmhMNon3YKv4K3ACCTTvx9LjJQsAPXRW5CsWLtuSEQ4ZLB1ovdyS2rbjc8wC7j8E fPXL4DN5qmkKvjFuNTWaWlhW9AnYV8GusAPZ54glx5fo/aqWUTsaaWWtqavF1oHoSVjc 7LOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=T5vAWpaX; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.5.93 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50093.outbound.protection.outlook.com. [40.107.5.93]) by mx.google.com with ESMTPS id g124-v6si541482ith.133.2018.05.10.02.53.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 May 2018 02:53:13 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.5.93 as permitted sender) client-ip=40.107.5.93; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=T5vAWpaX; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.5.93 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=8/B+TBMb5ysBcID+OJHfZs70BbVua2S4F3QxszUwNac=; b=T5vAWpaXnYzP0v2PPsYhM0mMKlui02reeLK5br4tdVsbup98ObRRbXDQsTtfCPPMxR8vpECN6jg4HOhtsCByss79gYOtdhXinOVrQeljymvHHhq4cYdJEmKojpjRs0neR2ruQF0eQPAI6/RMFzN9TEkR9lfJjJf2/YH+ARrme+Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (195.214.232.6) by AM5PR0801MB1331.eurprd08.prod.outlook.com (2603:10a6:203:1f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.755.16; Thu, 10 May 2018 09:53:08 +0000 Subject: [PATCH v5 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: Thu, 10 May 2018 12:53:06 +0300 Message-ID: <152594598693.22949.2394903594690437296.stgit@localhost.localdomain> In-Reply-To: <152594582808.22949.8353313986092337675.stgit@localhost.localdomain> References: <152594582808.22949.8353313986092337675.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: AM5PR04CA0025.eurprd04.prod.outlook.com (2603:10a6:206:1::38) To AM5PR0801MB1331.eurprd08.prod.outlook.com (2603:10a6:203:1f::9) 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:AM5PR0801MB1331; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1331; 3:JngpSdornpL9GasqrXnvQyfmtqLvsxGJDHN4qqGehdsuvp/0lw64wCCmjV1pG3GUm/bX7f8/USZZiQkgB9KRwPwvP2fETqePLWCDIMl9EYRTCOvaD+T4bDEDJMycHdZgH2aNgKxjh1rkWfTOoKV79WuFwMvcXjzpBolcoHEMfvu8LahWtM72GKxBVEtfgGQvO6MNiEXo0JtEcFW4s12tJubcSXNYMw1Hjh0+pkwTwGKU+lbHi0wmY5W2FOUgJHdl; 25:ox25SS7RlvNnI2BK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kIvGMG6hX27QeuHiWnL6DgDOf5nWsGjGZhpwK3kMi8FA+J1fyDdi4ar+esjoyX2Y/1rpBxip33LgfYq; 4:tFA62DsYPeWBnc/Uj7Mp3JzCzVngzSsUisxTYei55eIBYuh2TKB45yRSQqYmZ2HhvrZ/96D+D39uoQT+CLaO7DcnHQTKSMWIsfSSVtMNGj8ZO/Bx4B9Di6THq0hhU/GgtoPUoPzY6mJdw83w+bz2SxcHdm50OMZlK3/p8czy3pAsGs8AoBF65/00AyegUkij6Bo/k7oMNewdxeykJqVXgTn9Ig1v305I2rJgB2lSjqdDOThOmy0RSlKEyAUMd+r8036AQiG4p2wlNy/rZCfLnQ== 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)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM5PR0801MB1331; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0801MB1331; X-Forefront-PRVS: 066898046A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(366004)(39850400004)(376002)(346002)(396003)(39380400002)(189003)(199004)(6636002)(8676002)(486006)(956004)(316002)(61506002)(103116003)(58126008)(97736004)(39060400002)(11346002)(446003)(478600001)(47776003)(476003)(50466002)(230700001)(305945005)(68736007)(53936002)(105586002)(9686003)(7736002)(106356001)(55016002)(25786009)(386003)(3846002)(55236004)(23676004)(6506007)(52116002)(6116002)(76176011)(7696005)(2486003)(86362001)(575784001)(33896004)(81156014)(7416002)(8936002)(16526019)(5660300001)(66066001)(186003)(26005)(81166006)(2906002)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1331; 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?MTtBTTVQUjA4MDFNQjEzMzE7MjM6RE02SnRVZUsxeDE0STVHcFJ2TFV2OUtw?= =?utf-8?B?ZXZ5eVRJbEducFVnVFV0Zm04dFRKRjNzUkxoOXJjSVY5YjdHeEV4eGlKOVE4?= =?utf-8?B?U1drSXUxSklFUS8yc0tYdDc3VXhGMEl0RFZRZ3pPSWFDaDlYdHJmZEh2bmFC?= =?utf-8?B?WVcwaHhTd1lyK0pUclhDSHhtRFNCRGhCWStDYlFKWGcwdFhqbGV0Q3RYOW5n?= =?utf-8?B?U2JrT1l6MUVmNU5jS1RLZDB0SkowTUNGRFVKT2xXVjNsdVVjRXk2NFgveHJy?= =?utf-8?B?cnZmTEt5REtOV3I5SURsUDI3U1hWYXdMYmlYRzkrZVVDMEFpb1RKMVZraU16?= =?utf-8?B?U21NSVlhbWUwVC9vOFlHbXBOYVBVUXhuVFhDbFB0MXZwTG55SDZ1ODZHcDZy?= =?utf-8?B?M2lJZnFDdk83SzFhK3pnSFhNY1JKajBZTDdwUnZSdk4vVFhIN2lkUXdUZEFv?= =?utf-8?B?cU1KSWxIdm84OHhheTE2VzRjQURSMFNJbjN1Rnp4TWNSNTFHaUJrYnNMcTJ4?= =?utf-8?B?NG5UZllkaHNIcVhMdEx4VG5WMGF1V0grSkwrRnJsT01NQXBvQ3JaeGJOM29S?= =?utf-8?B?dzRidWN3emZIeHpJUEZtcGJaWXA1ZW9oNmRxellFYlZXU2gzQzhKdTNBZndi?= =?utf-8?B?K3JBVU5DZ3hLdEcwOU1HZWtINWZXbHJOY281VHdhUUE0MUE3SDlLM1ZNamFM?= =?utf-8?B?ejdXNVEvWC8ra3RpY3JPS0w3RTk0SVdMU0FPRXk0S0x2VzdFd0pnZFBFSENz?= =?utf-8?B?a1M5NXJDa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EE1T1REVWNjiXQeE=; 24:iEgrPO9EcFARZAtwf8bQ2uC2vIccjen2n1ZWCHbzUQDauenqbgppgPA4fw7vM1kPpX6wgBZt5WC060nxjgVZ8o8mMS2dsnesOIFQt9cj46g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1331; 7:+mo/5wi4VShVXmpNiStt+Vyib+De8ss/v4TCblSl/Y4HC18p5eZXXzRij8chQVHV+swnNemEPhd4Yz3laCqKbD6PzSvebZkaW0C1fhSbUMNd3WQqYzlYGCRjh74JGU6f4wjh0Whba4nWC5Qv/XaQjKv4HHB/tSuf7YUL+i63e63F4LZTHLf7h07NwXAbD5QJ1UcmraR5kYataKagJ/NPVtxr/tLG/aP8nIgILV+lAI9PwaCCLq+x70YK1uIjkXWY; 20:g2ewZ2aH6/KyYko9VIblaa/0bpBxBbtigbYJ2bU5t4o443eXe78WsNARLHSkG1K8WqlrjnwTL7+ah+7FitN6eiGHhOoHRR+Jb/Wz/Z6ShAinJNM4jBm69w5i9tD3L5xcpTHdMmsYc2f1wIB8HTVL/gG6m5sZK+MBbTQvcE2EfJk= X-MS-Office365-Filtering-Correlation-Id: 4fb5d06b-845f-4fb0-8e41-08d5b65bd69d X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2018 09:53:08.9051 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4fb5d06b-845f-4fb0-8e41-08d5b65bd69d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1331 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 | 3 +++ mm/list_lru.c | 6 ++++++ mm/workingset.c | 3 +++ 4 files changed, 16 insertions(+) diff --git a/fs/super.c b/fs/super.c index 2ccacb78f91c..dfa85e725e45 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; +#ifdef CONFIG_MEMCG_SHRINKER + 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..a63b7a4abc6b 100644 --- a/include/linux/list_lru.h +++ b/include/linux/list_lru.h @@ -54,6 +54,9 @@ struct list_lru { #if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB) struct list_head list; #endif +#ifdef CONFIG_MEMCG_SHRINKER + int shrinker_id; +#endif }; void list_lru_destroy(struct list_lru *lru); diff --git a/mm/list_lru.c b/mm/list_lru.c index d9c84c5bda1d..8dd3f181d86f 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; +#ifdef CONFIG_MEMCG_SHRINKER + 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; +#ifdef CONFIG_MEMCG_SHRINKER + 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..da720f3b0a0a 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; +#ifdef CONFIG_MEMCG_SHRINKER + shadow_nodes.shrinker_id = workingset_shadow_shrinker.id; +#endif register_shrinker_prepared(&workingset_shadow_shrinker); return 0; err_list_lru: