From patchwork Wed May 9 11:58:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10389275 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 8923760318 for ; Wed, 9 May 2018 11:58:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 292372894A for ; Wed, 9 May 2018 11:58:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C643289C6; Wed, 9 May 2018 11:58:19 +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 86D0F2894A for ; Wed, 9 May 2018 11:58:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 76D706B04FC; Wed, 9 May 2018 07:58:17 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7434C6B04FD; Wed, 9 May 2018 07:58:17 -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 5BDE46B04FE; Wed, 9 May 2018 07:58:17 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f199.google.com (mail-pf0-f199.google.com [209.85.192.199]) by kanga.kvack.org (Postfix) with ESMTP id 163316B04FC for ; Wed, 9 May 2018 07:58:17 -0400 (EDT) Received: by mail-pf0-f199.google.com with SMTP id q15so5921584pff.17 for ; Wed, 09 May 2018 04:58:17 -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=y4f/Z84jgesPAzDt/+MgepyFhKOeCdLWUl4AZVB3hvw=; b=lpSnd7XJQ3pIC4KEnWoy3gkFOVV3+NOohqpGwqAaxMxGDK4MyhQ1o4MiZKVQtGuThK M3ia5urx2HOwpzIl/ppSR+FIef4S9H2KKG2wBvuGUFZ4m9hJ5V5Zijr6qOuClWaMcgYO 9XGJTUgW2+9tpz3e/xwl13VRHG/eFRkjdiJ3hnQNN7+KHMTdnnL5KrxS7UUZ2ikySUyN DsbWlHtzJKrj6iOhomT03Oy1F7XC5BjTUI+qC988EBwL140KbFZrwXhN7BslO1MEf6Nq ubD4zJXSYPwk2HRYTEJLx4cU54zPqa7E7XyBmgwiqnyij3Ng43cT1BnWk3DeJS5xOEJO AV6Q== X-Gm-Message-State: ALKqPwd49jO6idKz5MnJ500anqkemPDvfEEKc3BocHMLHvbARbTAtUHq 4yOUADoxZB4G0Sk6hg3yNPCnG++0gNTtPtDJdD9BLKRzSQE6cB31rXXIuqEQgD4jhY/U8LDWAfP Mk8lXgJH12Ksp+Ugr1yV3v1iKLf412jdrxwKhGBIBIc6KUkyXBKNQG5NZ2qS6+qIpZQ== X-Received: by 2002:a65:5ac9:: with SMTP id d9-v6mr1798931pgt.342.1525867096771; Wed, 09 May 2018 04:58:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr3dZBo/GtmJk2cF3ezjc2R0B0Q6rN8O6PjhdpNUyeOfKGwNGrQ6E9NNA8EaIrjzh6Ztvw8 X-Received: by 2002:a65:5ac9:: with SMTP id d9-v6mr1798903pgt.342.1525867096015; Wed, 09 May 2018 04:58:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525867095; cv=none; d=google.com; s=arc-20160816; b=hvgzATlq36vNxJhs0GTAU6es0CdqN1LE6vsFFvH5LHoewthiOgpU5+lORylvWoMJpr u1vr3guyuubLUMhJjG9U6u1cH/d0LT+ksW6q6NMsBKHTQXl9eteBCBS+I9fw1y9KpsTY EpPogOFYbIur48PWWn9Qtw7cWBdv65VZ4bmQq0EqSnEIyIkiYnHBnxbuniNAmW/kFUV4 CkiSFPlSgOaHquHT0rtY6+iOnl4irG/LdsAHYZeX/jqZeooPqJSiV8//ocDitblpzWHV pk2B/bs665zYMFDlJN4d7gciJyA87zXNR1gcR5qs1lgV2Wpv5H1/xSVTkGwNqTso8dUi EE2g== 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=y4f/Z84jgesPAzDt/+MgepyFhKOeCdLWUl4AZVB3hvw=; b=nB/AphAK/ZYFoURgRvHdt1wajM6MTt+NC3oMEEZ0u5xD48Nen/ZnmH/1Aq4k+nBpgT 6jd7oiDjfFMB5rOsJuNqBDV3dJ6C796dqXOsKkQglqXmWPcbQf2rrY2HEgkoKMJuKDxR VBLXCL4lNZzn+vyiYJk2bEdwYEzs7OzgvBsHylYgIOCt24g8DhfaczboBO+xUfxIjw1P UWRAgv+geKF2OAqMfOvwW8qAB1GFfQEPJ/ibgggveCmIDg+4QIui1bzFp0Znvz+4BzFi LsY/7jtz94tyP5NdA2JVpNo5I+VOu/JL4f80khn9EI+Uq2DYA00IHohJ9IbJGUDtbaLK H+yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=DdBxG5kY; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.1.97 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10097.outbound.protection.outlook.com. [40.107.1.97]) by mx.google.com with ESMTPS id 2-v6si27961000pld.596.2018.05.09.04.58.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 May 2018 04:58:15 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.1.97 as permitted sender) client-ip=40.107.1.97; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=DdBxG5kY; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.1.97 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; bh=y4f/Z84jgesPAzDt/+MgepyFhKOeCdLWUl4AZVB3hvw=; b=DdBxG5kYFvpNkG6y8p44zzrwRcQ9ZFEtGD9AuW8J3PawY9PMtbsB3oQzXspmtCzlEIWTB0hKSAOtc3ZAJzlQBNldSJKC9puTSLRL7IiYGoA8D3m4UV0JW9YC1Elajj2H8sTcbfMBUL3B1NXwPZeQxKEIm7isk8hn6yFsyFjy7M8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (195.214.232.6) by DB6PR0801MB1335.eurprd08.prod.outlook.com (2603:10a6:4:b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.17; Wed, 9 May 2018 11:58:10 +0000 Subject: [PATCH v4 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: Wed, 09 May 2018 14:58:08 +0300 Message-ID: <152586708816.3048.6939581936417857559.stgit@localhost.localdomain> In-Reply-To: <152586686544.3048.15776787801312398314.stgit@localhost.localdomain> References: <152586686544.3048.15776787801312398314.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR1001CA0019.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:3:f7::29) To DB6PR0801MB1335.eurprd08.prod.outlook.com (2603:10a6:4:b::7) 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:DB6PR0801MB1335; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1335; 3:V2mRCtpVkf3k4LdV4mrOW9H6HK7XilOxkGtTdYCBMj/sB42IpukGtsbydDEm+CVoxY6l/AklfhziyevPJfHl0TZ80qtafQeaVQnxNlEpL79BE1onWenm+KoRwsAWAXREAoOKd3YeLNUg7JHkYQeMqcjW3UVnt2YNQt2Eu0mVngdc9AGVWqbkz3TfBBgTI36iNdFBAuvR07AzZZUVgL1V4PSqOxO2qjbDRfReYS8gLpmMD7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H63Y1ZiY22/ATEzPqLGiG+4R0vKkoopfXPgtLl1/trdR0oh4C4pp3A7/s+LgNiDHLmgE+Q/q1F5rXa94d/rTZR59hixb0bdsD4Xr500zBuUT563i0OmN+3snmOOlRA4; 4:kay8DRgHGioQdRheITHvDFAC1QGj9gajwGdmP/IzxWRMttfrmZRkpzgfdZ8NJaImVSvS0KJ70/isujh45gQZybxWojuYoA4sIWd/5HqoyG7QYUd3G6OZj6mKQHd2GCweubtScPryJ9C2aLhqOC/m+LWa2+9Ndo0+e1/8QcsN9sZ4bSua0A21plolrDfuwEoXs1E4bfqz7aYuZHYOElFtO5Bwo5SQ2hoTBGchd9iqD8P/df/qnNH4KA+EsvDdhmg5WLtPHMUkylL5GI/0ZjOKgQ== 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)(93006095)(93001095)(3231254)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:DB6PR0801MB1335; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0801MB1335; X-Forefront-PRVS: 0667289FF8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(39380400002)(396003)(39850400004)(366004)(346002)(376002)(199004)(189003)(52116002)(486006)(26005)(59450400001)(55236004)(476003)(86362001)(386003)(2486003)(446003)(61506002)(7696005)(6506007)(5660300001)(58126008)(23676004)(16526019)(105586002)(316002)(11346002)(956004)(53936002)(66066001)(47776003)(7736002)(33896004)(9686003)(76176011)(55016002)(39060400002)(3846002)(8676002)(50466002)(478600001)(97736004)(6116002)(2906002)(8936002)(230700001)(186003)(103116003)(305945005)(106356001)(25786009)(7416002)(81166006)(68736007)(81156014)(6636002)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0801MB1335; 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?MTtEQjZQUjA4MDFNQjEzMzU7MjM6ZmNuUUZQMmY5VmszaHZ3VjU1TExqaGhw?= =?utf-8?B?a0Z2a05zbWxURmM1S1Y2UGo0dkRJYW1sdEt5UEJYREQ0SXIzdUlvVldWdVM5?= =?utf-8?B?eXovQTRZak5uSDl6Szd5Sjh5UVVjc3VvMXBLUEdTanFoUGRZSEVXZ2tiNTlD?= =?utf-8?B?eWpKWjRpTVJ4aU13WVJ2WnlrR1BGRGZuNkdzS1d1WCtSRENzVkNGeXQxRm1l?= =?utf-8?B?dHJQLzFhT0c0dDRQTStUcWdTYnFCQUVkeVhicVVMdHRNakZvSmFET2xxeVpv?= =?utf-8?B?Q3lqK2l0SXBQakNoRmxzU2dsYVcxSGdLM1M1d2oxUjNjWFdpMGlacFRhRnkw?= =?utf-8?B?NExrU1YwUVlBem5nQUpETjNTRGJFZm9XWTk3NlV2YUJBSGpPNk5SdHF0ejhk?= =?utf-8?B?R3Qvb3ZkSkVTMGQ1REhEZkszOERpK2h0cHUxSExDYUs3WURmOXFHM0paVG5i?= =?utf-8?B?alRsU3ZJZlBuU2ZuZUdOYVpLQUJoWTRSWEQvQU9PbHFJaGNuYWlna0RYT29T?= =?utf-8?B?K3FhVDJmaVlHYWkwRUFZcmIyUkZuTmVLbk84TG51SWY3bGFPU3AvUHJXY01Q?= =?utf-8?B?TUFCSW5zSVp2R0ptTEdDeFV1WEpOUHpPNW9Yazh5ZnAwL2R5UXRpRVkrY0hB?= =?utf-8?B?b2lhKzIrZWIyQUJybFZUdUt6MHNVOXlONFVuTnM0OElLc3FXRmhrTExyaWl3?= =?utf-8?B?RzZmQVc4SHBOMW4xTXprVFNZbFYwNWVx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9yZ9aIXGC3jse/jyN2X0c5vJ57TdJTwnSg303aNmMo=; 24:SKDdLn+QN4Pb+CPXwjR9pDUPfhlZfvVJZeAwnWUpsVR6miUsScZlVqXAHAVQER2t8YicTEX0YyVP/Tx6F+B8v7vLUalMTvlse/ZVtr3aEc0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1335; 7:v8cAz4HfVkoajPL+Rb44bdxb8YpB4rGcXzed/q4MAmJLDaYO3zVB7o8rbcZYk70wahmRB/i/FcRUyEJEty1SVzJTz6vWXNPu6lktHwnW+iEiV6cLVNWTPHE4E7CSw8Vkye44CByMITnXMC7kGg0AS5rTk7BVbrPL4r7ywGz0zDjfSUbd/9TtJlLb8TBJabHi4Z6t7+fGLb5KYcj5np45ViOB+V2sz/cG8sfJuSdbadaYOXR7lKRLZKIf/clGts24; 20:78oFqEzUjj+tfbNPSmHXmDDHGcg+JTnUL6K5saU23EbHUr5610NbXmrRvI4BdaFsgL+hdSjtzXDdTnVpJFGCTlR6Q3jd6UCWDUtCl3rHWiy8OOGQ6dy57kb85PDjfU1mggGgZXUzqXiBCschFcxY2LR74pGc6TEAGZMrk+76Q44= X-MS-Office365-Filtering-Correlation-Id: d4bb0f61-a2ee-4a49-ffc9-08d5b5a423e7 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2018 11:58:10.3994 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d4bb0f61-a2ee-4a49-ffc9-08d5b5a423e7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1335 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 --- 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 7b224a76ac68..494cefd29590 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3171,7 +3171,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); }