From patchwork Tue May 22 10:09:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10417871 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 B3D8860224 for ; Tue, 22 May 2018 10:09:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A07BE28A49 for ; Tue, 22 May 2018 10:09:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 940A428BAB; Tue, 22 May 2018 10:09:38 +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 D34CB28A49 for ; Tue, 22 May 2018 10:09:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AE2F86B0273; Tue, 22 May 2018 06:09:33 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A93CE6B0274; Tue, 22 May 2018 06:09:33 -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 911016B0275; Tue, 22 May 2018 06:09:33 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt0-f197.google.com (mail-qt0-f197.google.com [209.85.216.197]) by kanga.kvack.org (Postfix) with ESMTP id 5C79D6B0273 for ; Tue, 22 May 2018 06:09:33 -0400 (EDT) Received: by mail-qt0-f197.google.com with SMTP id a21-v6so18526488qtp.19 for ; Tue, 22 May 2018 03:09:33 -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=N+REnZe//AhGiY4GJZpvJ/PYzVbGrxJjo40vO/RGOVo=; b=sgHvP3m+cZdFkdYdP5Yr8JCIQgWgw25HFBwSee1Z0dW6JeZFB8AmjHV/2CZO8CxgNZ KGtXT2QLEe2TiwEpE8dOBGWUiyLt6mbvK5AO/6c5LMzQRZTuXBtdE61Ts1P3JA9AfFoO 9VB/U1GZZLPOZfH7JmdA7/WbNYPjel/VBdxgfN67RAnTtynlHcMGKGu1F1Z0FFwOQv5t O8AB7MmCBhf3zKc6FTCSD5mgzAwaKBuVzN39r/g4AfGA/O7VvjE5JV+YChWKNw/5+Wsv 9k/BKdHf2axrbwKv3aOZxr2sNI7tO5fjwKp5ua7+w7el2ARd+BGAf0MqtzlDlkRYsdTU Iqrw== X-Gm-Message-State: ALKqPwedsUM215CHp1NdPsClCkcDa1VwvQOj6JoZww1seb+AB4ypb9IP HK8jy/lbyW5XHxCCYudekRq70rkJB9iOrgRgNMYSwrCXyY/+og6Q4iOtgvRFyh1DQuWHT1UJWSj sfHbzu2YKLZpEMiIZi7jaBZAYqNK0lGB02UXCcY2oWKgCapeqMFuTAAv5KpbDOKxZGg== X-Received: by 2002:aed:21d1:: with SMTP id m17-v6mr21686698qtc.351.1526983773180; Tue, 22 May 2018 03:09:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp+ArpUV5kjXDEJth6fY8MjwC8br4/K1duirgBxanFnZ+fLbdrSFCqf6EmEmtG8ri8jfO/Z X-Received: by 2002:aed:21d1:: with SMTP id m17-v6mr21686651qtc.351.1526983772380; Tue, 22 May 2018 03:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526983772; cv=none; d=google.com; s=arc-20160816; b=ZKXzWpJscQgjhPPjcI3JttlWWOyIZr9uCLid7yOm0TKy2l4b4r/4HghqPiWPbEYQfI QZp8HgqYJFDCegUIyk5fa2ALSS2GlQfR085mhJ+I4FDk66cap3XISlaOAy1PNc8Dm9BU Eg5TRCJy3int1zgXnKCGU/sbU0dYqCw3pGS32hrJm4pZoj35VaDHZWpOa7Y2ezNdnOYs xiEAaEkBP799kt2c0wWKpU+5Tpe6KWMSvC3ENR4gsDNt2AdveEo/o+H19TrSNd+RCUeV O50ws5kDSi17m7XxyMhSawHK7EINTkg7gNu5YIXbTtPyY5K0AQngQy2X+DTqFqSUrDbJ WGeQ== 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=N+REnZe//AhGiY4GJZpvJ/PYzVbGrxJjo40vO/RGOVo=; b=GBHEmQxAvcrdRyFnjC15KHkGv9TyDAHiDN9IzpKSuMjr5OFNvWByk3LeDThmlbdAHV zxtyzVqkLj7k0PZR5dMewqN4E9G1BcEsnT8WfN1eWaewoPn6WEjKGdGz+b1vt3Zil//D woYDTzwM4pwdwHygOprp8/3M2IGAvhXqkPBFAl0ujwrknK3CERmG4to/KBeeKNoCD6BA SVWpdna0svJxVWZ+xzCIsGSTEVb7oTw6WhFjAEwh97CVPsDh2KIfm7z5ueAqrcBX2h+s 2CHoB7oxxX9XrXja0v/aoGE9ngdSvJLJWyo7fWmVvF3atihpplNJFOoDtHjXH0KzlWic pWBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=LKYM7Bfz; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.1.90 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0090.outbound.protection.outlook.com. [104.47.1.90]) by mx.google.com with ESMTPS id i64-v6si520125qkh.374.2018.05.22.03.09.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 May 2018 03:09:32 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.1.90 as permitted sender) client-ip=104.47.1.90; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=LKYM7Bfz; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.1.90 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=N+REnZe//AhGiY4GJZpvJ/PYzVbGrxJjo40vO/RGOVo=; b=LKYM7BfzVg7uXjdzlYvc0eZhkiuiLnqe5w1hVwe8nug2DzYYw1AmBBXFIleYEEQIHZqr0h+PyHcuH6aLG0vhhI5CphWxe4QnQBPRNferRBQNgHc0RESz4c6C2HcM4Idb+mRBN02oQtDRHl6qwu/yZDngLU21ktdES8j7j3cagbg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (195.214.232.6) by HE1PR0801MB1338.eurprd08.prod.outlook.com (2603:10a6:3:39::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Tue, 22 May 2018 10:09:25 +0000 Subject: [PATCH v7 12/17] mm: Export mem_cgroup_is_root() 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: Tue, 22 May 2018 13:09:23 +0300 Message-ID: <152698376317.3393.15242457477338422253.stgit@localhost.localdomain> In-Reply-To: <152698356466.3393.5351712806709424140.stgit@localhost.localdomain> References: <152698356466.3393.5351712806709424140.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: AM6PR0502CA0024.eurprd05.prod.outlook.com (2603:10a6:209:1::37) To HE1PR0801MB1338.eurprd08.prod.outlook.com (2603:10a6:3:39::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:HE1PR0801MB1338; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1338; 3:azb+Hkfc8KQ1ZZJEg4MbgbziOmgsAEw/KRIjjugDsfZCa9bnzF2R46mUazxKNLavM+j8vNsQWtaFTVD9/hLC58hax6efvvo+EOrY/O8fAdosTKBPp+tnBYo+LF73VAiiXPW9wUaYkzzFPG3F4tAnhOngAtE0o/ZVVeJqTEWljm1kuVybIeN+PHbrZdDQ6T75QmbO9gJEkFWYnmiOPPTQviOTw1pqN4iLH7pzqCtOc5CbjI5WQnPXR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myNByEFM8vLS7hBmFcCtjU6ZCfL/lMcvGAz6E4lET9gQQt7A9sp0p+1Eu8i/JPF2th8ufk7eE9vQiQFjseZDdni3cYyezIIRTwnvdDfI9xjHYKK0knB8pSwkQ; 4:VSC0u0n0tratmJ3MqSdzrxy+T3Add8rVYmsm4uaUumpTyGLO15dpHPlUIJOwuf26RiPZwWjxq19G2YlDoDdPML+gk1oUKXdUJo6DYxT4dXdJowpaaTjJTohJEr1FVmcKFrvgLJohQ8islMqJ5o+p1JC4ZHFyrZWZmOH2X7ANU1ZHbimSVkm1wm2wge6TMy9IL54PqHc1r3eTWCsOE+JVGlQaijWuF/4lW3jdoYfybZ1DJaAICQbfvSE6vAHriIjRbAmaJAnGwjqYNOInhdiIGg== 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)(8121501046)(5005006)(3231254)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:HE1PR0801MB1338; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0801MB1338; X-Forefront-PRVS: 0680FADD48 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(376002)(39850400004)(396003)(366004)(346002)(39380400002)(189003)(199004)(50466002)(105586002)(6116002)(3846002)(81156014)(81166006)(106356001)(68736007)(25786009)(305945005)(6636002)(486006)(8676002)(956004)(476003)(7696005)(23676004)(11346002)(52116002)(86362001)(2486003)(446003)(39060400002)(76176011)(9686003)(5660300001)(7736002)(53936002)(103116003)(97736004)(316002)(2906002)(58126008)(33896004)(61506002)(55236004)(7416002)(6506007)(386003)(8936002)(47776003)(478600001)(66066001)(26005)(230700001)(16526019)(55016002)(59450400001)(186003)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0801MB1338; 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?MTtIRTFQUjA4MDFNQjEzMzg7MjM6T3BTZy9rVExESWJPK3EzdjFjVUpZSDdK?= =?utf-8?B?NCtCeDk3RWFoSjFWUFRvSXRKZyt5b1hweU5wS2Y5QlpYVU9JT3IyVmk5dFhw?= =?utf-8?B?TnFPOVI3NWszL1FFZUZYM0RveXFJWUhmK0xWek43blBYUE81bzd0UlNNbHhy?= =?utf-8?B?V0lqNWZCQmcrNzM4U292R2lHc015Qjd3MEVxbjNTcDhxVVBiZE1lUFp0bUxl?= =?utf-8?B?VjdoVERaakRhOEsyN3cwM3BlVmEyMEkwMFpRTGNkSEpTN2Q0dkNaL0NlWTl0?= =?utf-8?B?YTJDZDVkaU9hWmJNU2NEVG1uakFWdk55dDQ5UXl4TlZZK0FlMktZR1RpL0M2?= =?utf-8?B?UEpDTkdtN0o2R01qbnI1aFMwTC82YWt5dXJyeEc2dzNteHBKYlVHdVhLUW4w?= =?utf-8?B?c2RGaW0yU2FoT1U1dWc0RnIxSGg0b3g0dHJXV1ZLY3VJcEt4bURVK1hFeUti?= =?utf-8?B?d2NpK213amVnc0tNMWJhR0txVWN0bFJPU0JCblZ6bUZBdlIrS0lBZndOMjVB?= =?utf-8?B?czMxdDM3QUcxQjB2T1hOWW9VQjhLZkZRaVFTVlMvTzlERVBUZkNobGZ4V1hk?= =?utf-8?B?S09qQkczdXRuU3NlK08vdWQ1YTFFS2lHems1WHZIcmV3Uy9jY09CdFpBZndV?= =?utf-8?B?aXBnb3AwelVYTXFnZ3RuRHZtVDhGZTdHN2ZCRzRWSjlxeFZpUXlaalJkWmZs?= =?utf-8?B?OVA2T2ZUK1BJZ1pnU3V0eDFZWmZub2psZUNmeU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JOtZ7OLXr2zrI69lQkALabXnkw2R0tChjels75ChD3RliIh0=; 24:EjvcJ5DYLD5t6E5qS3q2NzcPadtaTziegZkUPBSTHSIt6S+W1w0ZrDZTnD8pVOLAn9IY3/uc490GLdBiFcc7Ss08EtHNuW9xxYX2rGch0Wc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1338; 7:KHOK91c3kHy7rY9/XBwOG1f4vBjrNMRUh93ISE3UKBGecFAY2dQ/6lWtj333NF3vAb8GynmP7jXccj1et+ArK3siGISijfQekEoKS5SysMS3fxcONXseJs0kUeD5gva47IJDLjtxCY0MefRNHrW9jGm5xCNrOJP1FpgbGxUBUi5y9Qf+uKB8oVY8dXShNm983hgOo2Xmz0pTRR7w1fxHJlLC3VCk7Uz5ibGuxMkbiIL4PzWX8iKtvcBq6VU7Ravz; 20:KnCa6HGk4So1KxmcaPY7d/Wfp3v9CLPRwQHVccbFHhG84ZLDSby0SmVYTRoZt69Lz8x+Ng7wCFZXtYyOuqOoeFT0nN7fZZ7197CKMUkQy7I+qaCv9Sb847DLGz7e+rMQHUcZIejsISwpFBZDFOLo35AybdV0VCz/L2CBx/W46Oo= X-MS-Office365-Filtering-Correlation-Id: 66d8dafa-72c9-468f-829f-08d5bfcc1a57 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 May 2018 10:09:25.4903 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 66d8dafa-72c9-468f-829f-08d5bfcc1a57 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1338 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 --- 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 e51c6e953d7a..24abed028c6e 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -311,6 +311,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); @@ -780,6 +785,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 a86dfeaa9aa1..a886fc7398e9 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.