From patchwork Tue Jul 3 15:09:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10504307 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 C527360325 for ; Tue, 3 Jul 2018 15:09:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B202028AD2 for ; Tue, 3 Jul 2018 15:09:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A594B28B30; Tue, 3 Jul 2018 15:09:28 +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 1D3B528AD2 for ; Tue, 3 Jul 2018 15:09:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AB8AE6B0279; Tue, 3 Jul 2018 11:09:26 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A6B256B027A; Tue, 3 Jul 2018 11:09:26 -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 931B96B027B; Tue, 3 Jul 2018 11:09:26 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f198.google.com (mail-qk0-f198.google.com [209.85.220.198]) by kanga.kvack.org (Postfix) with ESMTP id 6898B6B0279 for ; Tue, 3 Jul 2018 11:09:26 -0400 (EDT) Received: by mail-qk0-f198.google.com with SMTP id h67-v6so2421790qke.18 for ; Tue, 03 Jul 2018 08:09:26 -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=I7y7KL4Lqxbhu5Dcp8ujOrJ9wpol4rIibBu3Z/sM1NU=; b=pzZ3gL7Gz2QUrOEZzAUbaNaV0hMlI5oI/ILu13TeQgAFwTNWdxDxGVgWGUdm/JgE/p mFiTPD9NX/PZAkAw2mlTe9ImYKmqXVgw+JZ3BRwnvBlav2M0hK2vzo2RBe0P2kch5LjC CzmTwQeyplgRvLaY/xU9/AsKabd6v4X6wID7R4S+bJWtmx6QHvZZ+S0o9P3THzQmmYjG 0209NisJ71LH/U64H77k+Ab72+3tO4xUMa7UwDNJ/rO/DgqP1xpY4yVcDnQR5/qbYzu3 uXxBuGTo7iodJeS1Mjri8y44oB9IIp2qI3NhLUjeAJIWzkWELE1HAD/OCJvRARqRg7Fh nk2g== X-Gm-Message-State: APt69E0ZKCJaa4BPBXcWTfPaezUCeV9a5XdCnCWnf52DcwWO9zc6lnNC SQHfa+K4ZjJSv5ichOiH2vdnUAeNn/TiAR/ptgLmc0IQrTFWsviQUN2+LNdaSzi2BgIbxfhTJrs UsV63/2TU+eJtk5Ruo+Eh4/36O8AWYhv8mzGKxmnIdi1RveFG0g625unPyah6rZD4bQ== X-Received: by 2002:aed:3f17:: with SMTP id p23-v6mr10823343qtf.185.1530630566181; Tue, 03 Jul 2018 08:09:26 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeOFhfLSEzXlJnq1j4AyvTOMJmlMC1NqNS6Sk3HyYRJtudcROQTzLCfQMiUQopFn1cHUmfX X-Received: by 2002:aed:3f17:: with SMTP id p23-v6mr10823274qtf.185.1530630565202; Tue, 03 Jul 2018 08:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530630565; cv=none; d=google.com; s=arc-20160816; b=GC4BECkTJWpbX59RTWk9/ABnPhgFsDAaq16PnHgR6btRQzWT3ZH9WhhQXpeH/bP8Dm r08TXxmkF8mSyTLGCCAED66uf1fUzgo2d1uH1daoxbZevx6tJfPuI1HAIvmBM5nvANrI vYk+kwDMlDYHZX26C7ywE/aInBeDxlFDezIMZcav/7oeLTm5zBJDVq5jRdEpmJbFpUGK qYPHMwKjCBZqUhvXykmhFWU34zR5b0EOuVts6GMnXC8R/eP+66oG5WWsK8por17eF4LH ubVN9IaDr29RpotVnLN36rdCWFLetrY69LbtuZSsbiMrfiWSNzWbUJzMMR0ELJjrQtG+ dj2g== 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=I7y7KL4Lqxbhu5Dcp8ujOrJ9wpol4rIibBu3Z/sM1NU=; b=qWR1BSDisFbRsbAsE1TjZAkEiW3ZzZ5ZowNxJlOIjn/4ifsMjNDkRjOa0w8WmnC2ss dy8C2RqMJWOI2K8HdkdZoqz18vOAOxMRDhHMFJuDQuw1WJdAw/mVCL323WB+29QRgvp7 7O4CDGu8IC2+5gw6PDV+7CKpNFwi3qcMo1AjZj1Pvfxt/78JIgtw6Jcv/BG5vSA+jery 0BYkgpK3cHKvSW36xK8x2sUGdz6UotAQXDeUbzUI44ZK6mB+ioHt4nnq2g7J/onBJre0 QaFEq3VN/Yqp5bZEymI3161IHee2kfnEzoUTZQ3JnDfcJG6ExNVzxCOSckEW8dTEwdym siIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=JvVrJdsK; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.136 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0136.outbound.protection.outlook.com. [104.47.0.136]) by mx.google.com with ESMTPS id d19-v6si1305919qtm.9.2018.07.03.08.09.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Jul 2018 08:09:25 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.136 as permitted sender) client-ip=104.47.0.136; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=JvVrJdsK; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.136 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=I7y7KL4Lqxbhu5Dcp8ujOrJ9wpol4rIibBu3Z/sM1NU=; b=JvVrJdsKZgzmWq29q5FbLoGAz4DcGYaY/uv66Wxp+jMt6pQ3tbfuGXn9TIom1Vi271t4gkDDi9Kssjq44tJ21Sc3POHPiQmrbu8vzcz47yY/Yu9WzCk7guuXt9To/RhRNGiUWryFwK8v97KJbf3qMa/oGo3S1FIuKSItpTbiIgQ= Received: from localhost.localdomain (185.231.240.5) by AM5PR0801MB1332.eurprd08.prod.outlook.com (2603:10a6:203:1f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.25; Tue, 3 Jul 2018 15:09:19 +0000 Subject: [PATCH v8 04/17] memcg: Move up for_each_mem_cgroup{, _tree} defines 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: Tue, 03 Jul 2018 18:09:16 +0300 Message-ID: <153063055665.1818.5200425793649695598.stgit@localhost.localdomain> In-Reply-To: <153063036670.1818.16010062622751502.stgit@localhost.localdomain> References: <153063036670.1818.16010062622751502.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: AM0PR02CA0005.eurprd02.prod.outlook.com (2603:10a6:208:3e::18) To AM5PR0801MB1332.eurprd08.prod.outlook.com (2603:10a6:203:1f::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f3a04258-c880-467f-c4c4-08d5e0f6f453 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:AM5PR0801MB1332; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1332; 3:bzCgXKGixcvKnDSEuvkLo3CG5PRI1WoYxc86vhfTJ7rAqkVRaKBQFRow3/nezNF7R0t6+5yFXNmpUSAkoGaLmQliTKOyLe6n9w8OhLw2p6yuNkVrusCYz4R+DnGwKXOvZm6YW6gNDnE5kLED+EzCkrqeiEqheXQikBjtldXD7HWeISGVjWt25qQiVnV9lBq5XPOxs/eEGYwx7KkF02U9hnz91jBXVlgXKMwN1AXM0pasQ9psHfOoZASnct43srQD; 25:ptSYB+mPXJJDvgp7VTTL5F4TNKScNGTm3KGwyZN+kzbf1StuiGrZu09E15wfhhMRyKcLUeD/RGY9bzHhcX15r8M47HT2uIoWsI+vbfT8YfbRTaSs0wStelL0uUaxcRzqpqxqR624scSVv3dtCF5CloyD69lvx3xw0OgOdsERUJ7onKKq5pOjSuhOeDN6CaJvcBq8L0F2LyDSxasd89a4aQ8WU/lJ1DUHOOKaF3wOHM2s+6BtqYrCP2OBrpEidYHMS39nfk2dHFz8CpVPpATUCWMH3UwXE+kHkAHSnErSw4I8fKgorTRe50HBi1ObqL7cqeGtFT+1zdHgNy0nbKb1Ow==; 31:RnJy94yKMGHb+M84bR7HkApYuQQljzBbowmvxcWt9TkkexHfXQgGtKHkA8zO1Hp4AzkNSZrRIj59gCIrGTv2/+TGcvGl8vs8RrrMMbKLRnPkQs3ZIZOKBtOtgFJdmMERPBKM4XNYq+l2FjWVFgjRZ6LDLVeprsMg/gGg8a/qzMHnS+8jaNkFZHcseujI4Q8j+rkdZm6uzVZbaHvJ2nWzrOp4QsvSXBX4PnUHjwFnobA= X-MS-TrafficTypeDiagnostic: AM5PR0801MB1332: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1332; 20:zxU0DrjPcPn2fDgNr4/gR6Dfe33UXr/uCO8eCgTz5zR/GlcW+cU5g36M88+Z8Rw23qr5XzD35HBm15zVZUuf7R8toeWxi1DRzpbSG9tplVKJ31D+qfOj2eYwv0ijlkz/CtqGRJFTw06y+YeEsEtQAbJhUQmgXw94dFKD2Duh7Akwz3OqgKPkhdJc+9doLK3AliNXy0Oggt/u3x+EBLgjQ5/oE8NDXM5bqPPVG8nLif7JsXDdJeyV+rnDvjciSCkDwAxsWQ+1ejqDhvcXrXlSBc4MwEKi+y0K471LSnAPXny9D+cKHq0iOzhuPYH2ZzI/eL6HTNWHmzDABryTUNRLq3AmOIoWf1V9lahSo/kFFcbf1AzuEGZUFObVylkBFYcXLQXOMRdeJZDvMElyuOc3+hw6ODAtIaYoBuyBDpMu0m9zmP8P+Kq0mmGjq4mdJ0H2OWU5sn4eD95gkgE2OntdOSoeBA/+nkG7XcPP5d0Lzwd00NFjB8dJuIrzhdBG1mCn; 4:f6wmS8y3AnccWKttab235TkKScyuA0dxIOQfzLF1UoFE/5HJrGIQ1Y9xlIRFvOXT64WtX86+PgGs0aFJm4uz82czJQ92Xwr4NSe9FwQyqHWJpkWBftR2I0JIas00L4NVi136fSTNWW23foXXOEIwTtEiXHFBiq7P5tBVWbMFbfn4tOzqcATqitFM0AgAwWcxoZtDnf2P49YFJRMb52uCtM6DNBpxELhXoQVixoaSUhldlCKGeL4jl/pkZy9Vm9AMFUPq7hZuZVr3BHtqhGFhI44IZEt5K0MO75fgVw3YtytPlbhjCoH5pV2/4H779JSYEvXlhkXOkocZQmX/ORC/r5kMfFjH/CZCt4sVPhFVzLw3hrty/GTh7Fxd08kPW8Jm 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)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM5PR0801MB1332; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0801MB1332; X-Forefront-PRVS: 0722981D2A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(396003)(136003)(376002)(39850400004)(366004)(346002)(199004)(189003)(97736004)(478600001)(8936002)(305945005)(2906002)(8676002)(81166006)(81156014)(50466002)(7416002)(7736002)(25786009)(39060400002)(103116003)(53936002)(23676004)(11346002)(52116002)(47776003)(58126008)(33896004)(316002)(186003)(476003)(446003)(956004)(6506007)(105586002)(106356001)(86362001)(5660300001)(3846002)(386003)(230700001)(6116002)(68736007)(6666003)(2486003)(7696005)(61506002)(55016002)(9686003)(486006)(16526019)(76176011)(66066001)(26005)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1332; 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?MTtBTTVQUjA4MDFNQjEzMzI7MjM6c1BSVldCVmUydFZHS3p6OWVlRlZlTGwx?= =?utf-8?B?aXNtTzFFU2Y5dE9oK3ZORVpDZE83QWtkVE9vaDZWOFlFcncvNHJrdjhoVEhp?= =?utf-8?B?Z0ZZTStlVnlhMWpybmFYSDJFVVZjU1FFVnRLelQ4Tmwxcy93NW5rbmIycEVW?= =?utf-8?B?bk5vOHlRa1VvWGNHQUZxVU9YRFlkakg4dkt2WFdtbjZBZnlndWVMWmp0S1BF?= =?utf-8?B?cWFPTHBIMXB4cVdDNTNwNWwxYVVwZzRBT0MvZ3FXVmtxMUM2RmlaSjZHeXNq?= =?utf-8?B?WGpQVW94OXBGb0NFKzE5UFYwVmp3dXpZY2c4RDBoVkcxRzFMbWRZTG5sWm5i?= =?utf-8?B?VEdCZWtiallkMGJGdDJkWW5hVnp0SVM4VTR3djJOVHdvMFZNN2ZDSVEra2tW?= =?utf-8?B?dUVKc0E1OE82UWR0U0czZVliSmNiNkZCWEQ0Wjk1MWdPRjVob2xxVU9Uc3FD?= =?utf-8?B?d0IzZVF4L0R6NHMwZlEyUmJTRTlqQ1VXSXVtQ3FUM21mTmdXZUR3ZzBldHdX?= =?utf-8?B?MTNUcVZGajhjbVpwWFZYSHdyS3lGamNLN0xOTVBXTyt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U9q6jFvXEFCWQ61BmxMaRh5141A18Au84cKXHdj8Ze3Qq/i+LHEYB72dJ+dCzIiqKj51GMpt8vCgdGVX2Ica3+W9S64YVVB47F4saKSbMCQ17GUZVSu5C+OIg==; 5:aAXZSffMN9WBtW4VMhOjOCHNQWx77jc1bN67/kx9R1f1IP7WB9ZvgvITPL0YXAFopApZ14CPessDLes2x7MLzcI28O1j16YvldHMAo/JpnA2dDzDejbZDwb7gJvFFP4M5Ytj+EEeXwJ8EJIIYI8/uZow8lmsWDXOX70U2i7/m9A=; 24:pHKjr5rfmkHodh+0EVN6pKxiH6K0/ETjHOZ08mzX35en8NzvA70QjIeefa1eQuQ7W5oWMyBLtTZVp0V5T15fypfDSdsiHotHTL5DJSN+gTs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1332; 7:El1iXPSrPLIhC9KxmJAnz/WGUksuyZ6Hp7y6Z/gFXXJPcgijIvQDPbIvbL8gEKkYyW4HPesqCyx23pEwvJFDI4sXGAnfD7Q0GorFKMNa8QoeNV3BuritSJlmK7lZkF5KKreHBbjTGccX/FfPdJAhQZbmn53LjF8w8Am+9CBCZVswyus+kB5jSnFYmAUC8DCiGo6n8l4IlHS6KFrJYHfdSw/NSbxuqiUuHoTWFw9s1yz6FZ2KGAwk8zgyu0NHQ94y; 20:OGe9meH9lEHz5M9ELZsLBkvC0RdGTG1EePQl5Nq5p/+qLv4a7tuXMwchXq9/XhIQftYgtqcWjWQ1sp0QZCtgYjQlpnox34ho1Yv5jKD8d+ulzf94T0OrcBH9Bo0wURsJ1pmqh3nv+uB7fEkbz8eIG8x9ZTqgh4DVu2aNA7rP17c= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2018 15:09:19.4687 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f3a04258-c880-467f-c4c4-08d5e0f6f453 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1332 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 Next patch requires these defines are above their current position, so here they are moved to declarations. Signed-off-by: Kirill Tkhai Acked-by: Vladimir Davydov Tested-by: Shakeel Butt --- mm/memcontrol.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 31d203099af8..74247a580cdd 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) { @@ -913,21 +928,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