From patchwork Mon Jul 9 08:39:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10513965 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 08EBB603D7 for ; Mon, 9 Jul 2018 08:39:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5BF128A58 for ; Mon, 9 Jul 2018 08:39:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D988828A5B; Mon, 9 Jul 2018 08:39:18 +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 4A16428A58 for ; Mon, 9 Jul 2018 08:39:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 493996B0299; Mon, 9 Jul 2018 04:39:17 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4196E6B029A; Mon, 9 Jul 2018 04:39: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 293516B029B; Mon, 9 Jul 2018 04:39:17 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-it0-f70.google.com (mail-it0-f70.google.com [209.85.214.70]) by kanga.kvack.org (Postfix) with ESMTP id EA4E96B0299 for ; Mon, 9 Jul 2018 04:39:16 -0400 (EDT) Received: by mail-it0-f70.google.com with SMTP id g4-v6so15092022itf.6 for ; Mon, 09 Jul 2018 01:39:16 -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=EU5JnIoP5txGP1gd4Vjokx/J7dKJ5CZi8v+wa69KAOU=; b=V4uk+Nxlcc33aDk5NgpTxge0ImrNrAwOiIPQ3pOHiwIOSPu9nBZpNdghucYoHwtIbn 2R65/gFeyL4BzEn9PgPJshvLd0SUDR4hpDzwXWPE/IwS7bGy3HNU+pgp/UW4Q63S/W/y MGNd+iOafwA1C49m9wzBhbYMBnBdbPuTYnMLwuoS+KB8oyDaPxP8qkDrVFZmOXyrYMvH ZWnalUvamwNIj89ZrFztVep827q+iflNTaeD68aG6QzOHYzafMsV360fM9Ip6z+yR4H5 JxN5PtiM5qG4USiYE4gnIJWdRtF1lRNqzsPlM9QJUojdC+Ie7+ELnp7vYhEJYsKaumxr 0iwA== X-Gm-Message-State: APt69E1Vf7MPQpsJ3Mqmo54nXS3YEQRF4EjDlDAuh/bwt/TOrXYJnzEj GupW1+e14KM+s6wNTKHwcHp5saCgXbyrHTf1oHIenZ6yI9xB0akY5C1woJbS3j4oe1sM6olV4km xap07mKhTh9TDpwBK3D4akOlTbAHNqIckIKET30pYA+Asm3P9TKdupf0casZiv85dCA== X-Received: by 2002:a6b:348f:: with SMTP id b137-v6mr15538140ioa.134.1531125556711; Mon, 09 Jul 2018 01:39:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeCMuF44BNexIF3Gf2IdSbdIPPRpFZrLoHbVPvlQ6qHDdCtldH2yHyZuSPi+qMJ67adgVVN X-Received: by 2002:a6b:348f:: with SMTP id b137-v6mr15538110ioa.134.1531125556105; Mon, 09 Jul 2018 01:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531125556; cv=none; d=google.com; s=arc-20160816; b=Zmc3ngBYRwWPO+FXQETtQh88lqj6+vael2fAJeopPjyXjvZliVV+PTAuEvzGaltQTI 5f0R61Ncd+oQGk0zSG9goRMeSXuu6YPn3jUITVhTMFdj7p9Qlm3jHSzDLz7G2ODgJeGh TQy2dUHykzs1SBb/EHox8HjF8GhzpzDI1eN4xc9VrVcyBmgKIEJLUuD+NoQCF1k9P0Tn BoJ0TdFDem+Ccb2gmAMydHQGd8guyG5iiT3RHp2Im4K/XiozJ+gNEPNdP/hUZ4xXcTCU 1TuV0v6RTM+g8z/rcDKYfFu6kSs/ggI+2odBfdAUSH5nt6ybHs8+642O/M+itymFPhlX NRiQ== 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=EU5JnIoP5txGP1gd4Vjokx/J7dKJ5CZi8v+wa69KAOU=; b=S3lZciy3mLzCBwBZn6E96f+citX2Xnf++RJaZACuHlpyjKTvWFdAuX8yhTAnWlghUI ibXCpROcZAQ0S2QmlTFKlR6uMemJDen97c0bOt9b7gWZoCf+DQBW9dR2ExPzR6qmvjWF sMzy4HRZMKnwmJ713GOJsy4YH3t+n8CkVxWlNkG6USS43KdVqTO9gIO0/NhmICBGe3KI ukVEpTBp2HG3WeosCFQmivznzGqCIg/dnsuNhMtXbZmiJwb8Ato6eTkK4NE6SMBuvrCS 9HXYyf/ls2GcKxaxtDIQaJ84jXSiPs5mAr9js4HB94bmfxTst4BtsyCtbc29KBnhcHGN UTfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=Xn1RLB7o; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.7.105 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70105.outbound.protection.outlook.com. [40.107.7.105]) by mx.google.com with ESMTPS id a189-v6si9927013iog.16.2018.07.09.01.39.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Jul 2018 01:39:16 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.7.105 as permitted sender) client-ip=40.107.7.105; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=Xn1RLB7o; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.7.105 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=EU5JnIoP5txGP1gd4Vjokx/J7dKJ5CZi8v+wa69KAOU=; b=Xn1RLB7o4pwe3WCqtPrgiqREq80XmKee/kBXwAFDPzsSjC0T+7ec23mq4kvelGtptToSeP8JjaCYJmXXta7x2CeERYj/wDOdPtX1EBoYbyF90fHBqoNYfA23efbFplgsHFd9kByoipGBOSYsagzuJe7lOn4J5bAquSM7HnX1lyo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (185.231.240.5) by VI1PR0801MB1343.eurprd08.prod.outlook.com (2603:10a6:800:3b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.21; Mon, 9 Jul 2018 08:39:08 +0000 Subject: [PATCH v9 10/17] From: Kirill Tkhai 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, akpm@linux-foundation.org, ktkhai@virtuozzo.com Date: Mon, 09 Jul 2018 11:39:04 +0300 Message-ID: <153112554453.4097.12367687920458389659.stgit@localhost.localdomain> In-Reply-To: <153112469064.4097.2581798353485457328.stgit@localhost.localdomain> References: <153112469064.4097.2581798353485457328.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: HE1PR02CA0111.eurprd02.prod.outlook.com (2603:10a6:7:29::40) To VI1PR0801MB1343.eurprd08.prod.outlook.com (2603:10a6:800:3b::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9cd20dc0-6a30-411e-1b03-08d5e577714d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:VI1PR0801MB1343; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1343; 3:9mZ3W0oCM0N7Matb57GyhOjaUSgvuLw6+jNtpxc+FNoAEsBV15JmZQb4dWku2g0j26mKjPePHShbpGLk67US+c0qW5qMYwkEuKZFnKmsDtdQ8u9UeFRi8ON4ZZAg01MawEc1q1pFv3Oj+JhtW1mvT58bmNgkvyTl1SsJ4ISPip3p1/i1IDReLSaRciGj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DoV0hqB0L6LHFULdxLxgUKkNttweUYMWjOe5iNYVU0z2MmcPoEJoRFa5cjSnmojo3m5F6WaKs2rTg6PKrzszCnFIyU+iu/dVteu/rVoq76uuEVUjYhAv0OILinYLbBZja4kx/nkhoYyaRxJ2Ham6vr0ZoF30T1ilJ//GE6; 4:WAlibcr9ziDLdhcCEA8vD7I/fAeVyfxyM6bYxJAm/3HxNvZo1hCzXxzuG+mEVPn0fepuhdCNJrP1Cx5g9kqvqfpt7ahpN0EgpZsAYMEjeZQrVDq89HKr4FC8W3bU3DWYQN4bxTp8RZucJWSDsFhzvvfkHuVrgbGmtPZ9zfUJBjB+THjR2rE5eEHjPhYFimIydbv1kBncP30CqwNjL5z0OUmGxe3yzVcQ6j5U4kG+kRXz4eh2RQEqVxk4+OEAxbjKXh/8U0aq9CDU7pbexIvv9evsR3EdvXyYVEMMi4Yl45SP2h+pyNuvz1dGlYHbPoW7tb6OJLx4GPSvsV3KPxhIerBLi9QEj23J0u4g9dSlhKT/P39LJrQ3wy5z9lzJCEPV 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)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:VI1PR0801MB1343; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0801MB1343; X-Forefront-PRVS: 07283408BE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(136003)(39850400004)(366004)(396003)(346002)(376002)(189003)(199004)(6666003)(50466002)(5660300001)(7416002)(486006)(230700001)(61506002)(3846002)(6116002)(476003)(956004)(47776003)(66066001)(97736004)(11346002)(103116003)(106356001)(478600001)(105586002)(25786009)(26005)(386003)(6506007)(16526019)(186003)(316002)(7696005)(23676004)(2486003)(76176011)(86362001)(52116002)(39060400002)(446003)(33896004)(81156014)(2906002)(8676002)(81166006)(53936002)(9686003)(14444005)(305945005)(7736002)(68736007)(55016002)(8936002)(58126008)(921003)(222073002)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0801MB1343; 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?MTtWSTFQUjA4MDFNQjEzNDM7MjM6VURjcU80Ly9CVFVnNDV4V20rdmtTNU1l?= =?utf-8?B?VVFXSWs0bko5RnRRU01PMkc0QXkxaEN2YTlONit2UGUyOVlsSXllKy9FWlJa?= =?utf-8?B?RUxPT0xpeHJlOTNxVHlxQ084aDJBQk5ML1E5Ym9WMTdsT2NFaEhvd0U5dUxP?= =?utf-8?B?WnlMcy9rQ08zbnBMU2xCN09OOS81alhRaENvWm4wbU1qdzdBTFhMeUp0N0ls?= =?utf-8?B?My91dzdYS0ZORVJzbWo5K2dqcDIrSDQ5b0FyZXg0VDZHQ2dkR3JwcjE0b0t2?= =?utf-8?B?c2ZLTjY4bWtQeFBkaGFuVEJndlF1ZXAzZ3QvZ2dYY1VRSUZ4NjJQOGw3YVlH?= =?utf-8?B?SUdwd1FSSTVWK2xCY1RoZkt5TkFMSk0zSlBuTC9LaUtuMUU0Q3RYRDFnUDBx?= =?utf-8?B?UnluZ2lpamhqT3NWcnBodklVWCt2bXdLano0L3RkQlo4ZEJhQWpMQjlONG54?= =?utf-8?B?LzhVVUhlWU01UE5lV2JxNTVQK1VXY0d2M2pOYiszbmwvcjg5QS9iY1ZOeHlL?= =?utf-8?B?RU0wU0cwTk44bzVrVG1CNWlFTm1rbjBZZ282MUx2MnY5akxSTHVlc3pucm9Y?= =?utf-8?B?R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JCuC4vburGQQLNOo9j7i/3we5mDt6d1hl8KPz9sEZj/kVKbA/8fZ2dg+fkDWpbxC2AgOXJ+JQ9LqK88MlLafCO4a54ogVpjLMUWAnhUa/78J0W+uimgPiBNfl6fNRJl7JQRaPN5RYWg2v8+cTsV3IRfiouxHNXtzQ==; 5:7dov+XmwYLJkZMAufbkyQgHvk2nxCwwqqBXywmu9X1BI9f9VHj6NGt1yt02rpDlyQtvwhIsQPIxqvNy5wu8NrV2IAEIXZgRRhB0+22JoWP5i8Rt2tudLOe5Z2E00h73XgQkgMT2WDKxScpRDVsVW+LAECbWKnKT0JL1GOymIdM8=; 24:abJO5PoiAAJcL5SQ2XsCT1SAUzgC5sJjJknw+02iHP8qrQ/ZEUbbbXnaazIGtvz37kP1w3v0c2EDAX0ivtEwUwDhpczccEY7mglOurhJfwQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1343; 7:aCak8TPNI7F6JP51rv9dosIUeKRTYRpszQgW2EcE4Xyz+5QA/VJ/fQqkgyeOylMimRYBLCbx8afdOA8j7t7RASqMBIDTdIIwt/Y1B2dlzniFUl2anMDwpA+gqSPALLCl4PjSbbUri2inPcJ6egQGLrQVuovO4xglexwWkx/toCRUGPIDg+NZVxiqSSA6QSjH3E8rHCWz2PFXiAOjaW2XclUC7cNCAzxnDg7nY65k5quWMeKsUi3miLnu+nN72DZa; 20:RMZehttSVbSEbchqyDINYvwRQGeX85CdMPawT246vx10NEisRcYnwsXpu5a00aSZ9VKoabllj8kwuu6/rE/hJ/5MsuXWONGshbLVz6ikb/U9qBgnGj6kATW80x76zf4RABHw64QhbgY7B9vabygZ11KSc6jiFX6QYjN3L96pgz0= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2018 08:39:08.2330 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9cd20dc0-6a30-411e-1b03-08d5e577714d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1343 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 list_lru: Pass dst_memcg argument to memcg_drain_list_lru_node() 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 1fc5be746e69..5384cda08984 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -502,8 +502,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; /* @@ -523,7 +524,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; @@ -531,16 +532,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 0cb2c7ca2086..cac30b4e9904 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3009,7 +3009,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); }