Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1383372imm; Tue, 22 May 2018 03:14:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoL+F0NDSAXfswC514Gx7gL+BL0vuscoqORvcKWMJjtx5g1Jf7OKxsREA11PuXwkjsxXTIS X-Received: by 2002:a62:1306:: with SMTP id b6-v6mr23177677pfj.58.1526984098674; Tue, 22 May 2018 03:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526984098; cv=none; d=google.com; s=arc-20160816; b=HQLoMnxynTQuMZzqIyG2R6mviihYHOoaG1rLh5KAZd/ShZ+vx/MgPeakmCkizt1l4D TcaKNNrz11cJAx0CjYi1yZa1W88dCoysPqa9lb6OgAXV8jfWiN1WxYlm+4dxlVTE8Xxk U4fLIUjMtEXX6K7VyDqcl4qLyifrlCsI2oqd2nwENVY/Lj9097xm0RbxepdSqc27/QL2 VF6g0UtQm0xWPmQadJdurgrRUgZXkCejKH9p34U57b3B7yyR/EDutix+vAMAMADQbnoL 8myEisHjMRl60T9+WiN/DFTshAoHij38NG9k17KE+UUCEhbHL51JUOKTdYxwGB3fKVx8 +dCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender: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=TNPecHzRs9Cj0fn+lmkpuVlRLxdr7wR25lqhseaZ4lc=; b=cwO/hIBtR9SSUxSV3cKBTIWK7ewWNn2pW5eyWcjA9PSTGJDF9lFlliRmpoqpeGdvDy X5OHhYCcyX27GgdbzOJhF6B+n7WAkr5nJ/l+kggA7cILeCt+2uxnuDMd/qvROBpyggy2 SQSajsS/NeMDpRlMcoRIsDfNBKd8cA4rbWV4ThGdr7WP0cTt84qE5ckihN9rkBVqFEqO VtaKJWsjs+omdQVKI74En7Q5oDflTIaWyLEn/RpqhivfCIQizlWXLFVe7yfK3Cj2HF5p 1aq0MLvC3l38ISkCv4yB5pPL8X3xmhf1YYQ0ldMfI0HtjvpYt5sgrpD2pQLHHjQr9zGK tT+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=RLt4UcQ+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u11-v6si12361969pgp.480.2018.05.22.03.14.44; Tue, 22 May 2018 03:14:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=RLt4UcQ+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752512AbeEVKJV (ORCPT + 99 others); Tue, 22 May 2018 06:09:21 -0400 Received: from mail-eopbgr40092.outbound.protection.outlook.com ([40.107.4.92]:26896 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752044AbeEVKJP (ORCPT ); Tue, 22 May 2018 06:09:15 -0400 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=TNPecHzRs9Cj0fn+lmkpuVlRLxdr7wR25lqhseaZ4lc=; b=RLt4UcQ+L1cqKeVtrKAKxeoSG7gmk1xROUQV4XOqRQOzGp7asvplzpMB9MTh8Uz/OvMy0KSO3N15hsOTVm7Dc6SRmMoIKqw8s9pnSdWqZgX6vXrM1Wf5Yd5ajP+ikVlQn4URFJRqmZd+M+fK/PXfgEm9TODKR1c2ANIlqwfE8Mo= 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.776.11; Tue, 22 May 2018 10:09:07 +0000 Subject: [PATCH v7 10/17] list_lru: Pass dst_memcg argument to memcg_drain_list_lru_node() 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: Tue, 22 May 2018 13:08:59 +0300 Message-ID: <152698373951.3393.7015045580434123801.stgit@localhost.localdomain> In-Reply-To: <152698356466.3393.5351712806709424140.stgit@localhost.localdomain> References: <152698356466.3393.5351712806709424140.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: [195.214.232.6] X-ClientProxiedBy: AM6PR03CA0018.eurprd03.prod.outlook.com (2603:10a6:20b::31) 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)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:AM5PR0801MB1331; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB1331;3:BGMvzZF6KFCMWbUZpcXIEb63cYEnHSb9f/egWJhOPI89KpvkZI++CUGpos0HFQp6avqXVkCUGXKYpyHUv+Y10t69z6dfQlV9vWrB+z0Z7s1eIFoHcssK+aerGYR2G1f4GDGDAzZhY6DfJzmFbUVeOiSt4Yy4LnqCeCwH3+iWUY0zP/aK56qZ4cH0HSoZRglCPM0xvHhB2Nh1BN4r3vS4H6nqYpNrgIOer0HaVZTb2pV+29hDKWhX6PqEcFWMEXba;25:muJNYYfbAV9PGAuqmCqol9OwRL94GC5E3jf/Vx4PW4+9ynQaZZ+PlPmqHslUFabAx41BwLBEI79gRmRgKOK662dG2+dSeJhDCTE18vOLCcFBxLuUSj3N6zZORO4ac+/OUmELn4eDMNQlCJpfRgj+BGRqTNNeghs1Lnakr+BhtmtVHeK+W9JP6vzeBnaMEmJmeGsMUmKnpnXuEtLkmjpjFxyPpGZ3BVUQ821T6TNIgNI9bslSkEYYPOScKzvmB7Js85Z1s/ptPObnqzkMg6OdPV45sJHWflzE7BlJKCzVvVvIxqLLp+MPCHw76uZufOG//V04+/zBSAo0eWNrH4AnDA==;31:IF2umOwtx0x68vFOxGAYNGsiy30XJT7cX3jllvYc/ldzQ+3qmtUVm7vCNj3NN/7sNO+1fr/GoLzTlgDS0QeoQFNcyx/5ThH2tg7aBd541/5ZCZ7lYQzD3iQU2f9Laf8HwA0fJzajdidXb0/VHhC/SB1sAXSiSSNFDKcUeTT4LEUZ1EycFF6h/jNGFA5j7aECvSZuDhMpqT6LxrYYgspsuEtsl4yIef0bjzELUlYOBlc= X-MS-TrafficTypeDiagnostic: AM5PR0801MB1331: X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB1331;20:rL6hrbrmu1AoM2OjY5umVa2SnXgvw1f3H285qaF5mzxs78PoMPP/DZOxibdXObZwRSr8WBP7zjDztfwczWPlYi19X9WCmbVPDfoa92LSjbYxTsl6AHyUVzKA3ePcokY5ZdLddjH+6QbtObj16WrGV0irEc+EQgXX3dm/S/muZIEIIsIgUNSRXbxKeJx+7kc5Vn/QQ8Cr2lfyePGlzSOdd3d5+5U1TyVuIWJ+mbq7SLamZgX8H9K+JGOLcXYRSrLVhm6Fe3yErHjd+4lcTT5sV+9qi1wpQStlE3GIUygyzUMDx+aOX/09/coykuScGNp/ghE/wF+7QW5RhoS9YFU9x9/QJsVPDu16IpLRJj/C5fI3679A2ZNysz7WLwnhRgujzXJjTfKqMdrBVVmUNWi8NSE6Ye1U6+vLA4x4ZPeC0sO9R04TpQRanghvTSMIebmV9KikNbmeTdmk/qzheQ+UIZSz7R5l7WIFe7f7HFSws+hxy+geEFbcM1PUTZWiZ8Nc;4:JWYwUg4eYCEVBx22LQHdKS/lBFuAGQRzKsERrQrHHH318OTvg2r+p4LmgMiM6BXFLPSUVzBv67eiyG1SPA8lU2OUs97zb+Yn5tLE0Dez7IOInr9ECG2eyJ+dx+tTLqd9nXA5yOfRXMSWb0Y4ZPth0Aetbdttmt7XCvvL6WlmxFQc6cuajguxbxO0q4dMDNeFqrf17mz9Hp8IyhU0Io98/Itd5+svcN+s/jTpJSJaCbKRSvCgcVFRF8NhIivMRdHczwJNxy2JmzfLVsgSHer2HQ== 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)(3231254)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(149027)(150027)(6041310)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011)(7699016);SRVR:AM5PR0801MB1331;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0801MB1331; X-Forefront-PRVS: 0680FADD48 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(366004)(376002)(346002)(39380400002)(396003)(39850400004)(199004)(189003)(97736004)(186003)(106356001)(9686003)(2486003)(52116002)(7696005)(68736007)(23676004)(2906002)(33896004)(5660300001)(486006)(50466002)(386003)(6506007)(76176011)(59450400001)(61506002)(16526019)(47776003)(7416002)(55236004)(26005)(66066001)(86362001)(55016002)(6116002)(8676002)(81166006)(81156014)(39060400002)(476003)(11346002)(53936002)(316002)(25786009)(3846002)(6636002)(103116003)(6666003)(956004)(8936002)(7736002)(446003)(105586002)(305945005)(478600001)(230700001)(58126008)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0801MB1331;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:3; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjA4MDFNQjEzMzE7MjM6ZWNGQ0k4QU8zVGZUVk56aUJkRjlZeVhh?= =?utf-8?B?aU1qa0sxV3dMMGxWY1BnYndxQXQxV051and0ZHNxZXJhTytTVDhsSll1ZTdl?= =?utf-8?B?Nis3eVRnQTdBQTB1aC9ZQUVkRWZhTkh5WFFCVzBaa0tBa04xcEhpZjJiUU9a?= =?utf-8?B?MloyMU5maUJzSjU5RUtFZTV0aWhRUmx1ejFGSGc2Wis2NjR2eUMyb21jV202?= =?utf-8?B?WUU3YVAvdDVPR0NMa1k0RXN0cGE5UGlwdFNyeXRIa2s3MzRvUlcwYTRxTWpy?= =?utf-8?B?dWtDMXQ1N29KY05UYjhHSUVLVnZ6c214d25wb3k2TTZxeFV1bUlLRTRZcVhJ?= =?utf-8?B?WHJYQ0kv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QAqr6jgrdcM+N6H2GyN9o9Mdint0kxoggM1thYVMj3b19fCe3QqsNtrCN+gsmFVbqznJ5LUG3oYrdz2NA8ZVFk= X-MS-Office365-Filtering-Correlation-Id: 47c3b0f7-af3c-42e9-33b5-08d5bfcc0f00 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 May 2018 10:09:07.6468 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 47c3b0f7-af3c-42e9-33b5-08d5bfcc0f00 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1331 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is just refactoring to allow next patches to have dst_memcg pointer in memcg_drain_list_lru_node(). Signed-off-by: Kirill Tkhai --- include/linux/list_lru.h | 2 +- mm/list_lru.c | 11 ++++++----- mm/memcontrol.c | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/linux/list_lru.h b/include/linux/list_lru.h index 9e75bb33766b..d9c16f2f2f00 100644 --- a/include/linux/list_lru.h +++ b/include/linux/list_lru.h @@ -69,7 +69,7 @@ int __list_lru_init(struct list_lru *lru, bool memcg_aware, __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); +void memcg_drain_all_list_lrus(int src_idx, struct mem_cgroup *dst_memcg); /** * list_lru_add: add an element to the lru list's tail diff --git a/mm/list_lru.c b/mm/list_lru.c index 151fa77eb7c9..43cbec52a48a 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -515,8 +515,9 @@ int memcg_update_all_list_lrus(int new_size) } static void memcg_drain_list_lru_node(struct list_lru_node *nlru, - int src_idx, int dst_idx) + int src_idx, struct mem_cgroup *dst_memcg) { + int dst_idx = dst_memcg->kmemcg_id; struct list_lru_one *src, *dst; /* @@ -536,7 +537,7 @@ static void memcg_drain_list_lru_node(struct list_lru_node *nlru, } static void memcg_drain_list_lru(struct list_lru *lru, - int src_idx, int dst_idx) + int src_idx, struct mem_cgroup *dst_memcg) { int i; @@ -544,16 +545,16 @@ static void memcg_drain_list_lru(struct list_lru *lru, return; for_each_node(i) - memcg_drain_list_lru_node(&lru->node[i], src_idx, dst_idx); + memcg_drain_list_lru_node(&lru->node[i], src_idx, dst_memcg); } -void memcg_drain_all_list_lrus(int src_idx, int dst_idx) +void memcg_drain_all_list_lrus(int src_idx, struct mem_cgroup *dst_memcg) { struct list_lru *lru; mutex_lock(&list_lrus_mutex); list_for_each_entry(lru, &list_lrus, list) - memcg_drain_list_lru(lru, src_idx, dst_idx); + memcg_drain_list_lru(lru, src_idx, dst_memcg); mutex_unlock(&list_lrus_mutex); } #else diff --git a/mm/memcontrol.c b/mm/memcontrol.c index b454f077de44..a86dfeaa9aa1 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3187,7 +3187,7 @@ static void memcg_offline_kmem(struct mem_cgroup *memcg) } rcu_read_unlock(); - memcg_drain_all_list_lrus(kmemcg_id, parent->kmemcg_id); + memcg_drain_all_list_lrus(kmemcg_id, parent); memcg_free_cache_id(kmemcg_id); }