From nobody Sat Feb 7 06:14:44 2026 Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 424432E2F14 for ; Tue, 23 Dec 2025 04:42:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766464932; cv=none; b=YYTh45uvrn9VOZOW+kHUXSXIh3x/seMz4qiHp7NUA5/zf567+vhdNAbzLk/2zVPBPn/CGidK0AfBVJ/wU7S0isiXwR2C8cYlpafNQUq6o6B3Cl79wwCbMmHrdRvB48iqtzxXnaIoV8i8g6YSjc0x58A7bIkHV7CUv6l6DvLpE80= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766464932; c=relaxed/simple; bh=RKY+vl8rPsR4NnfoPUanyGtR538rJwTqB0ETYpg0s3o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CYckuuoJXXVj9/5zwEQOoOBRfzuotCqACE81ZwSGeLQekYAqXfUx0XftIgEN9fANq6BDzyEc8h4OP33CEbuTa+R6+YLksSiwFb6JghxLD/1wUw0RuC75m24RDgjLruG1AjPPM5XVkZ0vf0q/RjhOqli/9VgzC1b0bDL1WzdT2Wk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=oRcIN2aN; arc=none smtp.client-ip=91.218.175.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="oRcIN2aN" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1766464926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fzwkrJr5Ee6gFgNZqS18mPMFs5oUWCrwkGlHPOMuytI=; b=oRcIN2aNiVrw5bipf+iTkhfrXjB2Q+vYRDC73SskSWfHlwBi70UPP961b4FJ0K4oxn8UI0 P/Sx9f5xgS0jFVwvIGokK+P4Z2tLhI8Ga3MUWkY1uysq+jc7tKXfyh8t5nt1+vFbo8mVE9 VEF6iIWgtt2xWE76s0nYs1yGfz4I69Y= From: Roman Gushchin To: bpf@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: JP Kobryn , Alexei Starovoitov , Daniel Borkmann , Shakeel Butt , Michal Hocko , Johannes Weiner , Roman Gushchin , Michal Hocko Subject: [PATCH bpf-next v4 1/6] mm: declare memcg_page_state_output() in memcontrol.h Date: Mon, 22 Dec 2025 20:41:51 -0800 Message-ID: <20251223044156.208250-2-roman.gushchin@linux.dev> In-Reply-To: <20251223044156.208250-1-roman.gushchin@linux.dev> References: <20251223044156.208250-1-roman.gushchin@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" To use memcg_page_state_output() in bpf_memcontrol.c move the declaration from v1-specific memcontrol-v1.h to memcontrol.h. Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt --- include/linux/memcontrol.h | 6 ++++++ mm/memcontrol-v1.h | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 0651865a4564..7bef427d5a82 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -950,6 +950,7 @@ static inline void mod_memcg_page_state(struct page *pa= ge, } =20 unsigned long memcg_page_state(struct mem_cgroup *memcg, int idx); +unsigned long memcg_page_state_output(struct mem_cgroup *memcg, int item); unsigned long lruvec_page_state(struct lruvec *lruvec, enum node_stat_item= idx); unsigned long lruvec_page_state_local(struct lruvec *lruvec, enum node_stat_item idx); @@ -1373,6 +1374,11 @@ static inline unsigned long memcg_page_state(struct = mem_cgroup *memcg, int idx) return 0; } =20 +static inline unsigned long memcg_page_state_output(struct mem_cgroup *mem= cg, int item) +{ + return 0; +} + static inline unsigned long lruvec_page_state(struct lruvec *lruvec, enum node_stat_item idx) { diff --git a/mm/memcontrol-v1.h b/mm/memcontrol-v1.h index 6358464bb416..a304ad418cdf 100644 --- a/mm/memcontrol-v1.h +++ b/mm/memcontrol-v1.h @@ -27,7 +27,6 @@ unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, = bool swap); void drain_all_stock(struct mem_cgroup *root_memcg); =20 unsigned long memcg_events(struct mem_cgroup *memcg, int event); -unsigned long memcg_page_state_output(struct mem_cgroup *memcg, int item); int memory_stat_show(struct seq_file *m, void *v); =20 void mem_cgroup_id_get_many(struct mem_cgroup *memcg, unsigned int n); --=20 2.52.0