Received: by 10.192.165.156 with SMTP id m28csp212788imm; Tue, 17 Apr 2018 08:56:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx48FaUcz6cx8NHa1eXrHZvpiokpFe/njOXzLih+9GEsSdpQuWi8b7dF5Lrh8I5UDyXIbSzT6 X-Received: by 10.99.98.198 with SMTP id w189mr2262656pgb.263.1523980595834; Tue, 17 Apr 2018 08:56:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523980595; cv=none; d=google.com; s=arc-20160816; b=UvfwsZsW1nMoGK/yg7ji8cEnIPUhqgSzOPKuOT21TGWgmpm/YE/Qqd8tgOWs6rWiuX k7Do5vfm40ANX2iE8zW7R73gBPr4xSGvA4Q/fD4cUMzEY74Wm+YSfR3vNMAIkOpFdFc4 rVRhCUSkaKqj1zWC3OTzuxzlhgNsSQDH29WZMbRvON9a1EG0m5CK0xX9xtGsHspKMJpn Y4exJkkG+U0pZ4xauC6hwFS7ZKJqSCSrjkSD1M5zmsYpesvsvR6D6yH5EfiSSNhaWlDq cgPsF6C6Ez8SWOZgBCKisaK2lqcQjNYk1gsWtjGPaKkeObxLwSvkk0+MsQ7C4oMEDy7c AusA== 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=gYJk9GlTnT4ztiui8wqRNk2VpDU6MG7btK9SWXHYvxw=; b=yJDP8+Jze1A2O+lGQr2HfaUWUvj36tpRD4njVBtQre0d4D2W10k2Rjrzp/Cf2phrwC F22JdKDKXwoooghe90GN2GkR/5xJVzois5ysszNTl3srj0IdOjEPjUvDCViJwfs5Gnx+ fulLg6i67DD+tQmGPfFC1FeEm+T63y53+hARHrjbrBBGnbgJWkpOsBWn7YrGiFLqXQnn 66VY0+ROI7d6t7UMhqyROoxP3XRcAEYe2J7xXwxUn0iIiXigEETH9xbBLgwQIh3EFomp Ly0+wmn3jdB57U4jdmvxoTc8xGuiPTih2Dip8ucpj1BvxEztHAInqfonyRVmItWf5arO nn/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=HB1BvP9y; 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 w7si8611018pfn.363.2018.04.17.08.56.21; Tue, 17 Apr 2018 08:56:35 -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=HB1BvP9y; 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 S1753281AbeDQPye (ORCPT + 99 others); Tue, 17 Apr 2018 11:54:34 -0400 Received: from mail-eopbgr30139.outbound.protection.outlook.com ([40.107.3.139]:22083 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751187AbeDQPya (ORCPT ); Tue, 17 Apr 2018 11:54:30 -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=gYJk9GlTnT4ztiui8wqRNk2VpDU6MG7btK9SWXHYvxw=; b=HB1BvP9ytjWoAy+BJmwiVbPDbk9Ekgzkb+pbMKvkdCHiPAIZ1BHL0gcK2HQjAbP9QKc+FDjmzey4xXdqXMdzAtbQibeK0PXVV/RbZz9KvWs6BfbB0yt/DbWWXNUX0pgGeokGPIql7/BBW9HUW/OU8TRSnyijQ1fTXoXr3BQdsF4= Received: from localhost.localdomain (195.214.232.6) by AM5PR0801MB1332.eurprd08.prod.outlook.com (2603:10a6:203:1f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.12; Tue, 17 Apr 2018 15:54:25 +0000 Subject: [PATCH v2 08/12] 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, hillf.zj@alibaba-inc.com, 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, 17 Apr 2018 21:54:16 +0300 Message-ID: <152399125678.3456.3006876924386799577.stgit@localhost.localdomain> In-Reply-To: <152397794111.3456.1281420602140818725.stgit@localhost.localdomain> References: <152397794111.3456.1281420602140818725.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: HE1PR0402CA0004.eurprd04.prod.outlook.com (2603:10a6:3:d0::14) To AM5PR0801MB1332.eurprd08.prod.outlook.com (2603:10a6:203:1f::10) 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:AM5PR0801MB1332; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB1332;3:cnQ7UbZ+A2vYV+20f8Hbz6HWeMfMQJEHr6eddEiS3dV885vScFguC9pUFGkhR0Xk6chluE0oBRf9gXbs0tfNLsMUQ3itQhblivWryWBs13j4mukHF6RiqQmPby/nvg0DcS7ELEUIjjzMaITVRkrnxR62KHubQDK5CifmVB72QPxslO9IRiRqmdotJDm6uWPULMztE97YJjioWdbS5dYQRNSdWDBdoGUhD+LjjZb8hExf6YKYfRdtNd+XuyVL/tKs;25:REkWZBIXo3bUzH8B/4SgdZHEXo5Twjdri2ydLyKwjQuK2YsyQ4WPLwG5OPKqxNiycUfL9wQCtXN/De6TyDj7cEGBH8CkQI/ZscR9M/xbjaMlb99mMUtHh3mOZ138iyHcW6UIlM5WZqfQSKe+sux5EHYaFaxrJnG1ri51OAcrcgYXDA7cC4LGcEkJTWP/n6FnQKapSzJPrLBygqiHe3PIUsWK8Jhlq/urFlJTHpb6x7CFdZ7sTOuAytXpqhFnRtxXo/sSS3HzDnW8KSvbodk6nct5mqcbn03KlXmJEbMBRlPPMR20Zp2kdcZfT5u+AqdRYUtHzrmYGcQb3OvH4k2OQw==;31:WZBPWpvSL7zykOEYufnbSmMbK/JjB7fttONY3GLHgTocunK+UmdRsTkWS7RM140DLtuLj5qm8MtAS2nNS1xuJsgywOvg6zZj97bRFCXpwJy4ptCdS31pn7Kv56TUZID6r7syWA2KZbOa3ul+hJ9vf7PJozMaCROldyNogpej5Qj+u5uNsieUKpXnRiamNeMSBNAmcAElr/U9LlvfLycmmyAONF4UUjHxYHbRZp0Blkk= X-MS-TrafficTypeDiagnostic: AM5PR0801MB1332: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB1332;20:fN34n1Gp/CcUEn0fnpEGvW1KinG7OKd25yMZCsbZLAhOIHXWAksZqPqvGpiPIAWWuWQeJclE8hiQeb1RLOySfel1ja2Jc2C4MmO6Th1T2NUACZO4afa/ZT0WD+1UFnhXzlqZLpQoT9peLU1R7I9LR7IyS/BfbkYZ3ZOs7BTYD3DZ29Fgh33Opf55eTxpUB8DNb2aGLcyMFNruqXASdlM9IGCbga5Jf9CpTEb2ABCBds4kvazOoOjcRyffomfXmeKx/hwIlw2In7MONm7R/svGLRY3FQEPtmCYi4pOXtrkeTCnc3zdTHdvzUJi7ErvMJ6AZIMXl1T+1eMxmWBErq3D2aXtKSoPC3SOA+MKRW/sfHyDQk6E6JF/Vteo1Y1rP3+8ximjliuSCMeRZQ336Eyk2McgYttmKdfCZHGUdvTmFs3DA6MWB8NlnZy6pkHOwEuWgUp/OxdV2dORSnUXCrFweox0T6nG5x/wRda5c57575Ccus3W9ew8UdYhIKQO3SQ;4:z5c5srGkEPL0NHcWV8RPp1xz5EwIFRBAbQNPkzY43OpYGXR6XMZhZGzuoKQgWFYftQTo2rOSnEfQXUHEoOPdARiQHcMSxfIjN4CL8JcTsY/DynS4coveaJw6gyPPi9cusHHe1LCiMhe9H9nKQxeA9cT7gXXlpZJqBCxCnKyAgpOnvS6CFWdNh9T8voE8twXuaXnbdiufquPKOLqYXrswpnDpw8EAWAA2vRQvqFQOvaLoIuCHe+qtk+ryb5X91yeaJ99jcsHA7mjXBoZVV5y7MA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(3231232)(944501359)(52105095)(93006095)(93001095)(10201501046)(3002001)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:AM5PR0801MB1332;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0801MB1332; X-Forefront-PRVS: 0645BEB7AA X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(39380400002)(346002)(39850400004)(376002)(396003)(366004)(189003)(199004)(25786009)(230700001)(103116003)(478600001)(6666003)(6636002)(106356001)(105586002)(305945005)(7736002)(5660300001)(61506002)(97736004)(7416002)(50466002)(9686003)(53936002)(55016002)(68736007)(81156014)(81166006)(8676002)(2486003)(55236004)(11346002)(47776003)(956004)(476003)(58126008)(486006)(26005)(39060400002)(23676004)(66066001)(186003)(76176011)(16526019)(52116002)(575784001)(316002)(59450400001)(386003)(33896004)(6506007)(446003)(86362001)(2906002)(3846002)(6116002)(8936002)(7696005)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0801MB1332;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?MTtBTTVQUjA4MDFNQjEzMzI7MjM6TS8vdzRXVno4UHZqQWhlV3QzTHZ5Q3o0?= =?utf-8?B?OEp1NG5GNllPQmVRSWIvVFJkTXZyOHdiczdhc3BiWmxPbFoyREhYZUtkejEy?= =?utf-8?B?WE9MZGRTSExpZkNrcVpQSE5zWWJDelUvMlBVcDdBdXdSeVA0emFPdk5VTTZ0?= =?utf-8?B?TUh2ajNyc0RxWkozdmV0K0FkOHNncEllNVVwR0xEdWtPcHh3Sm5EZlRPQ0RP?= =?utf-8?B?bytLaExHQWluVkk3ZFg3dDY5a1ErcFg1ai9VS3BzcE9qUWduVUZMSmNldVpX?= =?utf-8?B?NVAwSnc0V2tha0lyZldEK2svSWhrSTU4VE5Zdnh3K1dpUnQ3dkdhZEtyckNY?= =?utf-8?B?ZFlLMjl5SWxtYjA4QWxnY3RDTEw5aUkzaE50ZFdSaVpNK1F5QkRjR3RBNXI2?= =?utf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dPPUjILCgPOjF9jMx8Xb3bltg35x0F5yOETxwKl45S0o= X-MS-Office365-Filtering-Correlation-Id: b45eea6d-019f-487f-fcfe-08d5a47b7fda X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2018 15:54:25.8097 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b45eea6d-019f-487f-fcfe-08d5a47b7fda X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1332 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 a92850bc209f..ed0f97b0c087 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)