Received: by 10.192.165.148 with SMTP id m20csp922277imm; Thu, 10 May 2018 02:53:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoyGm0EDVOdXpr+exYw8cbT/PBO9dBQBlasuiUeAVunaQDfQTRPwepzXWOHP+aYcKxhQnIL X-Received: by 2002:a17:902:76c1:: with SMTP id j1-v6mr724991plt.284.1525945997334; Thu, 10 May 2018 02:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525945997; cv=none; d=google.com; s=arc-20160816; b=fr0QMi43dK84xu+iTifKIo9pWsDyTzcVwPMrm0+aUNBxI3E9Z1XHD8ODUoFRCIIHCp w7GYx9X4OlTTDD06jo3xhJY73M8RDpiAbo4eetxtmZpK10aWxB1hNVQf+xUBdX2DbuoM G1jXNz+2xpNirmOfYs6P8WIrJAtMxvnjI22romqe01+muiMCI3gOtbm97vraGVNXWng5 GxlS/uXOLrfaw8xRuESqvyNJh2KL4TzopwQy3Y3btk24unpKpqomye1WjP/Epz6SHqpz d7ttbJsBbUn0usCi8czR97WZ6VZgLeMo6/zj1dknaAOlpXPg884YR61NsbIJKNrQtO2m Sorw== 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=bvTOhhzafBIbnrGHiSvQjRCEOJbvnQjYti1uuw+Yl5k=; b=DTeqp/vvdeEfXCjG9JIzEdPCxPvRGY/ezdWr5oKgzapMvCGpqz7nBrkT6d672paSYZ 1l4H+y2RX2UvBUoDu30TdxN148Pff0XqQlKxb6Rru/RM5v6SZlD+QZHx35eYKGMpwqvf 1Yyj5Y0MT9w5zvWDdnkFvwCpn3/+aGcEjVBNc+gpNMersGuY1BtF5JLJXk68oo/ngph6 OKWMGtHtT9cvB3hS0I+9V+G6+agb7JGWTzskNpY/D48sne5J6g3yJ9h1HGXK9wBWKKv5 fhL1ilApjas5fGBAP2uNEVG7BX2wvIIbbCpkUUmhXRKaH9TdKFY6g61iMQRPRWKYZfK7 TYHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=Fhi6i4IZ; 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 b26-v6si417992pff.251.2018.05.10.02.53.03; Thu, 10 May 2018 02:53: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=Fhi6i4IZ; 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 S934716AbeEJJwl (ORCPT + 99 others); Thu, 10 May 2018 05:52:41 -0400 Received: from mail-ve1eur01on0101.outbound.protection.outlook.com ([104.47.1.101]:10592 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934106AbeEJJwf (ORCPT ); Thu, 10 May 2018 05:52: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=bvTOhhzafBIbnrGHiSvQjRCEOJbvnQjYti1uuw+Yl5k=; b=Fhi6i4IZKjRAsUVn8MxxYObNnf8ABpKwqXppbrrfcFEIqDyCiSaZu4b8TMk7qf67p/0xK1k1XninA8UNFwg8t5rqINc8oE8XjXUMmQFV3mUWfnBZ9uQdw5pkcxzxiTqmlV+KyndV3h/U4/GLjiKR04K9mu8U8clXsq7G7ID+9fA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (195.214.232.6) by AM5PR0801MB1330.eurprd08.prod.outlook.com (2603:10a6:203:1f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.755.16; Thu, 10 May 2018 09:52:29 +0000 Subject: [PATCH v5 02/13] memcg: Move up for_each_mem_cgroup{, _tree} defines 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:52:27 +0300 Message-ID: <152594594768.22949.2451669820790556832.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: AM5PR04CA0010.eurprd04.prod.outlook.com (2603:10a6:206:1::23) To AM5PR0801MB1330.eurprd08.prod.outlook.com (2603:10a6:203:1f::8) 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:AM5PR0801MB1330; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB1330;3:oGcN9N7nfnmNwZvTQurN8HBT3aHXpypZXBax/qYZcgssLb9hmOiAQ4AMAbXQdnSSB4/fHeLexOyqZ5Yn2quDOyRc7O/W1juT0Tt0EdQChSRjeyMKV1i1JwZcCm0avlGURL9rfmM+MAJ8kcJDc82tvCTGfVgs6s7QBUQ1jclrvZPF02cXLuToXk3ndCsY3u6vFu0+SJaaJe7Fsj4yTIADLsiarq3tc0EaJKUIzodCYrtYme9sBcYmfkO5nGVrj5gi;25:6hCGzuN2mf5OmZ5XEZmGrvYeKUoJ2ZHVHDHa8W2M91a/TjKgrp+0EgEn/nxafMKtpMxJ4pveyq/o+BVxYUK3uJ70d8jexOidT9+J5ENaXPg/ns88Hx6bXk3Y7Jj7H99tR/OeVYl2ca3y/GR1wqMiUxIV29EhukTJKfOUPYVOIjrZteGtUBTFYtxkKlltIIVSuRv+HpVQBUFcvnzJnaZpOmGs5dhjKNINj2dmsLVrDWfK5j2WxBC3oLjBGhMlT17AqtM4YZR6hQR6ZHEy/EtKoCmReEvx9PYW38mpPa+t/sOa5PBWW0gTFzmi+nEiwvZ2N+BG+Rhfo5AdZFqWucnPrg==;31:Xfx1+CYkS07MujMGw4WzkuIcHrGc02kiF6lm84WsXWNvStFY+B1Gydkdx2BUDIHHeAUrIdcZ1t7AieWZM9ON3iMJTPspDCV98GHI+8X3LoVnA0++/rDGGZDh/PZCIQhI0x7vOw1VMY02g7M4/7ymQfCTgItNTZ150HAQadHj00/roVkgaWOcU/E4NtlZ3dSmpn5OGceUXtShunIycIiE59RTz5A+onwiFNV6t/sTF5M= X-MS-TrafficTypeDiagnostic: AM5PR0801MB1330: X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB1330;20:bLW7L147/LZq/MgBTjAwPKqcNDPalAZHpG8h5KxBck0c3Iz77joMjnLvzc9QMM9rMp2NOM9d3P2DXUYSNh6hwlTyjzDhfpTamaYUQK+PXVvBCFtO0H7oPsb4y3WnzU4fIqKPoqzBAadNwgVFtlAKA69bYMPGrq3Gz/ueMZ59Ncm3M18Wogg/93J4FtQEq1SX8eRvyJ2KK9GKZ3TjSIsAAVQJdKlDYhzmKHzHnNjlmeabSJe87HG8jDyvyZAWWn6VQHX0788T/ro11RixG9Yo/5/TSfbbZuoi+8YUq9qedOKfw3y+HuhWf7RZdrxu+/VGXrdjYLmxMsbOb8xsgsFuQmqvXm4TJHcW1OB3N+Mgq39Oj6xolKH0Ay32ixVpoiZ4cgHNw1/6NEIsez7pu2IJvcOXyxEo6ea/zYITvRZUI4qTudur1FElm2xhx8NO1VnrF69Jv341q0ZmASnzVDg3YMR1q6HsWpz1DyIobpFHURq3AxfP5SIeEZuo1V8yuu3i;4:xdNbL7RuE/lIm6zx69YPD7cUipEfRA1axwHwvTig4L2tpKDr+nbkIRV0niK9YZmY8iAsefLx5EK4k5KqV4zWjsfgCGflwa3jv55qZYM2Rx+UMD7PZ62iT04dFtz80mzVUmVj5Z2d7yYr8qJcV+G9jfQar+3fPu+2YIYcwUTxrTlQxJqXyGqk+sVkG4kRjDD5ELGlEE0HzTcpcnqbhirY3xpHMRQikb755hwnEv6dMfEV9bcc4xBWwe3f4YEkQHO5I1GAX03CuTDl0B7ndBrrzA== 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)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:AM5PR0801MB1330;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0801MB1330; X-Forefront-PRVS: 066898046A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(39380400002)(376002)(346002)(366004)(396003)(39850400004)(189003)(199004)(305945005)(186003)(86362001)(103116003)(6636002)(2906002)(7736002)(478600001)(230700001)(11346002)(16526019)(52116002)(106356001)(97736004)(53936002)(39060400002)(476003)(58126008)(6506007)(956004)(76176011)(2486003)(7416002)(68736007)(316002)(61506002)(486006)(55016002)(25786009)(105586002)(23676004)(81156014)(7696005)(446003)(47776003)(81166006)(8936002)(50466002)(9686003)(55236004)(5660300001)(386003)(66066001)(8676002)(6116002)(3846002)(33896004)(26005)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0801MB1330;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?MTtBTTVQUjA4MDFNQjEzMzA7MjM6eDk3OGYxK2p5M1JtclFQQ3AxY1NIWWU4?= =?utf-8?B?ZjRiWjl0dE1vMnAySjhHVFRJOGNIZ1l0cTgyRXlZQ1FjMUpVcXpuRXFjMmVP?= =?utf-8?B?R3g1NDJ0RkUvMENYY3FFRi8xMzhLQmdFYzNHdnI4THc5c3lOc3IzRXQvM24w?= =?utf-8?B?NXBvc2V0WDUwUFNlKy9CdG53ZnNRV09BUXQ3MXErdjNJWTlUNDBmVjFoL3Vw?= =?utf-8?B?amh0UlJtWGtLQytjVmF0eXdxeTA1OXVDVnV0UU5MSWdoYjdUZzZROENYdmtL?= =?utf-8?B?UDJIdjZXUDFyS3Arc1VlOUVucVNkQ1l4dmxxaDIrWEhObGdiSm1RU05mSnhk?= =?utf-8?B?R2o0WE14dXYrVTQwZ2ZFMWFMb1ExTXNKdzduUTVpaUVPd2cycEsvb1JjbW40?= =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Hk3Efi2zZD+c1hqjde+8NJqrxukthjIeT9Gss71vTwBQ+wHknZWvKJiSg2FNVtJeXspPCZSwGv1VW9JV4MSjq6VFB0FqeJdeEaz8Si5Z2pKuyKPrGd1nkQYArhwH96hqZtCim7DsjD/xVsjQmcZ5Nt1nlFuNwohbEbmFopXrO/zMdokxvCmn/rJsDi8fMq/yPng0rA6WbJHVFY40XXe9vdhPkwZQQ8Ojpvlrhh+xLklJn7ZT9g==;5:Ba17EeZigH3VKmCjGTkaeX+qytB/A9a5dYWYtpf1rqIsF6yPws3w3KoQLUvWYqNYyFMDiqJhsWZVZrvQx0a7PKnZhjP0RhPuEw5xUZ7WtF4TItk/RIySVycvPC1aGB//GNcPaoSBwkOGxLX7lUE+2qTmuICo0hyKZkrZM0qcsrs=;24:/Y01/DpxBW4qoW4gsc5LLJPrWUlEmXsFFW7e4yj0e8M/5h6uJObGIdt4C5JZUIVo8XR67RHeq9XkVK1DCnbPllbxwjskBurxV8+C+1vzWRU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB1330;7:bAS3M16siOrPQWrjufuw+DrWSx8VUI0QvBnB5Su0XtC0RzC2Fo3EE6W9AVBXymHTWB+/6aNR2UO1W+emd9HigXVhi7zkCCfyQa+OQN9maqpRu8nLWX5PwhxEJtcBrV+skdqxA+JtTYaEOEL2o5xHmqaGKqeRdAdGZsNOm22jpbSwDfOcueISp2XIFx6/nLZz6r5CNcLGq0jSU1aeKtPANny61m+ErJS2o9kD9qkeFVJcHj1Pru9R9lm7KZ0At433;20:szidGn6Gb/ULWmb5MxpgWh13CXnteqd4X1O302kv7JRJuVXucyyrTPsFz53RfhDZ/QpFwFRJZPEIA9l3LPhpYI0J9te17OZgHKzNJetOWElJeAYuw3mvzwNE1CF2kbjTqakR3NSiJskZcQUoPZH3dBDHj6m2u0gw3mwToRu96WM= X-MS-Office365-Filtering-Correlation-Id: 00675c89-3c7a-44be-9b72-08d5b65bbf53 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2018 09:52:29.7689 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 00675c89-3c7a-44be-9b72-08d5b65bbf53 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1330 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Next patch requires these defines are above their current position, so here they are moved to declarations. Signed-off-by: Kirill Tkhai --- mm/memcontrol.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index bde5819be340..3df3efa7ff40 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -233,6 +233,21 @@ enum res_type { /* Used for OOM nofiier */ #define OOM_CONTROL (0) +/* + * Iteration constructs for visiting all cgroups (under a tree). If + * loops are exited prematurely (break), mem_cgroup_iter_break() must + * be used for reference counting. + */ +#define for_each_mem_cgroup_tree(iter, root) \ + for (iter = mem_cgroup_iter(root, NULL, NULL); \ + iter != NULL; \ + iter = mem_cgroup_iter(root, iter, NULL)) + +#define for_each_mem_cgroup(iter) \ + for (iter = mem_cgroup_iter(NULL, NULL, NULL); \ + iter != NULL; \ + iter = mem_cgroup_iter(NULL, iter, NULL)) + /* Some nice accessors for the vmpressure. */ struct vmpressure *memcg_to_vmpressure(struct mem_cgroup *memcg) { @@ -867,21 +882,6 @@ static void invalidate_reclaim_iterators(struct mem_cgroup *dead_memcg) } } -/* - * Iteration constructs for visiting all cgroups (under a tree). If - * loops are exited prematurely (break), mem_cgroup_iter_break() must - * be used for reference counting. - */ -#define for_each_mem_cgroup_tree(iter, root) \ - for (iter = mem_cgroup_iter(root, NULL, NULL); \ - iter != NULL; \ - iter = mem_cgroup_iter(root, iter, NULL)) - -#define for_each_mem_cgroup(iter) \ - for (iter = mem_cgroup_iter(NULL, NULL, NULL); \ - iter != NULL; \ - iter = mem_cgroup_iter(NULL, iter, NULL)) - /** * mem_cgroup_scan_tasks - iterate over tasks of a memory cgroup hierarchy * @memcg: hierarchy root