Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6073822pxv; Thu, 29 Jul 2021 05:59:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpUaa4vw3EqBba1I0RGE7E5R7+eo8epoBLGL2rdYEbgAUZD1x4aKfGWBfYCv7gbQ/LG5UG X-Received: by 2002:a17:906:6dcb:: with SMTP id j11mr4437083ejt.202.1627563579592; Thu, 29 Jul 2021 05:59:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627563579; cv=none; d=google.com; s=arc-20160816; b=OQRwNtbISi7bT90j8R+xJaakaoHWoOSj0yZlXKvXvJdKiQbaeshEXDTItMhAH1P6Y2 sr9vc847pycS7U00p9mPFIeIO61otuPcrStNCaaW4HhC0C6SBA6FRpLZdZom1SsFZIOH r3y6tEtZGe4BHUxOhRs0g2O5rYhdDYJA408tRNUQilpJAa/yD7Wn0v9YRZVHth3jj0Qx bdbjKb6ky67kDVV+6ZMLfgUXYDeMgeoQGqruDS+6vsM/r2ImA0gMPZ+RAdH22mfQzNbl X1se2EvoIn4JC241U2GrXnFF7kjlGzKnrUh8m2TW36vMXygq7t6bjzWNWmRol3pFZaUB MXLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=FIU4tkzqyA0fHAn4h/P5+YYNLAtQKCT1Jb8Y2u5IzPI=; b=Ho8CETWBtJMhdEdH9tDWehdi28FQm81n8e8BsxqVTUiVk/0mO1338N4F4WJ589KRoq CAFw/zo7V15GBlCJesKUdhle2hMEHYWq3UYjGTwPYOUgKtNv6IOnd9+Vno5oCtTarbzT ESidxSrKqfsjZo3zXCGUaKwUE4eSKkOEvnPCYMh3AzWFi5fZOfPN89E13KBWbgBHqdvX Rjx/9MgqGHZjayU5V/32XxOOE82i0s3QWCu9vYpH1+3kOfLOYiOxNqHFe/yenqHIivF9 fVwIQuqji5zpt46ivIxDH521sw+azfDVHtQZw2eHK4Te9zVMYLUsYOgRU3P2JUuHnAGx rd6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi15si3011396edb.459.2021.07.29.05.59.16; Thu, 29 Jul 2021 05:59:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237307AbhG2M6A (ORCPT + 99 others); Thu, 29 Jul 2021 08:58:00 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:12331 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237203AbhG2M57 (ORCPT ); Thu, 29 Jul 2021 08:57:59 -0400 Received: from dggeme703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Gb9S56lmzz7yRF; Thu, 29 Jul 2021 20:53:09 +0800 (CST) Received: from huawei.com (10.175.124.27) by dggeme703-chm.china.huawei.com (10.1.199.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 29 Jul 2021 20:57:53 +0800 From: Miaohe Lin To: , , , CC: , , , , , , , , , Subject: [PATCH 1/5] mm, memcg: remove unused functions Date: Thu, 29 Jul 2021 20:57:51 +0800 Message-ID: <20210729125755.16871-2-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210729125755.16871-1-linmiaohe@huawei.com> References: <20210729125755.16871-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggeme703-chm.china.huawei.com (10.1.199.99) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 2d146aa3aa84 ("mm: memcontrol: switch to rstat"), last user of memcg_stat_item_in_bytes() is gone. And since commit fa40d1ee9f15 ("mm: vmscan: memcontrol: remove mem_cgroup_select_victim_node()"), only the declaration of mem_cgroup_select_victim_node() is remained here. Remove them. Signed-off-by: Miaohe Lin --- include/linux/memcontrol.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 7028d8e4a3d7..04437504444f 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -606,13 +606,6 @@ static inline bool PageMemcgKmem(struct page *page) return folio_memcg_kmem(page_folio(page)); } -static __always_inline bool memcg_stat_item_in_bytes(int idx) -{ - if (idx == MEMCG_PERCPU_B) - return true; - return vmstat_item_in_bytes(idx); -} - static inline bool mem_cgroup_is_root(struct mem_cgroup *memcg) { return (memcg == root_mem_cgroup); @@ -916,11 +909,6 @@ static inline bool mem_cgroup_online(struct mem_cgroup *memcg) return !!(memcg->css.flags & CSS_ONLINE); } -/* - * For memory reclaim. - */ -int mem_cgroup_select_victim_node(struct mem_cgroup *memcg); - void mem_cgroup_update_lru_size(struct lruvec *lruvec, enum lru_list lru, int zid, int nr_pages); -- 2.23.0