Received: by 10.192.165.156 with SMTP id m28csp212570imm; Tue, 17 Apr 2018 08:56:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/3QE5qLloc6MvN/127451AzOHM8Pi0hd8d/TGWUnkvoEIrwzcnWV0GnkgDJv1TNe8ACV/o X-Received: by 10.101.81.65 with SMTP id g1mr2299081pgq.104.1523980581820; Tue, 17 Apr 2018 08:56:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523980581; cv=none; d=google.com; s=arc-20160816; b=V627ffqR2H2V1VINgrwHRjh+YqRYzbKuijC0ToG5vOCd+YZ7w07pv/WhKLodohVvBK 2xp6N2Vqihi6v0MY+fY5zc2ECnzh+4ODVq0/fRlhVzy42+aDXGyLmCgAEVMpkcb6ZaIj U5+UnpuczpEg6sP+x81l4pq4oP9E0TolvUJtZ68u2xd5SCFXjFRbwh+qFufKmN0wYSve iiekakcJA/ev12jPUdA3YKkTaLfL8Fe5CJdieqlSLLFxjPTA5zhLvdaFMXA7icbbln2d 1v32rnSwW7eq7WXvLznX3HhlfHPzwcn2zU86XERJj2vrTMYtVSnZpmssX9g6yrr27/Fy yONQ== 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=ruSD0UuDyOdambKv7oX8WxQIAvH/zaqcOxiB1s/gliE=; b=bpJAqJMvYysLlw9I9Ka5yB6CMBHB3aQZRvEM4vZIXR50ggPdjx3I3yMwo6vYdwalNp qX4+SnNk9Lksa9yxbFzjMsKfV/UCJgecGmhcjqCgJ7iuSqGR+gWLsS++L47b5HIS+hRx L21h17TDgejwHXe4+zbbCDSJpNe2cFlx3yYoII7mFFgBHFhtp3t0b6sayfa6eItGgkfa 3BvTyjUeN4kT2zLB7UALPhLGLsZz3j/SxUJk2SM7QhfFSTTAXI1HAIpSExADwMm883Xa yBdLBGgT1BQwae/s4mXHH0ysb27iBQNEvz3ayGLskVixhh62RN0IfdPLEOKIOwphIlEU JiTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=WtkBSuIH; 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 l33-v6si2596865pld.512.2018.04.17.08.56.07; Tue, 17 Apr 2018 08:56:21 -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=WtkBSuIH; 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 S1753270AbeDQPy0 (ORCPT + 99 others); Tue, 17 Apr 2018 11:54:26 -0400 Received: from mail-eopbgr00121.outbound.protection.outlook.com ([40.107.0.121]:55038 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752192AbeDQPyX (ORCPT ); Tue, 17 Apr 2018 11:54:23 -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=ruSD0UuDyOdambKv7oX8WxQIAvH/zaqcOxiB1s/gliE=; b=WtkBSuIHdd39yWO2n2xBeJcTt+Rv+AsNROBw6W0YeirlYCAOwfEAj1AMV91jW4gYVqVi93hBiHv4z0ONgUV/UgClFLqPlF7yU3eO+lEoSi3ydBbZP7n1E78oZoN0LU1Ow/ZKaD2n1QdaeVZv8GjZmgf/bn7Zr1P4Tf3+dAeVaTc= Received: from localhost.localdomain (195.214.232.6) by DB6PR0801MB1334.eurprd08.prod.outlook.com (2603:10a6:4:a::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.12; Tue, 17 Apr 2018 15:54:15 +0000 Subject: [PATCH v2 07/12] 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, 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:06 +0300 Message-ID: <152399124671.3456.4156323309583190460.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: HE1PR0802CA0003.eurprd08.prod.outlook.com (2603:10a6:3:bd::13) To DB6PR0801MB1334.eurprd08.prod.outlook.com (2603:10a6:4:a::28) 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:DB6PR0801MB1334; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0801MB1334;3:pDk4aiwbAawWv8D93eBXWZoBG7PgUC7RRs1AA2wcEN8nmcBHzaUGZ9rl22qauIwM6ZX/wyuoN/FVQsZl1LNmSbZhFGgeaGkDPWbEj7AzC//0KZL5WAoYEtQsOUAQhE1fDV4kuDuyoznWpqtAO5gR+H9YhG/2QYqB1T/JnuwYKw8Jv+/UY6tuBbfb0fb0VLxYqsUpUNc8YLIn/YaBce+hGDadNgzfwJhTbS0qVVf11nVnnYuMuMlNdX2BPM1wC03B;25:z59tJEcOv8HsxqPBThJPTi9Jp1H8ijVocDxbObqkNNhzwglPCP5sXOw/CUkDuqzUSLvJr3oRIVKhp80JlfdjSxIxo/ENNgKi93Drmj+xvPrR/1jO0bnFKEDj//6OdyXWh61OmeXTI8BJD9j6+F4BpQCuL673CdIZ0Tbh52POTcGTiyPdEFWmxCZNzd/4FUmj2YNuysCon9tph1CmGjLIh8ca0WmSULsgYjJRBBnTqQdigGnQGHsAtpWYGLgMJsSM1ZzMWmUhNHGxu87vyrMy4uPKW0GiGHF/i9qFA1XPiHX8SPM2IdErFfUebpcWipo6eYQdp8E4PI24f20uB5KdWg==;31:3RkzkUqrg35WatFBp05j1pOHwWKGwUa4MYOin+5g5bkDn4HOYecYdqORPmsKFWk3KN6Yi8QPUKO9I1ZB+bozniD3K2AGDShpxtBtubafm4CekgRzb5hJ7X7jxKJHdbbfnkV0u230WKjeOBIe3RfEY7eDXyM6PeHejdrrTgI7iJ7MXditYJ8zfslV9idwOP4TuonR+nmI4pKH4izJtR0fdu72+/2dmcKdpktPWpTAuo0= X-MS-TrafficTypeDiagnostic: DB6PR0801MB1334: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0801MB1334;20:tJ4Hais/kdJrzwsYH6UQFmD1QT9uZm3lpq3GxSxBAHdUK1MVU2kYeGjeMcl9iYPC7Jvs+wxggT5IzzegxkTXNKA0QvZKyzv6zAdCvbH9C2rzF9OKipP4lQcVbcfde45Jgkh5iz4SvPvgHagi2bszTLMNaVioVE1OalTg+Ps6gYx7reUpwBHQyGO2rjwL6iTUbreVchgc9ZpLC1aiqpTkHSkrwU6EkOv0iyk1U1TZfIBpvQk7UAO8cpLuyh0FqeK//SW5Z9xkGFM1SuL9LH4+Gud8EEbJa8V9vb5S37DhGhpwDH5qVJXE9zjZ62/sEdFKE5ipp+/w2Vki5CXEW5PvpzaNPXL4kBKn5UKzq0pfCmrduGvQyUS3Do8jRqwhWWH4SESS1oZq0M69ZTYXUuAj0VMDV5HB+nMVr9whp8cdCgTlr6GUDx+rK6bKI5bzmiOcLINBNzN1ydut5IH9L3mJe50JrTRlCd2Ba6wykKIlk/CKTvPuFotuFG3AIEkKNQ2X;4:fqx+qwjZ4QKjnWlmRPhRxY4/hLwgbOlLxPaBWG1TjuhDqAhxIUxsKz2VkIC6wKhCJTqiavsocXKKldgsq71lGVBc8/HD/8YbhdZNqHNFvyP/WR0IKABpjR3Z0PhWt14X6mCKe5mQfNBn1MjsCPJHkM/G+ZNl5MqFnGU9n1u3QnkDV6/VntbFVSeP1gBnkVK9bZOzFatxpyxN/Ah/usHHJG6sAQWD7AktISG4yxn6s6tVEzXovHAU+SYmcUqTvftjEjR8GHTAz5ZAXpdB8si2Ng== 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)(3002001)(93006095)(93001095)(10201501046)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DB6PR0801MB1334;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0801MB1334; X-Forefront-PRVS: 0645BEB7AA X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(396003)(39850400004)(346002)(376002)(39380400002)(366004)(189003)(199004)(25786009)(50466002)(956004)(11346002)(8936002)(7416002)(486006)(230700001)(186003)(3846002)(26005)(16526019)(6116002)(386003)(6506007)(446003)(86362001)(316002)(476003)(59450400001)(6636002)(58126008)(81166006)(6666003)(97736004)(478600001)(81156014)(2906002)(61506002)(105586002)(305945005)(68736007)(52116002)(7696005)(2486003)(8676002)(33896004)(76176011)(106356001)(7736002)(53936002)(9686003)(39060400002)(55016002)(23676004)(5660300001)(103116003)(55236004)(47776003)(66066001)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:DB6PR0801MB1334;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?MTtEQjZQUjA4MDFNQjEzMzQ7MjM6b2NpMEhXZEw0bXZBZUlrZ3orUlJndVk1?= =?utf-8?B?a005c2RGRXFmZjBCcVRUZmgxZXJVOFZiZllpaDhLK25Rck0rTnZ2SGNDMHo1?= =?utf-8?B?TGpBR0hxektWbFk0NFJiNGo0M0JTanQ3ckpzcVdzazNVd1FFY3dIQ2w2UWtR?= =?utf-8?B?UCtPbEp1a3dzWHJkM1F5ek81SzdPd1BJaWpSQlFDY3ZnNUJabHZMNnU5N0J1?= =?utf-8?B?NmkrTGxxNjhpWkZiVHFYYTYzeTQ2ZnFOL29MM2FWWHVVZGFFTDdtdHpQT2I3?= =?utf-8?B?R2Q1bDNTbVF6eFlpTy9Lc2sydjlzYWZGTzhaTllOejBsb2JvUnlZVnZSVEdW?= =?utf-8?B?UlBSZHp2T2VweSt3b1JuTUVZbEg4MEZ5dGp0UWVKWGlD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WAAqLg4CvePyu3XYZV5CnZK0ALDSDk3vkcRBGfQF5iSYwnAN5AD4I4amY0AdHBSc= X-MS-Office365-Filtering-Correlation-Id: ba71257b-9bec-4a21-c433-08d5a47b7a2e X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2018 15:54:15.8266 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ba71257b-9bec-4a21-c433-08d5a47b7a2e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1334 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 f5b6bb7a8670..5c7db0022ce6 100644 --- a/include/linux/list_lru.h +++ b/include/linux/list_lru.h @@ -66,7 +66,7 @@ int __list_lru_init(struct list_lru *lru, bool memcg_aware, #define list_lru_init_memcg(lru) __list_lru_init((lru), true, NULL) 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 437f854eac44..a92850bc209f 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -517,8 +517,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; /* @@ -538,7 +539,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; @@ -546,16 +547,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 562dfb1be9ef..ffbe65d43a15 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3182,7 +3182,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); }