From patchwork Tue Jul 3 15:10:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10504339 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 E3B0B60325 for ; Tue, 3 Jul 2018 15:11:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0BAD28B30 for ; Tue, 3 Jul 2018 15:11:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3D3A28B5C; Tue, 3 Jul 2018 15:11:00 +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 88AA728B30 for ; Tue, 3 Jul 2018 15:10:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 22C456B0289; Tue, 3 Jul 2018 11:10:58 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 203496B028A; Tue, 3 Jul 2018 11:10:58 -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 0F20E6B028B; Tue, 3 Jul 2018 11:10:58 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f200.google.com (mail-qk0-f200.google.com [209.85.220.200]) by kanga.kvack.org (Postfix) with ESMTP id DC02E6B0289 for ; Tue, 3 Jul 2018 11:10:57 -0400 (EDT) Received: by mail-qk0-f200.google.com with SMTP id c27-v6so802506qkj.3 for ; Tue, 03 Jul 2018 08:10:57 -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=lL4ik/QDNBKIKTSnB6FxD97tPjOAWFP9j8Z5Acm+6aY=; b=t/dnYeyS/X+5E5zs6SCaBmJWqUuGmrH9hs6rXyE0UPdyDgMJCbL+BgkTCzjmnRFYdY TKsiXecKNnJsi0hY9nnC8UAY2n9176j7b8EZVR83ZMCHksquT6Igo2QfKVm71wVseb6/ 6ysLGmjhRDRJCkLvwN/a3wE78tbaRt9lcJSCPrElN3NgbCB1x9zLJSD9WFWMpjnItt/1 ygjL3rY7wc/0okCT3VG03TwJJFYugOWTyjp5LKd61+pNNCIju58AZeXFBCcyYGDI84d5 YK2HsZAHKf2HGJzo9YtzyEVO9D8T7yZs0XxD9R49J4Zv9OG+mGVr4P0dfVN7mntQOfgX tG0g== X-Gm-Message-State: APt69E1bQmX8XVs/qwqIyC6BI02gfcOX8uPojkbl8wpAtqfxS47UKewC gaPmIwC8LmnUGZ/xHo+kw+hB3fcMa+angW2C3ahiJ+dc/yFoG6cwfiPNTpZ0eix6qRI3ry3xG+v zTM/wKBr0FtCVGAhoTJKh/KhGUJO/16lW/HSi0GDI/Dv/YgMbSeudeVotiF+AFgskig== X-Received: by 2002:ac8:218d:: with SMTP id 13-v6mr23690537qty.122.1530630657676; Tue, 03 Jul 2018 08:10:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeK38YkNq5dx2wulnnOGWSE+d4ESb03s7/gswnhRA58/I1mfTWLjCb88s/QADhEcMdujZqC X-Received: by 2002:ac8:218d:: with SMTP id 13-v6mr23690478qty.122.1530630656846; Tue, 03 Jul 2018 08:10:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530630656; cv=none; d=google.com; s=arc-20160816; b=zTuqnxEOTCZ9Ik2cWtVvuad0YWYAMTuM+SlYSbCsEccJ1B//ow7q1B3Nna+7xB6hSj gz8vkukJ/k9potz51APE7pX/Wgq44I751gRkU8LalxYYkYbguhZ4fYtsRSB3YTkKV79I hqqRP8hd3hhiNcmYoo927Xt+U6om48DPo5tBxYPIPh8OXIuYmpPoxcEjf9yOllkxSVi1 pw77+zN+KUyEq4AMp5FBUOFUX4XV+FL7z+M8T5H7zCh/owfKAR9IdE09i806cAjvXoR+ BCGY57QzAUmzYld0pB6Ge49n285xTZSaEPccLVIdNl1VejhzrcC2hDYupOxPlQ3GS/pD Qulw== 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=lL4ik/QDNBKIKTSnB6FxD97tPjOAWFP9j8Z5Acm+6aY=; b=yHmPhSF5zdCXYtb0509WrYUAHLCgDhzPDEvPi8dpC0a2Dk7tmYPfM2Vrmoq9hgWYZu zl9j1KOlA4ZueRuqLUaAuXFVZrteKxuTRK6m0VpDy1GjZ6LHZFYFugr7jt9hzDnPqLWG /VuqR0IuLPEcs9koPFxdq1t3EVYfpmFTasYJWNGe1H6vm5knR84WEHnoRPu4ikds0/2T Pp+8nUJQHQ9cWwY+hs4+BzP/E5CvHKANN6ya7ib8Buz3aRfg0kqd/RgafOLSDwFp8AI+ r9eUuFoxIVu1KAUmsoyEV94yUvSZRk7TFRIPRglPt/d31xcKF0wYtIZP+WQWvOdxOYaI hehQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=K0psPjUE; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.1.126 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10126.outbound.protection.outlook.com. [40.107.1.126]) by mx.google.com with ESMTPS id f26-v6si1295234qte.45.2018.07.03.08.10.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Jul 2018 08:10:56 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.1.126 as permitted sender) client-ip=40.107.1.126; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=K0psPjUE; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 40.107.1.126 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=lL4ik/QDNBKIKTSnB6FxD97tPjOAWFP9j8Z5Acm+6aY=; b=K0psPjUEIeyq1YyxJbwSvbMFrFs9gqV6nm7zBybjEFwbloYL72AHFk/kfmO2vBCswJFyjv8nXOc5/pyTxdAZEueomzzDqljFJtDA1f2Ww1vA53rvc2ITk1MODKa/cj+9yj3ibdPiZpIEUB5/UzduxyuvknyMdLyn7nrVJM0quj0= Received: from localhost.localdomain (185.231.240.5) by HE1PR0801MB1339.eurprd08.prod.outlook.com (2603:10a6:3:3a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.23; Tue, 3 Jul 2018 15:10:48 +0000 Subject: [PATCH v8 12/17] mm: Export mem_cgroup_is_root() 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:10:43 +0300 Message-ID: <153063064347.1818.1987011484100392706.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: VI1PR0501CA0048.eurprd05.prod.outlook.com (2603:10a6:800:60::34) To HE1PR0801MB1339.eurprd08.prod.outlook.com (2603:10a6:3:3a::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d6c7d112-8c6b-4507-e1d6-08d5e0f72a2e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:HE1PR0801MB1339; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1339; 3:uUXE13LFVwZ3vI0ZuviJqjrGI2FVRanYMsjIrooqhOrv8JM1b3tdhr9mW6wbg4aOmRWaKV1VjVoRlUAw9F7rFidMhMqSt5N5pHA8eZCuFKR0siDjao1qyBQbYIYsGW6yfqoBlNa0+jn8MUx70jYNnXYoiN01Y8qJmT0hZoQ0A6B0YrK9GRbTWCGYTEKUwB0sIaAB4if6ihehliQaBQxLnOndGaGiT/4yEW3RjXpWA+oGvLgj3rypihAllYmHcF1z; 25:iZSls+jGPaqW1ZeghqPfDIAt5IYfN0sVO2HhgqUKvTOUHSpSxgcCfNwAFEayTVdqYO8MSUogMc1Q6tdYqPX3TJjX74hxQBH8AJ000QqthO9DZOs9jtJEF7GAT5hlnYIzF/BK0EdZf6kr2s18LJfvIWGBM9m/P91wRWvPPGYaNJkDWNvVOLVZaGI4Zz8e/vEK9nsMlGkPeNK7NywlYDlzXWDFsVzqtZuz9ayIvHnPOvpUrmlHtscm24D6mXpTz6T4OuK/puRian3idtDTWtzAyjs01/BR7P1QU0WIr3IE8CgwowLQs7GU5D0LVcPeLZyCkiNsdze8IgyVySFW8ENcfQ==; 31:Qvkt+q46tHlX2FpINYwP6iZ7F1BNCln33Y+Wn0Xap0abiCEdtHDDbXbETYsIPeFZzLe8k/MHNAdt/c6/jlI1LfzjH5sHx4kq+FadlHCDPXvXshXxjmghWVlLqyfAxNW9tIzvHRK+LDajfm4qlpXTq2W5c0dYcioTGn3MByIKfsd8w6Wwdq3XOcKWsRkECo5sCBPhVH/KP7REIFTAtvV0oOewu0hMCJYOIlMva8hShH0= X-MS-TrafficTypeDiagnostic: HE1PR0801MB1339: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1339; 20:Le1rfI0oKxHKPoIZAO0lue7uX0t+fBSA8k99bnUIueT3ATur4LBpXkwfe1b+Mz/6N56J0R8ZVaVHB/xdOrav4W+O/AkAp/kUqDcYoNXMYkouAbZpuu/L6/3wreunp93sAkl030zTZMDkLBKWtQW1Ki/v5YxyfWDxIpLkVPb1weB2AcA3k72RJ/UzzSqg4RJjMwk6/REV4nDWGmtvfhRHZl0PRpXOATLNhvDlXL0I9Y2xpjNwsSczWS2fZQ/yr23gVTXyWuDGSWPuSbbx/zy7QyYgtohyRnla5bkKeXQ5WmBPpkaUctUzeTz0Ea9azfPzcLPI22JLrN4CH+plHNcI1bifpm3oC6FeYhxJ1nxHEkFUUdXYdMXDwh0dcoVxZfbvoN/Y+D8TqAXy8vpGF95u87K0o3baqAWW1hF7PpVKsQv6JvJZb2YXciYo9rYfHYRa+wRAhfiNivnpjCygQQePq+jsptyWq80NS/ThKcN+5dCWGtKIw2X5+4RlAqciR94z; 4:JCEJtvHu0O8jSa7dx3af5Hm8RNQAvalCdgOxsBSuPQbIBgb9lzigDX4be4gnKf9ktwRfLcbiC/vx7ROPfX2uw4MmUiQzPhTwtoalReo7tbiZWjBwHdZIWew6ZC5B4qKDWPw089qX6zNu8v3UZ56M3XfB39z3lh2oaxMHzyZ4t6IVHdZ0CldutmZHHMTlIf+loM+k0QsKb/pLBORgMtWwFSQ5uYU5zTASunSTfa4GRG2ku3zNRQu3yZJ+0c3g5u6xf4B1ntHLY7sQp7nsoDQrCcKlwwLp+NkPAyDAepfokyWOOnsLofm00u1CYhPoI2WiJq4L5iflK+e2siVxikXn71NK/w01vl0RytoiMXXlIup1v+wKmzdbc8pNWwGlhxi6 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)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:HE1PR0801MB1339; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0801MB1339; X-Forefront-PRVS: 0722981D2A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(376002)(396003)(346002)(366004)(136003)(39850400004)(199004)(189003)(58126008)(8936002)(6666003)(53936002)(956004)(446003)(6116002)(3846002)(39060400002)(76176011)(11346002)(476003)(316002)(103116003)(47776003)(486006)(230700001)(50466002)(97736004)(5660300001)(105586002)(23676004)(25786009)(52116002)(106356001)(7696005)(7416002)(2486003)(186003)(26005)(66066001)(9686003)(33896004)(478600001)(2906002)(81166006)(68736007)(81156014)(386003)(6506007)(8676002)(61506002)(14444005)(55016002)(16526019)(305945005)(86362001)(7736002)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0801MB1339; 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?MTtIRTFQUjA4MDFNQjEzMzk7MjM6blFpTTBOYmlrR1hhdDFxd3N3YW9JaXpZ?= =?utf-8?B?ZEtuazd0dFMwWXVSYW5QZ0lzTzdIWml0MXRZUVp5Sy9UQkpJR1RNRVU1Z01j?= =?utf-8?B?SVJ1Nk1SMG9PdkJsK1RmQXVJSCtzK0JWMVBOeUYxZm9CWHFNTFUyRXM2cnN2?= =?utf-8?B?eGg3VXhubW5RMUhLN2MyY0oyRWJXNU5NL3dJdTdYZmExVktOSmduZ0xZUnBL?= =?utf-8?B?d3VGMmFFOGhxSDVEY2RhWXpHWnZzcE95U05iWlNITjIzV3ZSU2I4Q1BSNjBZ?= =?utf-8?B?WWVrdE1nQ1BlQysyTndSbEhEMEg5U3dmdUYxbi9HbGhxSWFSVU5DUC8xMEYy?= =?utf-8?B?TzJrTSt2SWYyWFE3bjZDcSt6cHpmbWdqTm5sVXBsU1I1cFVJb2I0MjhYK2dS?= =?utf-8?B?WUlMYVcvUTNxSXpJWUMxTkVnNGtXRXQ4Tk5zb0VNVHl1b1FLY0QxSU44aHRx?= =?utf-8?B?eDAvYmdaczhua0x6aGNhZm1pSWFzR3dXa2pTVHRtT2dXWUNQa0ROSDVMNHAz?= =?utf-8?B?V0hGNzNoMktxMFMwaTFJK0FhZHg2Rm5rQVI5NXV1ajd4eVJZQ1VQYS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SEpov8bQjGNRiOB17/RfVQpv59q3Rfzcu0s3xCRxA/FoRYbkn20b2ZU9+FrzgCWjsVmR0NNAGZmLGwj4AHEfUqMFPbgy7X53PZvjMBqtDc6KY1xnAlTXmexoCIuIzg0Wlb9YbteR8EFszJnENuliRTJT/2GJ5I0IEkBMGFDv7vbQrCsjXaCHBsr7W59DpwJr17yUnQ==; 5:PQKz4W6NhsRnAAV6YrqhocHBkFZnotxABEHpuCkUbRUsbJhE3sAgIZkd+OzTW5lRISkH/Byvv5tLox2WIYqP5vYD0LmNFGMihsnLwcx01d/dRm3bygJiaCP0wQK9s8VRg9NmeDUA6ttG+SLgHpjSGVNMNZhAl7ppHToKlWbqmgc=; 24:HXXwIFo0zdRiPGInXOOdzNNyqeXRQmYAU8WNJUAocVzehL85muIkMzkGpRl48pAJVPqSeaHIUw+Gwi77N7hMh8njhqMYK1shd6Z+v38GTz8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1339; 7:Gd/+hmYRJkkmlfNjqPV+6wuKT4Tn+J2LP1hrisppYMCu7S9honIMBYYiS74u/kiKglMYgc3y6ByfRSwQIPFVpX9fsjIAe1vk12VdF5+reqTceKsRLF4sdBMg+RxD7dOwV2OujxzIjUM5O969mnRkkYJQ5hj0jKuP9gB4rYw5echdh95p+hzIhUjJa0ek47THbi9+/TS+/op5tm+Ky0S0kdomyZac26MxzLhbvTSdIK7AQ/x0n39wNu6QKDWX7KBf; 20:iTDtQ7dg/VYX5ItbFOfIL3Q6v9OyhcVx7xA/peUdLxhqnipOu7f/SRqMdMfdsS1vL7JkIvNNGkoq0D8zCG7vAsHn5smsQcJjKPwvQq6i4c8sHr+ciIFTno37KHU/QllD5JibrxdBp5CWBLAk1n/2YQgY+WU1TxqUF/WmnH13rDo= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2018 15:10:48.3769 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d6c7d112-8c6b-4507-e1d6-08d5e0f72a2e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1339 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 This will be used in next patch. Signed-off-by: Kirill Tkhai Acked-by: Vladimir Davydov Tested-by: Shakeel Butt --- include/linux/memcontrol.h | 10 ++++++++++ mm/memcontrol.c | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index d8c38eafa251..2c52b4313117 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -327,6 +327,11 @@ struct mem_cgroup { extern struct mem_cgroup *root_mem_cgroup; +static inline bool mem_cgroup_is_root(struct mem_cgroup *memcg) +{ + return (memcg == root_mem_cgroup); +} + static inline bool mem_cgroup_disabled(void) { return !cgroup_subsys_enabled(memory_cgrp_subsys); @@ -800,6 +805,11 @@ void mem_cgroup_split_huge_fixup(struct page *head); struct mem_cgroup; +static inline bool mem_cgroup_is_root(struct mem_cgroup *memcg) +{ + return true; +} + static inline bool mem_cgroup_disabled(void) { return true; diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 510c435a15dd..1a6c61814dbc 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -261,11 +261,6 @@ struct cgroup_subsys_state *vmpressure_to_css(struct vmpressure *vmpr) return &container_of(vmpr, struct mem_cgroup, vmpressure)->css; } -static inline bool mem_cgroup_is_root(struct mem_cgroup *memcg) -{ - return (memcg == root_mem_cgroup); -} - #ifdef CONFIG_MEMCG_KMEM /* * This will be the memcg's index in each cache's ->memcg_params.memcg_caches.