Received: by 10.192.165.148 with SMTP id m20csp924316imm; Thu, 10 May 2018 02:55:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrCRk2hnPFDU3A2sOQmOmRgVH/bAdAsrvK5Kil19kxl/+E1bo9iVBsmYfMIky+nbiX9Nrt/ X-Received: by 2002:a65:4488:: with SMTP id l8-v6mr584279pgq.239.1525946137046; Thu, 10 May 2018 02:55:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525946136; cv=none; d=google.com; s=arc-20160816; b=07lWEWHnhI+92L8092tApg2ULeRmo0I/Ji+jUYH3crplup25o47VqnDvFSwvr6p7k1 XR8yHOtpkVTmJRl1iNiw78yCzpCVSfw4Yd4r9ko42+Nk+NHDE9qSEjQuCiuobR+8kTXx kPeRFBx2KcavlzgyVvMDKGZqZ7oAhi/iRhLsKJRVDcDH0AluBro4RI/SD5UFsdMlgRj1 w1obWw1QKznxCMtLCtv9JJgsHiBGNsJiYgh2RyMulxWFg9sejMHrdscHKQZ6Rkk96YeB U9StE7RsUXIJzamRK2P5zCdcU0lkkLQe2q1n2WCGIZsb5AbHoqQVrTw++/0LUe1W5ZK9 4ZFg== 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=+hHnX3Y6CMsne/gWPRYTEBzO6gul6SYjBQeAjVJMMJo=; b=n+C7tvAzhKZJYAvXj2Ilz4LRKRvSBJlm/eGJXv/Zvo7Hlh+VupIfw0oZ35V2vZpWBz Br9HuOi+RQQW7BVvJyznHYLnjqGAYX4sS6nPjYBdA8y6iv5LbheUMaAk2him97Op38TP DZLH/c5tpVaKpbCG8OetDHe4VhyCK5LEwC9fCXF+ZPmAjXm+ChxIUfx1zsTWmPx+XSgY jWvvLfcWIFkor8UiWOZfkiHm9LjM8DdSkJmYxTs6+R3uqSrTCCXFsLr7UWYacIpZBIof yeBS3UUlNL+gjIcGAKLPd5eF+n0jJp9c6VymPz1zQoKPKHCGWS2vo3WlQR0sH8qIDngi b2Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=aGxL2cji; 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 e13-v6si368795pgu.628.2018.05.10.02.55.22; Thu, 10 May 2018 02:55:36 -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=aGxL2cji; 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 S935127AbeEJJxk (ORCPT + 99 others); Thu, 10 May 2018 05:53:40 -0400 Received: from mail-db5eur01on0138.outbound.protection.outlook.com ([104.47.2.138]:61370 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935049AbeEJJxf (ORCPT ); Thu, 10 May 2018 05:53:35 -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=+hHnX3Y6CMsne/gWPRYTEBzO6gul6SYjBQeAjVJMMJo=; b=aGxL2cjivmjZ1mn8368J76BNHwxmhw6fGOvqBPkwMny9EBADG1tSpt6PqQd7eGs6ssSfjIdlQgEzwwr95cHpNAvvkbDYjr3gV+d3k6MlQ/bJniMAMrcfCfe6MgE2uxvv3ephc6dJPGpMV9iRC5K0SVvGILsqZNyYg3WwmHtGfqs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (195.214.232.6) by HE1PR0801MB1338.eurprd08.prod.outlook.com (2603:10a6:3:39::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Thu, 10 May 2018 09:53:27 +0000 Subject: [PATCH v5 08/13] 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: Thu, 10 May 2018 12:53:25 +0300 Message-ID: <152594600514.22949.13772959733696297685.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: AM6PR0402CA0005.eurprd04.prod.outlook.com (2603:10a6:209::18) To HE1PR0801MB1338.eurprd08.prod.outlook.com (2603:10a6:3:39::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:HE1PR0801MB1338; X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB1338;3:o67QlVsdZu+cpWiZSHx1xSQ94dCkvw6aLFXIh15Zt7KiiYQ+LzKB2w76opJ+akElrEZD+lujXUHwH9t92Q5oy4jA5eo6udO0IKRVbsj5dOWhszli8OrpAJBCF5UDH9x4B+2gastXTRgqWK0sRoOpl2Cy3DtdIXfbZyCjTMz685awj4RdhB6IgffRioUkGHut9zJa+e4n1xdwVgRZckbsu4cmeO9FOzsR5bUo55fyOpLY0NGqLdN845aL+wd8YkSF;25:ahghaAg+f/ncPYg/9ixuUs4M1jA+NfCMAJf1g2o9bmPjapIzgNkN22TX5Ik8ZfnmQWxhnBdFtG3M4z44XI9cUEzT7tQCfMwhmjSzZKgfi2rjwy2jNtA/ORH+vgzrbNxDgX6oQxUQTkhHZR+i36wLwLnWDESgiy3KSQaeXqf5A81JbRn8M3QA82lTHmfsHFXhLkXCN5onWehHJNSfasm5lKJIytSV703IMsvQn9NQxxYIH8HY32KmHVEAAgNxEVT3f5+6Qr2P8zNtFAf/YMGDIbbr6uJexsGQgUn2r4WByq1NfdN9ML6cMl+wiJECdcNpwZNJmoXDcpb4zy37BAQ8vA==;31:2SH2C3qhgHZIBkHtTal9TTyCUhSUrzFV2YE8dukFQsBX/4l0i4oK2VgjXvw/uIzKWlUDL6SPBHt0tHFuxZi+YorxGhQg322caN3LGCNUsAvqw2iQoVm74W5TabemzT77zhv5M+lImo0pKJP6c7J1b4HqpwooFCHkbvvK4rEzQxVnabY2MtzsYiYVjTkG2t2cmx7NwZbxI5Jvl7FSx1tpcNdeZDjVf7++A8rE7paBbkk= X-MS-TrafficTypeDiagnostic: HE1PR0801MB1338: X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB1338;20:244aepF6nQ+OTpgu1HdBM5ItCeJ539oeyrWKXU3V1OHfGAnFlGZxr44URwplbesHZrfTHwp6n+XAIvnvXr2H8wvOa9WjqTXDAPVLqWkvRvTP/wbUwu97X4PZhLQNnGiIYH8/TFNCzuVnKfrUw4fuq8UwmD5U0dSNGRlv/+acCr5xnzjc/YypcD5Ay/p93hXOoZOeYaS73PohYW3qiomuyX8BoEeUdiMfdtjdC3ceEW0V7lMg+kA86Q4tRgeKF1mWyOvxgrZdCrgPTU/NtTbC17BPCwL1wdqTBPNaXqYaTZZRFCZkiOPUaEXbVgUpmGj6YDrgOE9bbMFqPT4G4+yoy55KhsqLwCln2dWk1D895BhQG+eT2YYcsZiIl+kZTv9lv/xtBoDOLpEc/4oEDU7vdwNXmVM0p6aVq12OA/4qmVGOXB7Pd2qzO7Kj68fylRh0++LRjnjgWhm+UCYp0yZORPkUwV3Umy+Z136uJxNCZgZ/JC5Ir9nB0F+7iQn8ta7k;4:WK+57gcPIQwZucnN9fB8IdP+HVh7cZJJNA9kbWVp2+1VATORwwSOHuHHcj86oCf+SXzZUnrut3pqLpVjhJoHHkDpWqGdTu/+ZryyDH3y++yDjd9/kcKQ3I8cyJ8jTuXlM1UvYtIlcRrlfkisQxhjG6KdEx79v29LVT2obcbGsHqV7CPu1nSykjnDxekLyBQXoHdq5ffWD063WJDQr4jo1syK2CndAywhk+PgTTYhkHSJe2USWDlJwe75gKdt7PfibzaJJqjAhUZtv2mfRbUO1A== 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)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:HE1PR0801MB1338;BCL:0;PCL:0;RULEID:;SRVR:HE1PR0801MB1338; X-Forefront-PRVS: 066898046A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(39380400002)(366004)(376002)(396003)(39850400004)(346002)(189003)(199004)(230700001)(6636002)(97736004)(55016002)(9686003)(8936002)(53936002)(956004)(11346002)(476003)(446003)(3846002)(7416002)(575784001)(486006)(6116002)(86362001)(5660300001)(2906002)(103116003)(106356001)(105586002)(68736007)(478600001)(26005)(316002)(58126008)(25786009)(2486003)(52116002)(7696005)(76176011)(66066001)(33896004)(61506002)(50466002)(23676004)(39060400002)(59450400001)(386003)(55236004)(6506007)(186003)(47776003)(81156014)(305945005)(7736002)(16526019)(81166006)(8676002)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1PR0801MB1338;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:3;A:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtIRTFQUjA4MDFNQjEzMzg7MjM6V2xWTU4rVmRMWk1RenhSMld3VWVQb3dT?= =?utf-8?B?SVBScktlaTlQL05uK09KcmI3VUgrZU90UWNLTGl2TjR6eTBaVDVJUnhONDIy?= =?utf-8?B?MWZ6Y1hUN0tQTUpzTGsvakRydVBrMXl3d05BbFpIdkRvc3ZhMHRXVnpaWUNl?= =?utf-8?B?RXNXbXFlVTNUbjZyMnYvRU5kVEl3MUlmYzM2YTMwSDFSVmIxTXNsazRIOVha?= =?utf-8?B?Q1IyZ1VSK0YzZWx1ZU84MzIrK3NiMXdpazFzRENYZnlnVkhPNlJKdy9Vb21E?= =?utf-8?B?Y21UYkVJZkVaODc4dmdHa3BJSXlubVpUazE3ZnVqK2s4OEg3VXpZT2VVTVJC?= =?utf-8?B?NGtnS0VjSEZpY2YwR3Uwc2F1UitWNTVBckdwcjExZHpuK2pjUVp1amZIRnUv?=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KSqx5oYoUq2WTwMx8hk= X-MS-Office365-Filtering-Correlation-Id: abf3e03a-fa3c-4976-aa9c-08d5b65be1f3 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2018 09:53:27.0664 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: abf3e03a-fa3c-4976-aa9c-08d5b65be1f3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1338 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 a63b7a4abc6b..a63bad2c981a 100644 --- a/include/linux/list_lru.h +++ b/include/linux/list_lru.h @@ -68,7 +68,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 0721381b2e3d..46b805073ed0 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 18e0fdf302a9..df9e7f159369 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3173,7 +3173,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); }