Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1264037imm; Tue, 3 Jul 2018 08:12:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfJo+bLMoKWrpJDZu9HHFviTi2JGH2zGyugDg3+YDRWdQxwAy9BncAE3Pl3e6UPw9WoYAN6 X-Received: by 2002:a62:9fd1:: with SMTP id v78-v6mr30086193pfk.233.1530630738701; Tue, 03 Jul 2018 08:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530630738; cv=none; d=google.com; s=arc-20160816; b=Ml5o13p+hVxsnf8ytlzZS5pIIaKVlJLjqvIEqysDMG5cxx0Nub7TD8cjkjkxMac+jZ j616plAw501lqNLQqpc2nTNTWUN080sc51o9ciYeo+VgTDXCRF8cpdF7arr7KKe3BQ0Q sOtEe5KcFM+wIPo/oZDS8ZvSALDGwoKvRLYa/wC4Xs2fC9dP7BOnEk+PWYSO8p8M8KOy HFqgqwpko3IJeH4Q7uSPRk1nWXpHhuBllPL0WMQ5a5avhxSgOoZQ73a6XrQNvj4r6nfG js21tR47DPLaXpw0VBlJoO8HtB1AFTrVNZ/FarDiNXPnbny2MmakUoDcotwgsZx3Qw5I nFKA== 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=lL4ik/QDNBKIKTSnB6FxD97tPjOAWFP9j8Z5Acm+6aY=; b=X/FwZw1xMmAoSrcZEKifHsb8agFYPJurjo4Wy5xR+UVdzYzvkA2lLTNLJeLkSww7FC Z2bckyYaz+66t4JBjkUE/N9jbk9VnXP9Y3GWtaCWu4i/CnJxLaxTaP69ATyITvtBt9Is WPyZ5eXz7/f717H2TfqrpJiy7fVEWl8l6LLiEYTl7yc15vBr9IMD8952b2KDhQ4NQrF+ Mkc9IK1zJbQTFPWYEVVy9HLuEyLNyGdCAeH4XNE7rm9WtKNMk/kDs6Q5uJGVeVXhlk59 3RkqkYQqMNsDOQe9Vq6J0A9OXRD+BRWvRK8DPt20fI061fYzn2GUrR5vWSScq/ZGMxEJ lbow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=K0psPjUE; 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 w133-v6si1442796pfd.313.2018.07.03.08.12.04; Tue, 03 Jul 2018 08:12:18 -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=K0psPjUE; 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 S933862AbeGCPLA (ORCPT + 99 others); Tue, 3 Jul 2018 11:11:00 -0400 Received: from mail-eopbgr10099.outbound.protection.outlook.com ([40.107.1.99]:42005 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932458AbeGCPK5 (ORCPT ); Tue, 3 Jul 2018 11:10:57 -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=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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?eGg3VXhubW5RMUhLN2MyY0oyRWJXNU5NL3dJdTdYZm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u/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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.