All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mahe Tardy <mahe.tardy@gmail.com>
To: bpf@vger.kernel.org
Cc: Andrii Nakryiko <andrii@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Ihor Solodrai <ihor.solodrai@linux.dev>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	Jiri Olsa <jolsa@kernel.org>,
	Emil Tsalapatis <emil@etsalapatis.com>,
	linux-kernel@vger.kernel.org,
	John Fastabend <john.fastabend@gmail.com>,
	Mahe Tardy <mahe.tardy@gmail.com>
Subject: [PATCH bpf-next v2 0/3] bpf: account for local storage map elements memory
Date: Mon, 30 Nov 2026 20:14:01 +0000	[thread overview]
Message-ID: <20261130201404.80321-1-mahe.tardy@gmail.com> (raw)

We started using task local storage within Tetragon and realized memlock
omitted the memory used by map entries[^1] which is significant in our
use case, this aims at making the memory usage more accurate.

v2 changes:
- use map->elem_count instead of walking the elements (alexei)

Link to v1: https://lore.kernel.org/bpf/20261126131318.470837-1-mahe.tardy@gmail.com/

[^1]: https://github.com/cilium/tetragon/issues/6139

Mahe Tardy (3):
  bpf: reuse local storage map link and unlink helpers
  bpf: account for local storage map elements memory
  selftests/bpf: test task storage memory accounting

 kernel/bpf/bpf_local_storage.c                | 41 ++++++++-----
 .../bpf/prog_tests/task_local_storage.c       | 61 +++++++++++++++++++
 2 files changed, 87 insertions(+), 15 deletions(-)

--
2.43.0


             reply	other threads:[~2026-11-30 20:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 20:14 Mahe Tardy [this message]
2026-11-30 20:14 ` [PATCH bpf-next v2 1/3] bpf: reuse local storage map link and unlink helpers Mahe Tardy
2026-11-30 20:14 ` [PATCH bpf-next v2 2/3] bpf: account for local storage map elements memory Mahe Tardy
2026-11-30 20:14 ` [PATCH bpf-next v2 3/3] selftests/bpf: test task storage memory accounting Mahe Tardy
2026-12-01  3:10 ` [PATCH bpf-next v2 0/3] bpf: account for local storage map elements memory patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261130201404.80321-1-mahe.tardy@gmail.com \
    --to=mahe.tardy@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.