From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 AC7B3239E7E for ; Wed, 31 Dec 2025 14:14:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767190480; cv=none; b=j7m1CGjysYMHMB4IihZoUx5Gcu/VW0HcgSo2XpDca0ojV2UWUjTo/kSjL9+mPRuMMHzV5S4NcrBrnjiiqaKz1p5lE5OADIuBTdGWG/N2YTcXJwctWDibUfF9+0AyFW01vZlvieukDNvxbLbQpINwyvwSbmU0BZ7HqY5H7tgya1w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767190480; c=relaxed/simple; bh=pX8a16Xyxnwd09667g5i8D8Jk68h+Po6SvBUToVTuPk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mLqNam4Gn+ITIC8MJzOBlJ29ljj52pgypj+1Wtb8yRK1IlzYoJ8jMnakpg3XEPQRM6oim2aTaGeIUSHusQzZd/xtzXDyEk/8r3es3cqI+3Z3da7lkOodOiYfLvUZK2TRia7NY/AVw6hVPWYKvmgoySUILC69pF7hTz/U/PjSzcs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qnUpSf6N; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qnUpSf6N" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2FDDC113D0; Wed, 31 Dec 2025 14:14:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767190480; bh=pX8a16Xyxnwd09667g5i8D8Jk68h+Po6SvBUToVTuPk=; h=From:To:Cc:Subject:Date:From; b=qnUpSf6NSJ9QmGEjKT7EZxzaP0zUEM3BTOjIL/3n82Rd8xhzij0C/QQUwjR3zMoHI OmeWE8KYcpc/wvdl/z/F3Z3kX8q4395eKhdBZu2TUD0aBJMra1RJt56guWIBzNbdsy QoxVwcf54HG/Vtqwgr6FGEr0yT/jLlaE8Qgtgiv0MU6VoEEcBS68wzWm5x/rReK9+p g5QMQtIH+rLEAHVaIbYkCUHVujvQezzTmpkGoXjS2E3j1xhGxfBCLZpKT3eEu6bgiJ q4urteCp/GE+36A2fXwMKJBYbTcucHMPZtMZh18tu/Ba564UQkfzk2/HNzNEkbFeQv unCN4O9L4RaMg== From: Puranjay Mohan To: bpf@vger.kernel.org Cc: Puranjay Mohan , Puranjay Mohan , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Martin KaFai Lau , Eduard Zingerman , Kumar Kartikeya Dwivedi , kernel-team@meta.com Subject: [PATCH bpf-next v2 0/2] memcg accounting for BPF arena Date: Wed, 31 Dec 2025 06:14:31 -0800 Message-ID: <20251231141434.3416822-1-puranjay@kernel.org> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit v1: https://lore.kernel.org/all/20251230153006.1347742-1-puranjay@kernel.org/ Changes in v1->v2: - Return both pointers through arguments from bpf_map_memcg_enter and make it return void. (Alexei) - Add memcg accounting in arena_free_worker (AI) This set adds memcg accounting logic into arena kfuncs and other places that do allocations in arena.c. Puranjay Mohan (2): bpf: syscall: Introduce memcg enter/exit helpers bpf: arena: Reintroduce memcg accounting include/linux/bpf.h | 15 +++++++++++++ kernel/bpf/arena.c | 44 +++++++++++++++++++++++++++++++----- kernel/bpf/range_tree.c | 5 +++-- kernel/bpf/syscall.c | 50 +++++++++++++++++++++-------------------- 4 files changed, 83 insertions(+), 31 deletions(-) base-commit: ccaa6d2c9635a8db06a494d67ef123b56b967a78 -- 2.47.3