From patchwork Mon Jun 18 09:46:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10470551 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 94133600CC for ; Mon, 18 Jun 2018 09:46:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 824602899F for ; Mon, 18 Jun 2018 09:46:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 756FC289AB; Mon, 18 Jun 2018 09:46:43 +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 D45BB2899F for ; Mon, 18 Jun 2018 09:46:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D9C7A6B0010; Mon, 18 Jun 2018 05:46:41 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D4CC46B0270; Mon, 18 Jun 2018 05:46:41 -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 BEFB76B0271; Mon, 18 Jun 2018 05:46:41 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr0-f197.google.com (mail-wr0-f197.google.com [209.85.128.197]) by kanga.kvack.org (Postfix) with ESMTP id 5E9076B0010 for ; Mon, 18 Jun 2018 05:46:41 -0400 (EDT) Received: by mail-wr0-f197.google.com with SMTP id p9-v6so11330591wrm.22 for ; Mon, 18 Jun 2018 02:46:41 -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=6leYxXL9iW3gR1cD0ZX1WFj206W8I3CyLplpPKLVeE8=; b=CGMi9WoduJXioSWbJwEjbWc5wBBoHlVkfCLCoWpwH+4qeQfr1Hqe1VxxXZ5Cg4lliV 0jN6d120jwtbC/MRa6Bs0yERcVbSfTFoDYNvEYms5kHW1Ap3FGPkxRQP6JP6OCQv15wU Cbt11M2WGUq+afYFCo9kT5gfgxrCi19ndMBExK6FX/Ae/8v+1nKzgvwfhhiWh0R9ojye tf55aDMZcWwP7rrxbodJjzYjC0+uATc+RCXBPXSu0abU6CUQjyzkdKvLpRzmeNfo8XPb q2tQ1ohCp74m8xkyihoRL+OerKMg43uK7vEr//EiW3jBm6Z7HhT2W1HVwAHhhvubslN7 bMsQ== X-Gm-Message-State: APt69E1q0yWnucO8FqtlT5JCf1/5+oU10N/zms5MY5ICf5EgzxMDirhH H6jNiwvfT9Fv0v+nFOe19dyUxnqYGREI3yyEMAMXEG9pwL2V78iC0moCssq4c24oHmHUSkOlrv/ G7g3UQtMtgbdL2GHEC/NEeIp1Kz5AWW+AAv5/zPEnF54of6S2yWR8L32Wg0ReSXfm6A== X-Received: by 2002:a50:ac13:: with SMTP id v19-v6mr10671795edc.153.1529315200968; Mon, 18 Jun 2018 02:46:40 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLu1MqYgpXSW035Mk+p86+Mo9dt3l9n9gq9HlP3sfMT1+EUDhqYXhTLH5hJ9wchRxQXi/ML X-Received: by 2002:a50:ac13:: with SMTP id v19-v6mr10671750edc.153.1529315200011; Mon, 18 Jun 2018 02:46:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529315199; cv=none; d=google.com; s=arc-20160816; b=pC1V5fiiRMXGk+8Wj7+sLdw18RXTecr8gfSPOdiCyiP7BDBlzk2mKzneMkYnA2AOJZ 76XfkWfK5CbM67x2Irp9tKF0iCD4kyK8j/tgGDjLa5pHsDRQhrFlJclR08JOIuiCy074 X/jcFl8e63RZnXjmEOOIM7B6Uz3Ybn6t+nrJNkPKWj/f4nmwWJyWgrGkdK//GkzIyLhp eAfZIMn+N3p4b9ZFEFW3QGoAkz3a85Rmp8b6EC/G6uNxaXCjaVA5rNN3dhGo+15q9mRX 5DUwfkwstjuXjkcfJfF3X7XDDdBuX75PtLnshnmx15FayNwcE8j9T5PCMhG/u6woU0qJ PHtQ== 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=6leYxXL9iW3gR1cD0ZX1WFj206W8I3CyLplpPKLVeE8=; b=eHgHr5uJG7RZ8z0XM/jPhbj4NJ0ZTGi8i936kNV+UNpI5RZ+tZmZ4uQvk/xI0YeYy0 XIheBxAQ1JC8+vKgkD7HumxPVUI4Z73zPOYXM8rhUDIPRhcCC7Dygp8YlsEqljI70Nwh PA0LDXnHq3sqgLHy/oYlnZe5KwGoiQDBVshCklcl06te9w4eEXlPihWOgPuOm8W10sGJ z6e4cQ45u0q1dKHpgYWK4BGVmXOYqB25t6oPuQaEFzyNdtPQ43X/CYhGqaTOtiwIBJif P4tkx4VEmzttaVfTpP0gijpBntHdsfJslLT3YAjP2SG/Li8K4lkUh5J3WUNRSl1UZ2HG WvJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=LVrv00EQ; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.2.123 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0123.outbound.protection.outlook.com. [104.47.2.123]) by mx.google.com with ESMTPS id u2-v6si9752585edd.23.2018.06.18.02.46.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jun 2018 02:46:39 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.2.123 as permitted sender) client-ip=104.47.2.123; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=LVrv00EQ; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.2.123 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=6leYxXL9iW3gR1cD0ZX1WFj206W8I3CyLplpPKLVeE8=; b=LVrv00EQI10tdCpDWd2BxyZTzb80+DL31XlzKYYEjfndy6rYk6JTYlbEXp8YXw2fPA099QD5QzSJOEQgCqmosiNIHkfwYPSyVMkqKMpX5D8YRN3mnwet3NUzEC/DGq2iGD15cRY45FSezLYzpzqwqgHC+AdK41V4KKm1nTIYzWs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (195.214.232.6) by AM5PR0801MB1330.eurprd08.prod.outlook.com (2603:10a6:203:1f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.19; Mon, 18 Jun 2018 09:46:33 +0000 Subject: [PATCH v7 REBASED 10/17] list_lru: Pass dst_memcg argument to memcg_drain_list_lru_node() 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:29 +0300 Message-ID: <152931518976.28457.3042342901552911633.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: HE1PR0902CA0036.eurprd09.prod.outlook.com (2603:10a6:7:15::25) To AM5PR0801MB1330.eurprd08.prod.outlook.com (2603:10a6:203:1f::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e6d2f81e-4ea7-4235-56ac-08d5d500612b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:AM5PR0801MB1330; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1330; 3:NoScYBrFtiqHkhqFR5Yi5Mf1IpEkCzg2hP3yCQ/BFsSFrnnIEu8i28k3SI4mLU93sXTGUbqQ7UImAv4PaPoaZTYT1hbb63z3qVI0XwuaA07myxsBhzzHf0Si2lb80JAGRCI6zcd3Jqto+EOqxqG29E+I4O1URZV8cyry0j32KR+MTm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OOAredPabf/uBuUYGxuSKfEqJ9brFcShAbSWXQ7QX/CzpeI91l2DIh07kuTof43/RA8Ol8ou9/wgzuJGtdX5WSxlzp9mDqWEB4WD0Fwg7z6bTsM2Qz9w2KngDS4MoZhnfJFh3ssLwJNkHK7p5GpH2NotTH4rI6T4QTTUeI4m8HmRMt4d5DxbM2; 4:eSEdyx0+EBVe6OylUi49ZYnVpizUNbu+IVQhyLaeOsYPSo6BD0A2S3Eawszno1LXtbVtaqJV5g2FrIo10hlsmOgr40TWqhEAArog0HZJkw83JKKW4bkPIDM6CaZxLana2X+hxay7PRqr2OAJx7+FUsfFUZr9PJsA43IRceNsrUiVB8A/0nPHmS6ZUmuxjirf7LyfGgBVm50X08UTpNs0jQwenZK+k4XkF1eILKnBReT2feXUo2/hYup/DWMRr2rkwH4CEX9VOkTIhf3HW6Ymfda540dlhsFrG5yiGU36J0WGu0pFk8hgUMczE7Rp9rD+yvACTLlX5JUXL7advZSwN/U7sDFB/62SYbxgVzTTE0yxPY7vGbd+MgxJ6t7PVr7n 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)(5005006)(8121501046)(93006095)(93001095)(3231254)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:AM5PR0801MB1330; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0801MB1330; X-Forefront-PRVS: 0707248B64 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(376002)(366004)(39380400002)(346002)(39840400004)(396003)(199004)(189003)(3846002)(6116002)(305945005)(86362001)(50466002)(103116003)(2486003)(97736004)(47776003)(8676002)(81156014)(81166006)(8936002)(478600001)(23676004)(7736002)(230700001)(66066001)(61506002)(76176011)(106356001)(16526019)(186003)(316002)(105586002)(446003)(2906002)(386003)(26005)(956004)(25786009)(39060400002)(55016002)(9686003)(53936002)(7416002)(6636002)(6666003)(58126008)(6506007)(33896004)(476003)(55236004)(11346002)(486006)(59450400001)(68736007)(5660300001)(7696005)(52116002)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1330; 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?MTtBTTVQUjA4MDFNQjEzMzA7MjM6N3hVd0ltbWZpVUEwVTJhWC9leSswd3Az?= =?utf-8?B?eWxGUE5GVHJYYUg4TEt3bStvYmU4eEo0K1owclUzUVJrVXkrZ1Vub2JhcjM3?= =?utf-8?B?OUJrQllxV2kwb09Oekc3SnErKzlzSWZBemFnUUFncFhSQ0lNTlRHZVVGQVln?= =?utf-8?B?RkxWT2FUV3VzVTlsMnVJcUpmbVB4NjhWVUpyUUcxekxMNEd6NUpGU09EUlp0?= =?utf-8?B?Sng0RXZ6SFZ3R2NXMTcrWG4yczNJeWxqMGdGT0FmUEt5NzVKUlROVk5mRTRM?= =?utf-8?B?YTFGV2xUbXVDSEVuZ1ltbTdFaGlMQ3pIMFluVzdUZDJxZkpoQzM3UEs0cW9N?= =?utf-8?B?MG9NYkZXODIwOUxURlJ6dUVnT1ZmWGhOU0pZbmRoM2cxVHlnSGpQaEJUNGxn?= =?utf-8?B?VTY1czA1UXFlNU10Y2xQaHBveDZDQ0MrbXNxaXJUbWZBckZyK0R5MW5XNWZ6?= =?utf-8?B?SWdWVHdSMlhwN1FnRVcwZHViQWFHQ1hpVHVDZlRYT3RrV0JEcjJsWlEyTytm?= =?utf-8?B?QUR4YnpGM2E0MDRLaS9yWjY2MXJ0NG1aTVRCTVc1UnRuSHBpUHN4RWo2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emGLoVYGnANbWpZ1zLc2SxKBttTC4n198Boc+evv1NsR6IpE5HsBhrDpUX5HPrlN+r5+5JcFtvz9dXpuE6gvK8jUmaKiV5kTlpCbA==; 5:zOJrWu8ssePkbat3+Vd7IIU5sv8cJ/SCsdG5yp7c5wKkjThLG91uQ4G0JU83BLRh/r3VzJKWLyB/M2I4KNzkX7qaXpe8K5i0AULMTql5kkL0iRe+W+6igVkiQ7PK/2EhKGCyFdLIJ3cIl/qBpeHKinQZbOvOIGuAl0QkJ0W0LlM=; 24:Qf3v341158RJVNv3n24pN4mEpzkVLtrPK5fexe679ugCuJ0yNBYoxUDdFiHyF2EcibakDnHvJx8/RbQuWe5BvfP7HRLrEDYxf9ONjjM7IDM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1330; 7:upKs2MfteLhECxeMTBClbTGYzHKc2o2JbX9swfhHXXLbpyiheesYOCgGVr5G2QPLGkKJjeI1ocFc6xlu7lZoZ+oSs+qUJ0+FL79bzTi4b4DPK145UjeyDJtDBxxpQDj1gdcds9lhrtMCvt8tJIJcnQyU35M/gjQxYELU6ox9+A2bJedplMBhFxVLbJ3PHCBdHJv5mizvopNvo3I7quX8MK4ahKfbX7nSLtJpWikriyum3Hs0vX1dE7wKcoK6fJtv; 20:gKaAbvco/D7Mm9b5N/rJvKuDUSdIHjYkJW03f202E4TfmiuKp2FmCC5aI67HPIZUKOp1GnsYmkJ7OhIRh1tecEMkSlQhg4+gis0VeS5hzl3ue0UnzCAuKhQV7Z1i+I8zMNwptT9NGTq1QRwjzmUkKmiaoEavae0jZO6SXKwPQgM= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2018 09:46:33.4270 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e6d2f81e-4ea7-4235-56ac-08d5d500612b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1330 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 This is just refactoring to allow next patches to have dst_memcg pointer in memcg_drain_list_lru_node(). Signed-off-by: Kirill Tkhai Acked-by: Vladimir Davydov Tested-by: Shakeel Butt --- 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 55a76465f7a2..a66d13b16046 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -508,8 +508,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; /* @@ -529,7 +530,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; @@ -537,16 +538,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 f80a2d1cd880..2b703c4130bb 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -2965,7 +2965,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); }