From patchwork Fri May 18 08:43:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10408791 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 07AC660230 for ; Fri, 18 May 2018 08:44:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E90AF28462 for ; Fri, 18 May 2018 08:44:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA584288B9; Fri, 18 May 2018 08:44:01 +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 3931028462 for ; Fri, 18 May 2018 08:44:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A4E126B05B8; Fri, 18 May 2018 04:43:59 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A24806B05B9; Fri, 18 May 2018 04:43:59 -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 915576B05BA; Fri, 18 May 2018 04:43:59 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f69.google.com (mail-pl0-f69.google.com [209.85.160.69]) by kanga.kvack.org (Postfix) with ESMTP id 4FFD36B05B8 for ; Fri, 18 May 2018 04:43:59 -0400 (EDT) Received: by mail-pl0-f69.google.com with SMTP id 72-v6so4650858pld.19 for ; Fri, 18 May 2018 01:43:59 -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=uxM+MuKsncHLvMgjLIDaE3C6FBknMx7nO0q2o3vjlYc=; b=XAdn74fHxJt1H2CMh7leQ2P500/fV/LzEnGeha1lnE3+P/+ZVX9DembgrbXH8U3zMl xPWBnpBuHxAc6G7QJfahNC8RdO3B52jhIyQkjvbxoRraixhg3eSS7eVnTQFie2oSxqxJ +LfhKo6vaMJHFXTCU4hv7XhJ02A3Q4S6LljyEAWLMb3JreQXAsmh295u1SQUZZJbmB+e XSq34hfNKKh+sSZI/ApoVWYgjcvzaltdTkwlW85J8UHYp80yvMjXQzuyPG4+NjlWcxvt oWTs/X+/B+/50u7iI7ra6+BpjvYr6hHD/Wi4tP2ts80tyJWGp8uWNa4uti1xqpAZvxQ+ nocA== X-Gm-Message-State: ALKqPwfQy3v3is2sOk3q5XZyrhv19IMGQ0ulVCAFOJiSxopEXU31wAwc /g5u+l4Y9nHLyy+tISIS6BL1l6kNphQdcjitFSH0pRl+D2fMXlB55jnF+coHzPxYgeuwnpxdd1P qI2qnlxwaE5/8x3DEVj4IT13b2SyxEL0FuAZZcXsVUGvWxW0tK9hv0NcZkCTdagSUJw== X-Received: by 2002:a17:902:d886:: with SMTP id b6-v6mr8633482plz.361.1526633039034; Fri, 18 May 2018 01:43:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoPiasmTVWlC8QWM5yb2SapAsK2M+0Jyc9gbogYP7hXeGcDtgoLMEmPj6+m5ggHdlc40VdW X-Received: by 2002:a17:902:d886:: with SMTP id b6-v6mr8633453plz.361.1526633038438; Fri, 18 May 2018 01:43:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526633038; cv=none; d=google.com; s=arc-20160816; b=NzA9iO/EiXQMzbRsAdvFydvZiKtkZcNre8NqOykibL7iT9FjO4Vnsiuqx+HMNtZZO1 O+TzN1EPG7mhVOVf89SVTzobMsSE9X6/KGnsxIZhaWj4Zyh7LBrx5tJpUB5br55F/vEs L2VxN4gb/VhFT8QCiZjrvGLgWCviBv9nJ5M5O9oomayzTN1otsGGVPWcXQaDWocM4qCN 6MJea+Dbg1zoMxnqBVC7/EkkR48I/XoyJem3BSnoB90G8VhrRaXhlKAmwus7cA2K98EN zqG1oZn7WEstPAuVEXtUShxI7InDqfQGn7UU4ztFMKMLHu+wBU2Txq2qVq5uoKPk7/R2 UwbA== 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=uxM+MuKsncHLvMgjLIDaE3C6FBknMx7nO0q2o3vjlYc=; b=ANZ8zBP8zTBgv171jMGUvbTlrKWpJfsNEy49n/2QH7QyJsnvSbeW1ZdmHoMmmMRLok 61ZRc1bLlKbKRcQjKkRGtfcn6bjmTncSx6FHyP/U7rJYd6T+qiLzK0VwLFAkYR625HV3 UqoyxliKnSOzze6cHq2LzmxHHgRTABGEtNeJer3BdrZiVjByzywA62ynkJu5upZNey1s iQHVHMxB32ObbOH4Aoz5D6MMYgmavuKPCx9LR3X0OH1ovskVbSRn4qGNFANg0PYfhOKA 61HHhFa8/K5dLkMdTu6s+a0NSvnRajXQGDCQ+ECFJU45KfW9wD4G2agqGf3QN7Oc9tB6 5kXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=HRyv12PY; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.1.136 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-ve1eur01on0136.outbound.protection.outlook.com. [104.47.1.136]) by mx.google.com with ESMTPS id g92-v6si7111679plg.342.2018.05.18.01.43.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 May 2018 01:43:58 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.1.136 as permitted sender) client-ip=104.47.1.136; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=HRyv12PY; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.1.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=uxM+MuKsncHLvMgjLIDaE3C6FBknMx7nO0q2o3vjlYc=; b=HRyv12PY7kHl0xfLr016iCrpDSJKqgEawPVg6qiYbY9QmtAa1PVnNc8yFjVhSpBbVXkcYXNWmThcPWMT/a9xNZEZS45iNAS3jeAZE2N7h8r4QjRuZ02ai613G7SvrYgq6a16bt6aN55Vkq5L+l8HvuXvIfaCQe8mLdJX4YuhuvM= Received: from localhost.localdomain (195.214.232.6) 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_CBC_SHA384_P256) id 15.20.776.11; Fri, 18 May 2018 08:43:55 +0000 Subject: [PATCH v6 13/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: Fri, 18 May 2018 11:43:53 +0300 Message-ID: <152663303322.5308.13190345531934617119.stgit@localhost.localdomain> In-Reply-To: <152663268383.5308.8660992135988724014.stgit@localhost.localdomain> References: <152663268383.5308.8660992135988724014.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR0902CA0023.eurprd09.prod.outlook.com (2603:10a6:3:e5::33) To HE1PR0801MB1339.eurprd08.prod.outlook.com (2603:10a6:3:3a::7) 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:HE1PR0801MB1339; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1339; 3:bkqhaNYQRN+Lmo8YpwBHT6D3mjwg16yF2egGKbfBwZY/9tfNZvvumtua0ep8xWYFBNd8GnMNSYYEfy9RfiPY1A5B07rSgBZvOAokLdv8nMiQBjJfg5GuKHWHtVxPeTswOmS/QgsA9ELH6r4EmY6tjkRzhSOUo17+b422NzaG9mfi3KFf4QPlFWYOQPN0bvMZ7PffGzXFViHuAmLVvBj1cueDF3fWvoJ5AUuUbBZpXsCzrf3ufSQ07h1n2FEtwfVs; 25:qKYyyTtT76zPwcrP2ngJHxGM7HDsjxx1fJlxuKzUV1XqjqFpFqTP6jTsj9x9MPYTYmyjZAUT4HHozWrrQLOrpm69TlzKHU67rw68+NdPqN8lPIIG0x7cyRHR5YelVgdPghvxLUl8q1vGb+5YJUVinlkP7f6pquTmcyA4gixhMez9ogVeCJvOFZqDYjlbhAx+Awz65gvyOh2z/jaZX0/zuUR2HHW9LrxUo2uOuzPBdN9uXtuZcJUPGfzM0Lgl3T42oDIm/Ij0QDOSPk/FwqBBg+/7aipM/ufXmx2IL/rh616/6K4BS4IbUgvdlO3rZg7ZSkM64bnBmO3fFskcxDHL7w==; 31:zN1ZGJ9iXKucCosoAzKIIq67aaQL3VsXYbAf6ACv9wW0CyyZKXdci0D9mI+g7Eo4Cn4Fa00J98y/QlXoVHZcOZlGsZBTBcwU8g4icozA2igRqkquKqWO0GT1ZdVpDdiVTS0A/mbRU9mKcqLg1ZUCm6Sw1D9p/FgcN/vUDrOXA32KnF7MC197Qr1jqSlR/Kol8o3g/9KSEQHSrH4n1C8HQsev3JZRAxNNTd9MMQoxFJY= X-MS-TrafficTypeDiagnostic: HE1PR0801MB1339: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1339; 20:h0UvoQV5dAEeZ5l3gqhZxjFZk9jljx8azMcY0x8fAG0H+Il1345eTJ2EzrcyfkwYfVAdqtPOMkHK/qPd8v/UXNOAcncNx9q5fMU2PpUd7MKP2+GcL/P/RMYXBOxY1T75tywfCvzgUV4x/4MFShPz29Ldnr4NKEk3BnpKh2hP/yL+fF3C6IsHzy7cvMDDqLEbM61xjGNinzFpQt4LbUyLu0vbAtdguvtuLg3J6K/yN8Ec+6ctJQDhDZlewZIsGDmf1Yu4sqXwOoi5id6hJPEQLVwmZ8tgPFn/ylAFyb1P/q7ynXbh0o7mYl2Qx1KkuSgKCuzDo9BASj+ohvOiv3nmbT0KYAgSZQ4+WJgsGuifbwhjpsF+zE1UTrrQK3a1sN/Um9kMifhWKMgvGOvWuZ3qQuHBXqVgm6aRvUB0c3W2jJU0253hhTz6ghUERjln2FDLGtgDxjnj8ChL5M3ZACq1rLzKn1J9X2KgBQQD7do20kdwcxBkTtc5Sv6iXMdpuZw7; 4:tTECdSkztBIPOpKZlNf0kybWtNMXmAApyafO3I0NvsTWLKA6BiRwzS1xkAW3SxjnXeOec7YsDyvI8uoFnwwzNmuKJIXYjhcqDqpxTwbQ8PT877L6lLEFZ8EeBs0OtZgL9EffM5pIJwVUz6HqgG6JR3VGZzkfBcAD8/khvdOxWTFzKwb4hhtdYiS918BCh0NdUfQNdbqJT77IGZEzYHKAq8rp71IZvc/UeileUJQ/tjb1DWoyzxLRLMhgULGHJQ3ANcbOQ5szkYcvzcoO7Y8Itw== 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)(3002001)(10201501046)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:HE1PR0801MB1339; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0801MB1339; X-Forefront-PRVS: 0676F530A9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(366004)(346002)(376002)(39850400004)(396003)(39380400002)(189003)(199004)(230700001)(97736004)(386003)(6636002)(6506007)(316002)(58126008)(16526019)(103116003)(7416002)(5660300001)(186003)(105586002)(106356001)(52116002)(7696005)(2906002)(55236004)(8676002)(81166006)(81156014)(68736007)(47776003)(575784001)(53936002)(8936002)(86362001)(76176011)(59450400001)(39060400002)(25786009)(23676004)(33896004)(7736002)(26005)(478600001)(66066001)(2486003)(956004)(446003)(476003)(50466002)(486006)(55016002)(305945005)(61506002)(3846002)(6116002)(9686003)(11346002)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0801MB1339; 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?MTtIRTFQUjA4MDFNQjEzMzk7MjM6NXNSZlNEcmY5SUpvbG5TR3dzWXFCS1R4?= =?utf-8?B?dDB5ZnlOUUttcHNpa3A0V1dCLzBLdkJOUkQ0MktDT25rSGgveGIwdTAyR3I1?= =?utf-8?B?OFRpalU1bnl2eG5ka2x0aUFPdWlOWVpOeG9UUXJjUktvL1V3ekVla2FQZUF2?= =?utf-8?B?UCtJck9aaG1uemRjZ05qcDFMOWlyNHJ2SHhDVHkvemxIY3NUMXFJQzF3TVpq?= =?utf-8?B?S1hrYytSVEVCOExPSmdEcXNSaWtiRUprRmp0dy93RDhKbUJ6V21na2pSZG9t?= =?utf-8?B?NXFLL1NaYXhrbTQ5UXdOOURNcER6ajBrdVhXVEI0TXpEVjU2RGZqUXhnZDZN?= =?utf-8?B?Z1plbG5lOXNOdEhvODdWZVJMdTZJaEhJdjBGaWlZeDNuYTZzbWdSWFlnWWs0?= =?utf-8?B?QnQvcHNUV3R4VWJOMm9wTmNTbDZZWHA1eG80Y0hOQTFYcUpTU29Vd3F0eG9i?= =?utf-8?B?S0tLTWhBQWNGL3ZDU0F1cy9MZWtNWk1YYnAvVktaeTRUZXNZK29lYnBGRUZx?= =?utf-8?B?TnNlOWNJbTlueUhQWjZsTU40b1RNblFqTDhrVnI2SXo4TGtQSWdZekJBRVlJ?= =?utf-8?B?RFEwQm40emtjRS8yb1VlSVRTaTB2U0ZJeEhCZis5a1lzV0ZnbVVzdFJhbWF5?= =?utf-8?B?ald6QUtMMEdFenVTV05hNC9XektxdUxya3I5dWYySHNPQ2lTMDExM3F0VXNz?= =?utf-8?B?Z3BUUk9ZaE5ZdW5oTXp4OHRQaU9hanY0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aHttt23w86GvuiX/7aJDO2yrQ9HSqotdcOtAbWumzzEROeoHza7f6SWhnUlfYPxhbO+TeAd6fEs=; 24:LlaganAsmYO36FKJdOvLTNx9n+MtE21OR9f5tA27pUoN4DIpMtgMNeEmQQm/diDg7fZs/406ukq3WREkh3jOBR8NdtSFpiAk6XLRcjmDZrg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1339; 7:XJ9jJCCTUZ7X6JuoT475JV0L/n+ilLg4GQPcqVDSlWnwhIhmU21Y/eqVp7wbZDA/q8t5nCTkvm/HEGkZoQlX0veoiCgfvLKV762Vn+7lTyRjXzIclRWrMNjaogE9CFBY91FFJU346qL684iFEsoOMvYmX83JSXD6BKG+cCxk6jZ+4iILlfKpdAnEcGnuRVUQeJarrUSoN/YbGGF2sF0lRUNmLSlpxAjzVuu2XT8uP3BksO4/bvbT2MaL1GWX1sEV; 20:anKdVEqXqxlVBPr9yQ7t1FbA026ziv+8OP8CC7QO6bDyw0zoQNUWyzyCKhMbiJAc/PKfj/MZalvHL91By/Mn4/witL7o7nYUXrCIob7QZ/QYwP/e87LKKJKvqVDf/CO6fdbh9B42uksR/xifFfMZVKh3fZXCdYxErlB5LuNZWWM= X-MS-Office365-Filtering-Correlation-Id: 8b4e9ada-99b7-4d6c-8558-08d5bc9b7ddc X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2018 08:43:55.1912 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8b4e9ada-99b7-4d6c-8558-08d5bc9b7ddc 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 --- 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 7ae1b94becf3..cd44c1fac22b 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 false; +} + static inline bool mem_cgroup_disabled(void) { return true; diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 8afabac77b86..bbcb3d2c0a50 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.