Received: by 10.192.165.148 with SMTP id m20csp923435imm; Thu, 10 May 2018 02:54:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoG07t9TwQrnmizCLUCFuiUbY3Q+7prOlcQKVh3fjgxVIkrZQUQfwjrKEvL5nUjBDZiGSfa X-Received: by 2002:a17:902:9a4b:: with SMTP id x11-v6mr744727plv.176.1525946077043; Thu, 10 May 2018 02:54:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525946077; cv=none; d=google.com; s=arc-20160816; b=IfGbsZ8QZ1ZGq/SJHFlQ/TcyB7nN6/LULLJMBhKAfkOR2moRjLCz1WLoWPFdgPEVHD OJLMZd7GBNzobhwtBRV3fS36zRPOdtiV8dVU94eZiMsEYrOlOiWevSFGuMC1c8XgMkXT xi0RJRzAvLfy7NtnSTr3NltuFx/pZvJ3gZNVBf+BlH2vbYuJljw8XaJBoZJxpzOfdsVC muAp8+DeIiWYZFbc1N9CvmbQevxObh2N72Z7GHmcnDCGVoQTXD+AFJssVDHvVvVqB6TT FZk2DOxVoKbpn1Ew1l/GnjzeWtHFRVuh93RghZJz6JkDWVhXRgXOe23plCsIYDGT8i/R hmOg== 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=30UUA/43I6fvy95jAew38qQN5ryIAizCvz7wTqfUPjM=; b=slr8Ax0JzmBm1jKzXD9s9Vt9Y9cD04HwXiuqew0IWxa0MjfuB3mKUBzvem2oPBU0qd 43ZAcChwQQOpn4P1rDJ9YvjOMlzRXXjJU4+bRA8oOxEbIEA8vI6ziYQqA7c7Hz4HmGOG dHJnZq/kJlJvoGoJrjK6ZiAfIQsj32Yq9Hx68M/owMtT/LY94k7WuxjtEt5fCxgRRE88 cb9zxFL8KQ8KrgC7FUE1aFoseMRfXjKx8xZrVi/ilJ0OO7RfwPr66UgUzilVjgHseYea DO1TG54N2JL1m24fgxtWCOswCTtqI2gucklenpNg5ulaPx0mrHA+cS1RJadoQGpeJpTf ATCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=hGkkPA2A; 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 m32-v6si439536pld.438.2018.05.10.02.54.23; Thu, 10 May 2018 02:54:37 -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=hGkkPA2A; 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 S935162AbeEJJxt (ORCPT + 99 others); Thu, 10 May 2018 05:53:49 -0400 Received: from mail-eopbgr20109.outbound.protection.outlook.com ([40.107.2.109]:25095 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934661AbeEJJxo (ORCPT ); Thu, 10 May 2018 05:53:44 -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; bh=30UUA/43I6fvy95jAew38qQN5ryIAizCvz7wTqfUPjM=; b=hGkkPA2A2I6oOAPu1qwmQNR264qAJAn30ZUZNuba5WGlICGvoGXRxr9HXA9DqKj9M6p+xiPURAqzpjgOuzIZNhJTRuu14jRMTpZHposvvkyO4jR/NqiN53lhbi2yAxp1ExxWvZzgxkHk2VwDa2x9x0nqOs4rdCcY4NYa0+yTnH0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (195.214.232.6) by VI1PR0801MB1342.eurprd08.prod.outlook.com (2603:10a6:800:3a::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.17; Thu, 10 May 2018 09:53:38 +0000 Subject: [PATCH v5 09/13] list_lru: Pass lru 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: Thu, 10 May 2018 12:53:36 +0300 Message-ID: <152594601636.22949.5066059978522726025.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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: AM0PR0202CA0022.eurprd02.prod.outlook.com (2603:10a6:208:1::35) To VI1PR0801MB1342.eurprd08.prod.outlook.com (2603:10a6:800:3a::28) 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:VI1PR0801MB1342; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1342;3:3r6JLrObVO8H2vQpWvWH5r/JchCtf/UWu/JGXV46hIw3K0lP1VBUVcijKTckJT6g+VMrn/AhrN3Q95pfbCp3n01XIv/xA+5fu9Wm8fqSAguWPcjoowXemQX4hBQKawzRKNc36QOU3lIhM9fM57tqMt8r/R3PciBEz47PPxpJM+0lkX9ar/4zyvNaL9AIoDhXi02trNmnCI1O5ek7SBmhqyD454qusXNvVqCvSBBWyR8zUxaSWLyeK9Hjw5WO200A;25:tc3KP0FKOwOLQh5t68IdHMoD9kjWG3Hr/0HXKcP40szKKj/wTd02VwpyiVLGxnkiOV0VJ02jy+eSPBtJ/iHLLrZ1uMnUQB6GYs8ze8Z7yMwMeTQVIaEmwVFfmljFelLx38noUzswIt2cShpRH4/D57Ic6HjLt1YD2tLNoyzAwXM23DEw+4XzpvNV2/6/++CVmzsvXOduMqtlq3QBkMed0pq32k1f1S6jzi9KkEvqi+v3hkPOcaKirs+EO73GD544jaN6/U721PWzeG6gbU/J4zdMr2KAYPPyXs5YhstSY3TbE1b2VMGQ9gg18OMUHF5u2EDIgzjlOpSh/mkikIj6zA==;31:dUaCJ6PcnoVnI72JbS4FGm5yJrqOeZsv9mAztlnWnGoTCzj/CWDN3jpx0naHnVj25LosXpqn4siOygs41PIgZ6/4VeXXrj2HC+Sv5yHE/AZgzSaQKaIZZsFo4m5mWhXk1e5beE7Q/aV+kaFMN7dE6Gjk7hFMEz7fw0RuDIWXujSWL8nP4DnKXLIPT0bGqx2cLIqTjHwoUw7cb6/pLOmUNi1Inr3Gytzi2743/p2ok9Y= X-MS-TrafficTypeDiagnostic: VI1PR0801MB1342: X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1342;20:k5FVW960D4EmgeFjMfeQHyfZvCf8CtyyJUqV8+BhPYZOhovKSFVePzotzpJVcpOlmbnmSHe6u/PqlRetDbM2jNeIJex44DQPQMZ00qmP1QHibgnXiRECfNZStu0a1iQ+RpK2nMD9VBo0VJ/mwSW4kUvN56OlLUd2oV1c4ktDmkLQigVhbX0A1T0Ex9kVs2WXm3lCpY6cGPdZliy0rlRPTugviVKGh4wyVdLYYiBHSJcMOhksqoXeCuhUFr01kgglSKmMrpEKTucAdKBpE+ktBPFoYk/QVFQOcYmwvLpDtZOUSO7y65qeAgR/5cOdZ8FzryfHgM9n2W+dI0Mt8NsgRHE/R5F0D/YYnDxqDCA26hiXu4FqDv3dT4rKTYVQlCWkuFxOvNKFxRYyooXYG8mjIlToFp7QCVVXQCx81EC5eMHeT6E92/d9IE4YqDkI567z/NzYSsJgBHuC3uYMOOSGVAo+XF47nhooY2qvZG/CgpSnKdB2ek4OQmq3qgrgagyu;4:baqGlLpKKFeZeWFHzSQHAzf0I98sfE23dFlyu0/d5tT/tPjqlRi6isOE33d/mWVWmWY6bY88FJBQUGa7Y7Yk5Ll3o3ZE6GMPk/R34/q8h5sODj9A7C74aEnIgZh2tlmadVM4A8/gG/I+Mfa0tyI+fEdgU3/TRlXPycZiZhS3tcQ6Nw8vhWyiNLZyR0gavX/S4zTPz3YCAhhmoS+gVvIifX8svLEe1nytv6XJ0/eKLuhi2VrjR+Z/lnp7b16w1XgPHJb+1Lme7Ngf5G8LDntk0Q== 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:VI1PR0801MB1342;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0801MB1342; X-Forefront-PRVS: 066898046A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(346002)(396003)(39850400004)(376002)(366004)(39380400002)(199004)(189003)(52116002)(23676004)(26005)(68736007)(186003)(2486003)(6116002)(97736004)(61506002)(86362001)(3846002)(105586002)(106356001)(16526019)(55016002)(66066001)(11346002)(446003)(25786009)(486006)(7416002)(76176011)(8936002)(305945005)(956004)(478600001)(7696005)(5660300001)(230700001)(47776003)(386003)(316002)(59450400001)(39060400002)(476003)(2906002)(55236004)(7736002)(6506007)(6636002)(58126008)(53936002)(81166006)(9686003)(8676002)(33896004)(81156014)(50466002)(103116003)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0801MB1342;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?MTtWSTFQUjA4MDFNQjEzNDI7MjM6VEFPWmNrQStKM1N6alNodXF6Z0hwUVo2?= =?utf-8?B?eGVXeE9rYVFlOGJiNmNhTzJTZEw5S2oxb2Y5b2t2RGs1Z3FXZ295WnB6eWV2?= =?utf-8?B?VmFnYVVJWWlMajU1UmlaaEYwMG1hVWZyWkZzOTYwNy9ZM3V4U0RLMWtBSklW?= =?utf-8?B?eFg3ZVdhamRCN09yTkNINmt6cVNWSjJ2a0M2OE1hNVAvdWszK3NxVW1NSjQ4?= =?utf-8?B?SjhGTVJSTFB0Y1hkREk5ekNyQnhzWis0ek9kRlM3cEUvL0wxdkdtd1hwUVc3?= =?utf-8?B?T2k0UDBsUFAzWnBUck9jTnJvak1mSUJLSHIySXNwYmlFKzZmaEhXQVQwV21n?= =?utf-8?B?c0xOaU1mcHNoLy85SFJ4OFZacG5DTWw4SjhqcmYwMEJaN2FDMW44WnBPelZY?=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0g= X-MS-Office365-Filtering-Correlation-Id: cc986d14-84f7-4324-0194-08d5b65be892 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2018 09:53:38.3891 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc986d14-84f7-4324-0194-08d5b65be892 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1342 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 lru pointer in memcg_drain_list_lru_node(). Signed-off-by: Kirill Tkhai --- mm/list_lru.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/list_lru.c b/mm/list_lru.c index 46b805073ed0..7f6cb27aa2f5 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -516,9 +516,10 @@ int memcg_update_all_list_lrus(int new_size) goto out; } -static void memcg_drain_list_lru_node(struct list_lru_node *nlru, +static void memcg_drain_list_lru_node(struct list_lru *lru, int nid, int src_idx, struct mem_cgroup *dst_memcg) { + struct list_lru_node *nlru = &lru->node[nid]; int dst_idx = dst_memcg->kmemcg_id; struct list_lru_one *src, *dst; @@ -547,7 +548,7 @@ 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_memcg); + memcg_drain_list_lru_node(lru, i, src_idx, dst_memcg); } void memcg_drain_all_list_lrus(int src_idx, struct mem_cgroup *dst_memcg)