From patchwork Mon Jul 9 08:39:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10513973 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 9B3B3603D7 for ; Mon, 9 Jul 2018 08:39:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 821C228A5A for ; Mon, 9 Jul 2018 08:39:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7433428A5E; Mon, 9 Jul 2018 08:39:37 +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 E306428A5A for ; Mon, 9 Jul 2018 08:39:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D912C6B029C; Mon, 9 Jul 2018 04:39:35 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D19AF6B029E; Mon, 9 Jul 2018 04:39:35 -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 B944B6B029F; Mon, 9 Jul 2018 04:39:35 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f70.google.com (mail-pl0-f70.google.com [209.85.160.70]) by kanga.kvack.org (Postfix) with ESMTP id 72FFD6B029C for ; Mon, 9 Jul 2018 04:39:35 -0400 (EDT) Received: by mail-pl0-f70.google.com with SMTP id p91-v6so9588140plb.12 for ; Mon, 09 Jul 2018 01:39:35 -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=R8blRo4hZLGF6t68Km8F6AP0zl8CaRfdZi6lbR/A6EU=; b=YiG6gO+XmccUYeAcE9RKbELg6HY2xkfYS6twCGHZ4No2mftFEE7Eox4L3nqHvklFIA c6MQ+aEMs6/6Wb862UpAmiJ2RNSt1xqLTCqQTye20qbrleCWGWPCGRTNonBHa8QQXRP0 lzB/bDFZDPcgPE5JgJLHV3edcVfUkIbZkSNSRSQoY1Q/GWfx594G8r3JUzbsB0W9umJ3 UHSpVYhA/elaOGTxZOz9NXQZ+VEVLuU410WHn6E5oKbbNmPU0GyfXPgXatfUDnNQny6X 8PPv/vgh4mglgeuClq4qUjFINEyaosvFsvw5PhvGmqLUyK8lFE1gjEgkteoeuDIMNPf2 BIxQ== X-Gm-Message-State: APt69E26DH+18klLw4touThoIYdJ2Vrq7VxT5yE7fWOkjn9cizOYUXuQ 1bflyTwSGbqJ1tgIVEaEDScNbyX0WIfxZoHQh8+0aqA8l19zCixTfDkXGg08mN4WWhCWmR9la4K ClOivIn/EZfPJa2N3uvfP1AyRJm+J3SzT4t61YHw8z4QoIp2P3XOom/c6VqR2kSLZDg== X-Received: by 2002:a17:902:18a:: with SMTP id b10-v6mr20004672plb.62.1531125575164; Mon, 09 Jul 2018 01:39:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcsbUVsz2NxeaMziQZxE3Vhgkf4V+4I29jVasqPqaiHx2ptADWABpYma5byq49WbGQT/puZ X-Received: by 2002:a17:902:18a:: with SMTP id b10-v6mr20004632plb.62.1531125574495; Mon, 09 Jul 2018 01:39:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531125574; cv=none; d=google.com; s=arc-20160816; b=scFX4krHgbEkl9P5T4RLp2m/8OxO6YhUrz8BbXFLUUApQ6w3I8bICGipY190PtPpa6 FkQd8LRdziAxI2lyOITwqIG3FrmhKqvArdjvzY1yyWEVIBYFJuKKbrI5wV9LjjcGkerV O03ADWAmr15hwcWj8aTlHPfF71Ujcod/F6c+swbB8jKnOwA8xJ0c9DJIp2AwP6Re5XR/ VCYwOIUAD+N8xcmQ4zLrFfNffNfGrJ9474iK9KEC0vyn6sE6yEUBLStFaDR7FmtmshuC q4u8sy9SlK4mqKAYocyxoDBRR+dr01Gmf//jzUKeAkxl6EbxCrnLsDrJdOR8QisEMZaK VsCA== 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=R8blRo4hZLGF6t68Km8F6AP0zl8CaRfdZi6lbR/A6EU=; b=pxLd/AmLkGru58DNE3rN7AuYsed1cJulslUUbilq/IuSlmhB5jVjaFiJn2CFGpGdXh tRzrI0m4wCE/hsm2FtpJvG3RmjPYHH+Ntd3WBYlcb4RytD9AaxzZZ7qXuIyJEDY0CE5P yXdtnvYEtsMklLSHSvPTJfqiRtTXPmNdJiMJN/ML37cAI3cJ+kBCPLr4RcTjdmsJFpQE PFLC2SUZrE3ZfeMX2Tf88phemd4MwFh5RZoEJ7D70+fOhgFjwo2pjg+OKKqJQvu+DfX/ /cvCOlnE/4GLJb/iMZWCDav5WnpUbywkWllRJ1ZBroeWlXnoSvxYTnsjJcmKG5nkgaVq YgyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b="iXbHeI/P"; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.117 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-he1eur01on0117.outbound.protection.outlook.com. [104.47.0.117]) by mx.google.com with ESMTPS id t70-v6si13249282pgc.481.2018.07.09.01.39.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Jul 2018 01:39:34 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.117 as permitted sender) client-ip=104.47.0.117; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b="iXbHeI/P"; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.117 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=R8blRo4hZLGF6t68Km8F6AP0zl8CaRfdZi6lbR/A6EU=; b=iXbHeI/PdR9INSXoylUVpmGlY5YiclCugHRR6VebFtYNiIlNgCzARZHWvNoEStx9WgP4bSTQBFZ3AvdVdt9JN+fPf2Y+waOHyBLVKjJ4jg/yhwXtB63n0O9piJkOnapVl0DW7zeFmxxNF0J2ABA4CuACN7Z3cmBwvX1k2vrmVFE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (185.231.240.5) by AM5PR0801MB1329.eurprd08.prod.outlook.com (2603:10a6:203:1f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.19; Mon, 9 Jul 2018 08:39:28 +0000 Subject: [PATCH v9 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: Mon, 09 Jul 2018 11:39:25 +0300 Message-ID: <153112556556.4097.9697912712892217477.stgit@localhost.localdomain> In-Reply-To: <153112469064.4097.2581798353485457328.stgit@localhost.localdomain> References: <153112469064.4097.2581798353485457328.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: HE1PR0301CA0011.eurprd03.prod.outlook.com (2603:10a6:3:76::21) To AM5PR0801MB1329.eurprd08.prod.outlook.com (2603:10a6:203:1f::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ad662922-14f9-464c-ef01-08d5e5777d04 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:AM5PR0801MB1329; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1329; 3:i9B1KkiXYI6M3cPalOCLudI5D0iA2qZiNVM9S6jf+vdhsOh0e9I1yfYa5o53vid2PGjYKdw+2atAY7pv4M4VuMXWAKl80aI4ctqoO/KPqOZjKMwOM/KczX5UijufwJxvL0NU4rIY9uJ9iZhOEVYbwPjJ9xOaJW7OrWxCB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InDbaIvURLZ9Ty+ZjCdW8j55wzWgXtWEVB6O8WKR8SfDo2VNhlFx80C28fuYCXsQc9xJkECR9S1GFQZGLy/FNgWMhFVOSOHhhRhr4uLyB7pl3CT1XxBC1G/7ViAEpMot200KFSvLhs4uc+OfiA+EyF+zUBLhZvqR6v7CcBn403LEaUkKOWhVcCckGV6a5AkW; 4:MD44SmNT2F7ZOuRVJzH4HbccGFnMWQKTBAtsFz0+T0bbVVrbastcSalvn+yN3iU95x4XsQ+nHIAXswj60x7tQE3oiGFKz2eqQ36cc1FQxasaaTv6hmN0MD/dBLyDYnmhql2RrdApW/S+CkMie5Up2G7ln5WNeK4LvJR2BlAvR9YeUxDaC9JZ9IzXNvnkgb/WdrnV+yEFLjcrAYVfMXzKE3DSwAS0RLqwGi0iA+ovVjVkWNjAvLaWeJVKwy34uJYvjeUVbnqdSx8QoaZMLqbCjvImy73lsTj+TKu7whtzUY8uIf5eZKgOCkXq0E6A1OiNGgWB6Twf1ae3cLdxcFu7tkStk6pMeS6a9zns+2UzZ2wcfLF8DbseDS8OBhzTbz3g 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)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM5PR0801MB1329; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0801MB1329; X-Forefront-PRVS: 07283408BE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(39850400004)(396003)(376002)(366004)(346002)(136003)(189003)(199004)(476003)(305945005)(97736004)(55016002)(9686003)(486006)(956004)(86362001)(7736002)(103116003)(11346002)(53936002)(6666003)(230700001)(68736007)(2906002)(7416002)(5660300001)(6116002)(3846002)(316002)(33896004)(61506002)(7696005)(52116002)(2486003)(8676002)(81156014)(81166006)(8936002)(23676004)(50466002)(6506007)(386003)(58126008)(39060400002)(25786009)(26005)(186003)(16526019)(14444005)(105586002)(47776003)(478600001)(76176011)(106356001)(446003)(66066001)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1329; 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?MTtBTTVQUjA4MDFNQjEzMjk7MjM6bXl2bTBqSW5KK3crdm51K2g3VXBtZS9E?= =?utf-8?B?dVRhcEpDdjVkdVZMSGxRRSsrQkRCVnAvcURhWWdJNGZ5Y2UvLzRBemQ1bUdJ?= =?utf-8?B?K05CSElCQUtCVCs4bWx2eHJ5cmN1OXVkTkhMUW5HWkJ2L251RlE5YVRpUVhB?= =?utf-8?B?cTdlY0QwT2ttWHA0UitpT2VncEZ6TXBLYTRBRDRDRUJKQS9WQ2R5SUFoNEpx?= =?utf-8?B?RUloaTMxZmJndDV3VHFGdm95RkVrVUIvd0tqNGhCODU0T2VlMkRqVmQ3UytV?= =?utf-8?B?MzRXbkR4VUM3KzJDNVk2MDRYd3hDcm5hV3lXQjNKY3VTYnc1NUR3RmJGK0JL?= =?utf-8?B?UDFGdGxpd0pWdkNWWDlteVlrcGQ3TWdtR3ZrN016M2pMUS9HZCtFb1JOTkN0?= =?utf-8?B?alpPdG1XeVU1c3oyTGgrVlJMc2xVd3ZFRlNlOUVoNkJjcUV4WEkwL3pnbFFl?= =?utf-8?B?LzdUTG5jTFd6eDlTUUxJSjRBS3ZzSW1XYkhpK05XNnczejNxRW1sWGo0SG5Q?= =?utf-8?B?cDRjb0M3NXVRYlhxcnFldkd4VUNKSldUWXU3QjlaSzI0dnBtRj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KCL+kbtHDzA/V6jh5pj4yt0vvH2GzI5inm9mzE1FCd5xZb5bDJkxqgNIj0CSfZMTdoJjNIfmIhaFhcwISqsZSQbf1jPeRNUkELtVcWc31RhGIi83jJsm+B9t7sGkSJbcCipZ22nVGGgpUT9Mluz2vh56Hani0nhuVXYkjCWdHggCRqoAySJw66iZyw==; 5:K3BUbIHLlS19s2nM/MVVomUUdPnSCAYh4lBHTt2GWeTGuJ2IyfdzGbbNUgvpqxImhrBJVQei+csCHHZ5d0iDE/KLoO92Y5u12kR/KyA4Mo+0cxLh1JPUQ3xHF0TOfveHLjLQ3p2RyfKB7Khwyvdz2Z+BVXMH5q4rVMF7OPCbXV0=; 24:pPoj9B0ZUCoWpvzdOTKLdoafrjEpu6ddbOVQI0JmKEYoVdBzBpAIXCMbEPf6BV5MKjoPlDSLppXBElNe5+f2vC59n+1+w61sMlacxvdLxac= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1329; 7:R9l1vA9yEn+qnZ/Jb7UEWj3wZa4dt6hTnzeNH3W90lnAU8TPdBlKmjWc2ODx2fXWgmBhHfBQxBkCb/gYgVcV2l+k6enGlm8tsA3W35sQkhDHfInrC62BZwlVg5+9kl5bFMTZhxgrlFxGtGxiIhnVitzX8rdu+7qunug03+NFU6a3oXI6cM1++OCeUu+Ww7jvkQoXxM3N8H1hgv4B68Pg0beihXUvlhgFB6gdGAG7JIuJTfSTTyNDrXJxpyobs7WS; 20:nsLGHjZrLX1Wfbs1qbBE2EI15q8zqTqOpo6bRiQG2Ydh6IVqQlttRwBKKkR5Gs8TlZIgYW8b4RhbUPfEBosAsXxNENEuQdZAy8bw3amnvveNBpLipWqYiaWMOuLgPESDBYvCRgYW5ly6DAQJizOtv+2/tMLxC8OPkKbGIXfUgDo= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2018 08:39:28.1480 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad662922-14f9-464c-ef01-08d5e5777d04 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1329 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 7a04acfecd23..e931cb4a7bb9 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -318,6 +318,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); @@ -771,6 +776,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 cac30b4e9904..5a39fada3562 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.