Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4247049imm; Fri, 18 May 2018 01:44:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqfxvOrm7ecxTgk/qdk7Kh+PZsxCLcVl2cPIjX0julGvIih5A/Re3WltHWaYDRP4jcsLm8n X-Received: by 2002:aa7:8492:: with SMTP id u18-v6mr8475535pfn.225.1526633057695; Fri, 18 May 2018 01:44:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526633057; cv=none; d=google.com; s=arc-20160816; b=mdhK6RvXedoj9H+edQqbL1z3vFKLRqBIc328DlU17NbU+4rgBkA1pQ3QBXf4rddMmt ab8wyqulT6FvvGKTem4WOdRrNfdlppJl+mJL11z/NW2eCyy3z1xWXkrn7aTuedh314DX +ZjKNIaNszwy9XKrsv79NFe6oa/K8ONRIX6hRCND4u/Cx0pU3hY7LBzUB20tFBBVf5lr 8yo7mhL6aLjUEYs6kXNmma+a+qOh46accSyNech9OOrOi9FvV2iyo3B6uetNowqWxLzu 3V279AjByTaEdIw6w/aMDlUV5S6cN73KOdjs13YF6KCDP189BBL4b6Y49/O3uPcGpu2n Aslg== 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=VLs5sGQTk/SBzLur7L0/bJRpBuflNB6tFsb4nnW9LAY=; b=BNp9OQjgifWqPubIzPcclEQHPaWAUDY/vDLF/9vVUyFkQ/mNvxJNKrCoHP/B4P+V9r fIRwKX2fFafUQFhlRPXurQ/U1yY46HJ65uAQ9/MxA0O79fN+teHzoxkoad5jb300oDH6 J74SwetA1LgkfOctgHULEqYtKb1ynrllQMTeubta7ZiT+zN5PdR9HWtAbuuPq/6QT/vi EWr3gaoHruC7K9JC2e5/GttK5sMFtFWlj4nA1m3UzXgV4xXqlqQFmT+/CgYjesWf4W3d WSOeklO5r/y340ng1wGT7Z6Se76S953HjkH6zNjEkWNLagL8s62qaVwB0pYBaj5KFSsL gpzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=Dz+YKoyU; 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 i1-v6si6653739plt.178.2018.05.18.01.44.03; Fri, 18 May 2018 01:44:17 -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=Dz+YKoyU; 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 S1753798AbeERInr (ORCPT + 99 others); Fri, 18 May 2018 04:43:47 -0400 Received: from mail-he1eur01on0136.outbound.protection.outlook.com ([104.47.0.136]:5962 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753808AbeERInl (ORCPT ); Fri, 18 May 2018 04:43:41 -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:X-MS-Exchange-SenderADCheck; bh=VLs5sGQTk/SBzLur7L0/bJRpBuflNB6tFsb4nnW9LAY=; b=Dz+YKoyUwPNO68mjjuxu3ubfuBlUSZzj/mu6yN7lDJQJswE2Oz6h4MTBuEwS/HmWjat/1G49YfF5DDzjOZpiLnXRkppwt8inRxknvkXgfdNKBMQ2+j3xjD0znzi4Cs3FynHeDyo7Y2wfKvZxzrNSwIpysA0tB++c7deL5Op7NBs= 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.776.11; Fri, 18 May 2018 08:43:36 +0000 Subject: [PATCH v6 11/17] 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, 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: Fri, 18 May 2018 11:43:34 +0300 Message-ID: <152663301468.5308.11453847445952411196.stgit@localhost.localdomain> In-Reply-To: <152663268383.5308.8660992135988724014.stgit@localhost.localdomain> References: <152663268383.5308.8660992135988724014.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: HE1PR0202CA0007.eurprd02.prod.outlook.com (2603:10a6:3:8c::17) 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)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020);SRVR:HE1PR0801MB1338; X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB1338;3:yL6S2K3eR8PrmkgxTj35K868jA8wptIY1qYNXx65auFk6rJCpjKIYlnyPi1WfOJrBC/8GwFx0otnMpJmTRGIWUX4FoFedSuiEBU+Zp+l5V7sd4bD7XYzw94ug7vfZd0iZDoWQpvYnPwjvL0KsXkB7FDpWrG5tzpupDocht/6EVhzIeIcsp1d4BYCT5VAFGbWAoTDkrPAxpCbuEtaYKH8vGXPKxiDQFeSNB9Hr7y4w9ts8Sr60ow93VnQCyAs9ONe;25:JUOAnRx50ZhVoS+AJ+AjBGWJdL5VU9K/o8p2SCFKMmNF6zlWdZnoUuXa3pVzv/MJ++4zSiT6wudDX+ntksAUcDumYbpiFAHxBdXv4i9qJSIvIKPZ5zRQHBUm7++ClParkRLyRoNKKmRHUxMbYjNOR0sn6O+SdfO7cwpe7WBY4kI0NBrcNjGbydkRP9Ah72ZpWnA40U432g1sshttg6K5ymiYtVBAvVvJANJ3/HeCOp9wid+Wl76lCssDZk73ACzW7qPxmaT9rFJtHSD/hy0b8ql7lKhM7pEpTqhUfGfxmbMyAOCTD+2K4lJW7NOI5p2gJ+IJpW7UOx8/g9vwh0ZG9A==;31:ADI5/rHPbDbDUmi4dZh0itzwkmAa406MM8Xgdq/ZiVeGfjjDObNERGtO1e243w19Rc4T7P5HMTSNVAL1qxEjLRHv2SWDBiz/q2e7BZMz8+9ArmnZYTsBfBW00u06C0oCZhhQEmFkYG0t5yeQfFK1AHPS++0TO0tERVoolGMqgNK287Baek/Y89y6OXLXz2EJCjmii2U4O66b+mLxQ+fcDSGzQflFplfLpQZ+nyiptUQ= X-MS-TrafficTypeDiagnostic: HE1PR0801MB1338: X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB1338;20:RrpbPYOvYe6mGhdUWn5zwPHLi8x+Vuo8JQyB+7DyN2s/VKJYqELJMuwI1ct4cgiuTqubJe+X50sZR1IOqpoUhWLEgiViviT5bKLEJhFLvmifhHRJrhlnKZ1ewCHkjdLGlTYnqjStL2LpuAr8hz0hLgz9tzzscxEOutICGbZa+0LKqbbIS0D7J6Y4MqDArSclhE/q2L7l2M/NMEBjMow4+Y/wVJW7JF3pqRxSY4CJrNXkraMRMdrwMBe2Yl+DfkykpuAkH0B6iLmiMXChJ1tcxb2zdeZCP6jUAk7lLvp3PZd2Eqt2la6yTdcw+APBYwBXoBaBNsCKeG5f3a3BulXPOET2NtyCWmLiMRgZREw+5S7P7VPgQxjbd2CiwzGGDUETLw+fO+ZtjKIdZ0/smniQfvIlDDzeMYr/On0mepLGSxE9uRaucGgGFjO/3HsML9f4yAlQ1wugVida9IPQ3Vvo0S3gnx3hP//a46Eb7Qky1/QO183C73veCoy9i9DNxhgg;4:MRLjZHl2yes4FLlI+GmO7bgNQjnVGoVgKS/SBS91j/eq8y+c+BnlHqQna3kMgRnNMGM1Wtf821abaH5YoHzZoJuhBWFGnVsarj4Q8VsUxGlpzSrxaORPuNoWjDiK7Zg3gHVTGi40iJPRSeOLk8Vm90M8EuVFXpVMtrBmZDOyfPx+NtcdSWDNvrHPb9d0MjYGCtSW3OUcyaOCjCZJ0QER0WIBkM7BU39vMk9ERjzLY44x7xeNDXROT95lRGjSiKl8Ynbz4Mk3h/8mXWmMxWJ6dQ== 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)(8121501046)(5005006)(93006095)(93001095)(3231254)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:HE1PR0801MB1338;BCL:0;PCL:0;RULEID:;SRVR:HE1PR0801MB1338; X-Forefront-PRVS: 0676F530A9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(366004)(39380400002)(39850400004)(396003)(346002)(376002)(189003)(199004)(25786009)(956004)(68736007)(58126008)(50466002)(47776003)(66066001)(8936002)(8676002)(316002)(81156014)(81166006)(6636002)(478600001)(486006)(3846002)(6116002)(446003)(230700001)(103116003)(476003)(2906002)(76176011)(7416002)(33896004)(11346002)(5660300001)(305945005)(7696005)(52116002)(39060400002)(2486003)(23676004)(186003)(16526019)(26005)(6506007)(59450400001)(61506002)(386003)(55236004)(86362001)(105586002)(106356001)(9686003)(97736004)(7736002)(55016002)(53936002)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1PR0801MB1338;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?MTtIRTFQUjA4MDFNQjEzMzg7MjM6YjZQNHFxdjRXL2dJOXM4cnJDYXBLemFM?= =?utf-8?B?bVNhTXg2dXVDdU9sUVJsUVVzQmQrZmlQQmQ5R3ZGS29ScHp3UVBkOFI1dXVn?= =?utf-8?B?OUN6MEZSbFlYV3ljYWRVNDBVd1dtRnJ6QnExKytLWjIvVktNMnpQQXhFcEVo?= =?utf-8?B?U210SjNlSjBJNCtWbkdUcjJVQ28zMnZEYXFRU0lkNUsyQVhwRWwwWGhidkd0?= =?utf-8?B?MldlbXpOZTJzWVdsWWtYLzVsSDRDRVlUTjRoOVRqRGREQ0Y0clNmSjRYRkll?= =?utf-8?B?REcvRXJudmIvemhkNHZXMkErK2pwRE1jM1RwZEc3K3BsVSszOEl3WEpJM2Zr?= =?utf-8?B?TDlocFYyUHc4VTlWZExITnlxaHRhdFVQOD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MS-Office365-Filtering-Correlation-Id: ebdf1151-bbbe-41fa-b92f-08d5bc9b72ca X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2018 08:43:36.6196 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ebdf1151-bbbe-41fa-b92f-08d5bc9b72ca 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 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 43cbec52a48a..cab8fad7f7e2 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -514,9 +514,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; @@ -545,7 +546,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)