Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4246244imm; Fri, 18 May 2018 01:43:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqnPUkWCug89RYz149VXsOcbnSJcJMjaB/ngQg/GEoL/Hq0fXIoDGZAAxBCDzBGzSDQkBIl X-Received: by 2002:a63:7e18:: with SMTP id z24-v6mr6656474pgc.276.1526632989231; Fri, 18 May 2018 01:43:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526632989; cv=none; d=google.com; s=arc-20160816; b=EyBZZC8OsOyIse+GNvTdt3XhZASOMXCbSF9C/17RE0t+ENnqMFpt1sbc8RNJ35m7X8 oTGrnJeW5Gtk+h94mAWBANMrUhwkeKRWEtkCrQKnSs0F4JT26zlkZBgawHYGYgL8v851 XMJVVFlH9u28jGyh74xxR1Ej8u82iC6ZuV7dBA1e5uxG9re5wC+DP84OLxMLw/EFBMv1 8taro7GGTQgNP2u8T8k+qgJWTwalegStyDzHqy6A6UQxbMeTjfBDzMiDLfM/0Cu1uumh Dh8RYd7dhRz6VUQM6R6qpVc4qkF+XjWC2H1XRj9SgL5nQ8u0BdNZdwAaOQmBXg/9/LDA ucWw== 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=UZ0QN3U3mn3AEHQuc1AoNfRGEEMzOSFCs8YFu4fZFZw=; b=rb2tcb4jfuo89gkCqXzqb6fCBJ0ARG03KmPpVbN0XyXH/QyNySEU0oB2SU97AMRo5H 2eWw8I5clROVZ7nXdS2ZCz0xkAgkdM05TzWI6mEHeQcNHMwRoXzosN7Bjm0sMhMqsVLp oijEzduhAQeN/nj0HM0Fjqn9N29riawhh/M5iObcwmdbmFoWZLZGoiQYzDwFQftnROqX /TJRpjX3rJFnLhJfZsH4/rgU+g9igMWQpS+QbNz+cmwh8zFhruH16Y8g8pvQzNghBteM KtsJjHUSMcrc9fhJlYDUf51qZmPEhg2dfql727/kC3ySY4TC2vXpIqEI69QkUy1ULHEq bj/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=L95c9mad; 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 1-v6si7083758plx.236.2018.05.18.01.42.54; Fri, 18 May 2018 01:43:09 -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=L95c9mad; 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 S1753633AbeERImj (ORCPT + 99 others); Fri, 18 May 2018 04:42:39 -0400 Received: from mail-eopbgr40115.outbound.protection.outlook.com ([40.107.4.115]:33312 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752290AbeERIme (ORCPT ); Fri, 18 May 2018 04:42:34 -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=UZ0QN3U3mn3AEHQuc1AoNfRGEEMzOSFCs8YFu4fZFZw=; b=L95c9madZQ71WfjKaBxM9wOQC2L19OzAARLcP2CBITXzqh06w7nzmFRWbHZUHAT2hTSLeqA3sBHGDaI1Ey84jApyfeqzdnF5JBHToP7KHc0X4S91ZC58reMoaoA3dVbtWAiB93fvwwgs4WS852kIdnf5RKZI5Ldh07+7RWzjUCI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (195.214.232.6) by VI1PR0801MB1342.eurprd08.prod.outlook.com (2603:10a6:800:3a::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:42:29 +0000 Subject: [PATCH v6 04/17] 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: Fri, 18 May 2018 11:42:21 +0300 Message-ID: <152663294106.5308.16116088688197815775.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: HE1PR0301CA0010.eurprd03.prod.outlook.com (2603:10a6:3:76::20) To VI1PR0801MB1342.eurprd08.prod.outlook.com (2603:10a6:800:3a::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:VI1PR0801MB1342; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1342;3:Z5jli/5B/s1+M21LW/Z5e6t7cz50MnkqznJkEr/LnVHsBGMDuInCtpdqPqTmbfhGrYnhLJYkzdOip6BmlLeq5x39+pu2txyJFWv2Ekaz+n7jdwAYmm4lcwH8mqAIdi4iEADvqmpypdqhDrDVdfJKxYYvUhc9TdCDajKn/fsSkmLN7/Qx3uHb4FbhRF32H9myLFkjsV9++e48g8/UtdXNNEex4rXcWxJbmi7l+qf72zJiUC6rRHVoySABMOTbQjoy;25:fW/awNhNTUv03z+GxDh4e535EKeTawNh4W01kEpcx+VtAVBLWdgR0lWyivurVqeIvVp6fTUdxwNfgXG8iP9/zdKN82SSwBsAiN7hW8e85dsD8FRTxpuUcbnlTETYYcqYLU4GpzPhvlANdF3TIIYX7Hxzs0+dJQNf4arBr6bnhr2YV/x2k1zSFydxfVosCcd91ODMNJC+AQpXz8kY+RubM4O11ebeZQSexUqI0eMLi1mWvS9I4bUP59tFKnJXz14sCukyfaVYpGpfuoPIPQP+uYzDpfyz8V6o8vbd8z1cvEptx+wU+fAiWIOrzY5tdvy1O0HGL2SNPTyseGh1tYtdHg==;31:Ou7lObF278mrUgoJkKhIKWm/ESCquQCQ4sBDifxFd9kK9cw7haIKVKM5ShTmZabj1WYgMVrZOj89TyGT1pYdvWh69zYBZX9FfE1uJelaDpXbE58zaKLsc7KCmEKjtYBwC1pEYt4utSIvpNgoxLXdsTC0vg1WknZ/A9uIz1WolgRk+yheiVMHttSlItBkx5I4s4NQD37AlcXmOxUk+PxwhhOpR8HSWN0r/I/7Wv29g+0= X-MS-TrafficTypeDiagnostic: VI1PR0801MB1342: X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1342;20:+Zl0afxmeO52PJpIFgEFabI51UzU1lk0rC/zZ6hsCnWymx32Iaq63tBFwBFmO+L6FZubvEbBLcPB82ympA7cCl7KMXR+J8uimr63iNFQ4UHtVBsmhB4lcAFBjHwqOmS7N4KxZdWUW+AiOof/bnKz5ZUuh+7TOm0HRY3lwA9xBqq6L1ZcNHfSIsAPdtdmK56ZFWFaiGRJljADhvHUcYU5Wh6Dz26Awh7IhO7i6GIx5x3dnJgkgvEpIkAMnESvTdW1b2ddJ3872JKLu9TEpJ1z1peaG/6CWuXfykSi4qeSGqNoNf4K82Ae3/RXbpcDQ/p5lUCM3tuSzdTQDrjZEgJ7UwPUHs4NCUDju8Ojm6FchEeiJ82hpQzlsVsR964RTfQvlGpD8kQ5Q2Tfml17OY6her6hkHSG2CySkb2Ds6wjCwTTNGpJNFkuP9C9e0ScHPtZSfE3j0ZJnEQ1+C00osAl2b4kCFPSbtuO3kVODQc9Ll2UnwhbxXcbqv3nMQm/knLd;4:K4khYEzf+kxG+gy4b3AbD9Yby9fS/x28reMitBSEJTadFTOX3zlFvaJs8Rf29a9DysmX8YIDyC/nlawV8sJICJpqTK6jZ8WQHpsr/fDbLGWqEhZrUYF+QgWxDqCrYEmZJZnCJUeT+J72GnGs4tcyIaQ77hmgLCRaMOnSB34x9V8alcKUXpQZ6IpsSzGGhWy8xOFSfSx3mxPEMdatNzljeIee25eu4Sj4hue8MydLLuS+4+3oD27TdEuKiRWwWO+ohIzvclmJHvkOj6MjgOi9kw== 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)(3002001)(93006095)(93001095)(10201501046)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011)(7699016);SRVR:VI1PR0801MB1342;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0801MB1342; X-Forefront-PRVS: 0676F530A9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(366004)(39850400004)(396003)(39380400002)(376002)(346002)(189003)(199004)(11346002)(23676004)(8936002)(7736002)(476003)(8676002)(81156014)(81166006)(105586002)(106356001)(50466002)(2486003)(446003)(230700001)(39060400002)(25786009)(2906002)(956004)(103116003)(486006)(6636002)(55236004)(7416002)(76176011)(5660300001)(52116002)(33896004)(6666003)(16526019)(186003)(6506007)(386003)(478600001)(26005)(7696005)(68736007)(316002)(58126008)(97736004)(47776003)(305945005)(86362001)(66066001)(61506002)(6116002)(3846002)(53936002)(9686003)(55016002)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0801MB1342;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?MTtWSTFQUjA4MDFNQjEzNDI7MjM6UnduU1pjTnQwdVRRM3BTYWJSUGdNNFZZ?= =?utf-8?B?aGZYdlJTQnR6QzBJNVdlblRLajkrQTNjMnVxdGhiVTMweEtlU2RFNHVic3Rz?= =?utf-8?B?ZVB1OWpVQnRDRHRLcDZIRjhJY1VOWFZ3OXdiTDZ2YUZIVTdtSFZGaHRQWmov?= =?utf-8?B?SU9qT2FQdmlDd1dhQWpxS1R4WWhxY2s4T29GdkFmRXlqTVF0RlZENTdLQWlN?= =?utf-8?B?NEhxSkxGSzhyUkxUUFo1a2NJK0dxdC81SnFrSXJTclRUaWhza2tSNE1COHZl?= =?utf-8?B?dkFySjBCaFV0UFczcTZhMFJXUmZYSllHNFdrRkVneHgvMjhiYUE5NHNNSXlx?= =?utf-8?B?dERSRm9PNUxUb3U3VDE4endEaXhZeUIyWTA4eF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Z5hM5uk4mL/fnW6uphu0jjcBFY= X-MS-Office365-Filtering-Correlation-Id: 6a9dbf17-265a-47be-6991-08d5bc9b4b98 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2018 08:42:29.7649 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6a9dbf17-265a-47be-6991-08d5bc9b4b98 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1342 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 fc67e43849eb..023a1e9c900e 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