From patchwork Mon Jun 18 09:46:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 10470559 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 8E383600CC for ; Mon, 18 Jun 2018 09:47:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BDAD28474 for ; Mon, 18 Jun 2018 09:47:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 701B92899F; Mon, 18 Jun 2018 09:47:03 +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 D35E828474 for ; Mon, 18 Jun 2018 09:47:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DC3FD6B0274; Mon, 18 Jun 2018 05:47:01 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D73426B0275; Mon, 18 Jun 2018 05:47:01 -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 C152D6B0276; Mon, 18 Jun 2018 05:47:01 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg0-f69.google.com (mail-pg0-f69.google.com [74.125.83.69]) by kanga.kvack.org (Postfix) with ESMTP id 812BF6B0274 for ; Mon, 18 Jun 2018 05:47:01 -0400 (EDT) Received: by mail-pg0-f69.google.com with SMTP id g5-v6so5001369pgv.12 for ; Mon, 18 Jun 2018 02:47:01 -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=nkM6HJZriRD5llvcLxaGa/KX3m1UjFJPmBp/NjAzqvY=; b=FGEI5CI1j2vtT3bEwTFuuqBl6O1UtFEJ+aN9rTN0ObXP9VbVJijxI1lI1piJ/9Tixn gsRcr7aiWMyRVqeJk3zXpBubpPrd0I9YYbNcEtsWaTn72Niw2RGfE7JRZB8Oxqh/uYtB 0kSJQRonrU0pEjTV+cPh/+Dr4De91U2Omnk4Apat92y7EvMqWGPRjTVl8Gcs1oAwsiap lqcnjFTGdDr5MDbSrKF+kK8W0Ah58xhClG1DVSjSuVesfRgdnaSBoYzIHp05uCzzR6PW auQrDTJ3+avaoaeSuBvA+c7eiPGbDYczwpzcOLFfUimAlS/qFqIq2SidGHE/EeuVtcpC Z/EQ== X-Gm-Message-State: APt69E0MSg3FSqJR+2WX/6gmE+Pg6s3PsfanRnEobzfOJLC3BWp+xq18 eFwdu07Srnn+qEMsduDkbr/t0Jy+qkvLYiy6OtXw+faQmWd0hv2sptzT597pAs+k6L9kL0DZJFO h4JnDi9JTdL0QwUDgHk3MbxeK+/dxhMnr66w8j7Z9YZXzY1Wy3TH5qD4imSO7WiLRNw== X-Received: by 2002:a65:6047:: with SMTP id b7-v6mr10399716pgv.241.1529315221218; Mon, 18 Jun 2018 02:47:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI9pIlF/UxN4Xk4vr8AoouvCGo+6nhsxsziua6cLLRuEJkKgm5c8LLRhE7B0ztMu9+IXic5 X-Received: by 2002:a65:6047:: with SMTP id b7-v6mr10399673pgv.241.1529315220505; Mon, 18 Jun 2018 02:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529315220; cv=none; d=google.com; s=arc-20160816; b=PIZ338RjI1q7/KEbevd29TKo1sXq9E4dX25csxqeo1TMPk6dZM8LfMaps3C57Bah+n +IQcL8onwarOaiiCzOlFR2NOtgFbM0UYxBQ0ocm83w8BI45RuNrXbtHIw+59ffEB8+XH OvTPlTxdZhI/wARjdKkeTRX4H2WZaLjLF2T128jCh+ukW+7h2xcmf9aBkKcXN+rRAHfM aR7KqW3uaZ9+gpmaIupDuoNsOQcuuS7v2uC5C3T0+1lFIJxQZBIm/F0Ln26FzS2hv+ZQ RsrclO6ZrmOH5I5wgnuSNLcjzXFtZjSYmmr+KPtQ2q5fpVUoTDaI1OAJ1a17FNieFDDj edRw== 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=nkM6HJZriRD5llvcLxaGa/KX3m1UjFJPmBp/NjAzqvY=; b=eGsr7MROPqxKUcKdbV0MetE5L72+DMLIIVRFSuIjrnWDf36FFBtEui4fMNVxqUGU/V A+zXSmKRuE2d7fMXVUP+nPs7FSfF15lzdYz1lMc4aIBbNSTa+cQ34oNqQOaQxg+DMsV8 VTZNkLvfKW1/1nWpLwC0jQNuoLmalH7K30WrHLN38bbe6AWZ8BZTamsQUH1ACSUMGGF2 GxeOxXfgRPVfrA2jgrmSTosXaCPyygvqDi9sRh158iR8Nr9Y+fsJuL/jSUXfYdNWzDHI VyMFMmmLosX+V1mBIlu11PW+NYki6BVmXK+FqluNih70Xc/9pBBflO9sZLV5SHIn6rAG NHhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=Uaop2ZVU; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.110 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-he1eur01on0110.outbound.protection.outlook.com. [104.47.0.110]) by mx.google.com with ESMTPS id a10-v6si14883437pls.480.2018.06.18.02.46.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jun 2018 02:47:00 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.110 as permitted sender) client-ip=104.47.0.110; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=Uaop2ZVU; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.0.110 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=nkM6HJZriRD5llvcLxaGa/KX3m1UjFJPmBp/NjAzqvY=; b=Uaop2ZVUnUNt2lvwaQxBNN72sNJei1EWVf/8W8qj/DIKBsZtqhxpOXXzBjOThhTnGRj3ixImmRnrNhrXzBNSw+JaLR5oKBr7d2yNmFp2J2D8keqAfvHJ1BqxfsQ59oYR06CVHreHGqQoZ6dtFWJjJgXUtb0X6gzNZ0V0WJLkH6U= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (195.214.232.6) by DB6PR0801MB1333.eurprd08.prod.outlook.com (2603:10a6:4:a::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.14; Mon, 18 Jun 2018 09:46:54 +0000 Subject: [PATCH v7 REBASED 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 Date: Mon, 18 Jun 2018 12:46:50 +0300 Message-ID: <152931521067.28457.1399177856448274667.stgit@localhost.localdomain> In-Reply-To: <152931506756.28457.5620076974981468927.stgit@localhost.localdomain> References: <152931506756.28457.5620076974981468927.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR0701CA0070.eurprd07.prod.outlook.com (2603:10a6:3:64::14) To DB6PR0801MB1333.eurprd08.prod.outlook.com (2603:10a6:4:a::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6de9c5b3-bd89-4f5a-1aca-08d5d5006dc3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:DB6PR0801MB1333; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1333; 3:A6Qz1ZnPkYxlob0N5T71EY7tSTXE+2K34oR5vhNql2ag8N/6/W84cy+8u21KlSyoz11JvX+Jb2vbl+ksOaweLoVrZ/W0S1Ch3lutp6vLG/tOSBBbIPcskAyBGuR9CWDxaoCioB8K54dC0PDo1HOQMkf68Y0H2xVc8ri07T+BNSBM4aO7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3CuRETmkSflIDfzeZKUwKshJxd7YxPoW0G9ha6cI2QlF2KacTMjTMQ9rmMmC02WFtaxTIFuNFlHq0UuVIngJelR7pp9g0h877iVQxF5Xw6+WBUmGq9YRECJYJvQtHBYxjjm/TX9hqF43sDckm7/TmoD47mSFWQf/lgV4Gedvjy6eJ3zLGT3Zb16f3EHH4; 4:ErUDxvq4AO+1Q02Y33GqYZz1oEF/xKhkteJVMamzU5+4YC0S4GJBvV7qTcxHT2bhIzOYL6Xg+UjA0peAN53oeOMwZHau2mDXSu8uG/204Z9mdMktQhkpPHTAhlyrPHRsVgyDrrm+JAnaJRG3npiCa4ws867yjGIURf2DyO72MOT3ZSt+YFFgcFT5OLmWRpvt9UDpKtC2l6GczIF5RhZA0viVM9vHAwkoGe7KxVRoNjOnlwNudz70FYF/6N/vMawHJomlgLkEeRncvEUKHe0swlZ3LwhbD0+CjN3QmMRRaRrCnGviviqpPwG+VlOwaqnj5iumfC+PvA7pm3WjBRWpi9og77EUHrgHkuRX9di+SGkulutavY+E1hy47GzWoWnz 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)(10201501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:DB6PR0801MB1333; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0801MB1333; X-Forefront-PRVS: 0707248B64 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(366004)(396003)(39840400004)(376002)(346002)(39380400002)(199004)(189003)(55236004)(26005)(7416002)(305945005)(97736004)(47776003)(66066001)(53936002)(25786009)(478600001)(8936002)(5660300001)(8676002)(9686003)(6666003)(59450400001)(6506007)(2906002)(386003)(103116003)(230700001)(16526019)(7736002)(186003)(6636002)(81156014)(81166006)(61506002)(33896004)(486006)(316002)(6116002)(68736007)(58126008)(76176011)(39060400002)(23676004)(55016002)(476003)(50466002)(52116002)(86362001)(2486003)(105586002)(3846002)(106356001)(956004)(446003)(11346002)(7696005)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0801MB1333; 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?MTtEQjZQUjA4MDFNQjEzMzM7MjM6R0ZaR2JMTmRWa0U4azZDdys2enFSbUky?= =?utf-8?B?QVVKejR6WGxFVUU5Um8yMDh6UGEraGNsTmNrVDZISXdvWVVFTWJkZzVWa1Rm?= =?utf-8?B?YzFwYzBlczRWODFnUTVXc2tFS2JOWDJRMk5ERUJNTHV6S3Q2WERqMjNubmow?= =?utf-8?B?Q01VY2w2UEt4WEV6NXRXYkoyOFhFbDBhVFVPUjlDK0EyK1JiaWwyTERSc1U2?= =?utf-8?B?cFgvdmh0dld0c1Vqb3ZUeTJRRWdGWEYzWmpoRlhUcjZ4Q0g2Q2c1SGNmRUF3?= =?utf-8?B?ZWN5OHJTaUJQNytiUzNuWVRvRVJIMXJLcVdVbTdNRTVxTVVDYm9jbUtMakdo?= =?utf-8?B?bk44eDBzRUd5dURVSGdCK3lHVE8xbVUrcGNxR0dtMFRncnFTVWZWRzZDa0c4?= =?utf-8?B?UW5kMDRpWHVmT2tnSDl6TzM5V0svUVJDNjhsa2s1cElmV1J6SWVhSjI5WTVR?= =?utf-8?B?dkVWOE5zOHhtU3ArTU9iVlVKZ0hPbU1rd1JOb2JhKzcxaU9vNGZVd3JOMXQ5?= =?utf-8?B?RmJERXV5MnU4cTUyYkdXd0ZiWWdrYTFvRGVySWhSaWx5bWV0MEtsd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yv2eY7rJJ62hswOFnZ79/JFenEmxY5rU0EUxhD2X5O8I6r4TfHOkUe2Ii6ADO35NmHaBV67Ja61rLZt4mCGYfftOi577WrTzsYE7umIXEt1eqBjgYd4ZcoAdVdVmPcyGUA8AkUmbwGYmOINZDoRMQXOAUP+8qqiJ+cxoANv/xJoEoG4JWcqxqrZ9OSrHp79F4md+MCSx1eDF8/PSM06a/4J6UdIMNS9oBf0Eq4ONytDzBk6RCAyivq6IOoZvQJ4xQ==; 5:/wsBvYBXRe/7PZaWWAmDzQPGVr7pLa2Uz0LTah9T7NfalWg2W/2LnjDoChuHQuGeALEAXuRL5cnRTTKkRvB5luD4KQ4jaPq1C5KramnAA+ldcyUDA5YA/wNivpIDF11ernHxAeQW3o1xzNkVugZ8OzYxKT1KW7VMyJKtwilS7NM=; 24:ZGJ7BZ+8Mh3UrKIFpSjYVjrslGTMeZYH0ksF/5AR2UiFYAyxe6dIXScQMJdqj0mRIh2f3NXop479ccXjrfzMW0/L2yv+mK25gtG+UECe+XI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1333; 7:7zSbX6GHrxHtDwDgQTZTf86NrKrtvFD5kT1aDvoRsBFs11CBidz/VzP4ZPJ8lUg/muqKqtqz0vvpoy/SUSImv3GcMPKgkruaSXPVeXrhbKzzyGA8FgtIoqXMOrqgyPzIp0sd3loLsV8OSXQFgEW/ok6mEf29o/LuClEvbuSd9NxwVJUwaQDSMErV7DES1TGF2AteoyusN9mkD4pyaLUU/tfxjtScdvJST+Yj/zcylVISnFNl7dFerOILGJ4oXOqm; 20:qoKUEONLmSxtxnVlj88zOTXbRCZ/LTl/Ge7H6qytwkkbwUXhO2j511m0Igec/h599DFfxhgMe5mZWsFbFiIYPhQtmc3RSeN4qhksiR/XRF5xgWeFbCo+pSyFMse12L72aAMh/Hz6TgiQieEUO4Y7wilykryYA0wBfefILKnCjCU= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2018 09:46:54.1326 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6de9c5b3-bd89-4f5a-1aca-08d5d5006dc3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1333 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 40401a73000e..7ef004c4f4af 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 2b703c4130bb..a122572c0219 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.