All of lore.kernel.org
 help / color / mirror / Atom feed
From: JP Kobryn <jp.kobryn@linux.dev>
To: Tejun Heo <tj@kernel.org>
Cc: "Ziyang Men" <ziyang.meme@gmail.com>,
	"Jens Axboe" <axboe@kernel.dk>,
	"Josef Bacik" <josef@toxicpanda.com>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"Eduard Zingerman" <eddyz87@gmail.com>,
	"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>,
	"Shuah Khan" <shuah@kernel.org>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Koutný" <mkoutny@suse.com>,
	"Roman Gushchin" <roman.gushchin@linux.dev>,
	"Shakeel Butt" <shakeel.butt@linux.dev>,
	"Mykola Lysenko" <mykolal@meta.com>,
	kernel-team@meta.com, linux-block@vger.kernel.org,
	bpf@vger.kernel.org, cgroups@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] block: add BPF kfuncs to read blkcg io.stat
Date: Tue, 11 Aug 2026 15:07:15 -0700	[thread overview]
Message-ID: <c9fe7691-d808-4363-a826-14ac8a9bd575@linux.dev> (raw)
In-Reply-To: <antT1wtJEZ02CDx1@slm.duckdns.org>

On 8/11/26 9:54 AM, Tejun Heo wrote:
> Hello,
> 
> On Mon, Aug 10, 2026 at 05:17:26PM -0700, JP Kobryn wrote:
> ...
>> The get/put kfuncs above use KF_ACQUIRE/RELEASE so the verifier can
>> reject memcg access after the put. Replacing them with a generic API
>> would call for tracking a new lifetime relationship between the css and
>> memcg (or other derived) pointer.
> 
> So, if you need css -> memcg casting, I think that can just be RCU
> protected. In fact, even for the iteration and access, RCU protection
> probably makes more sense then KF_ACQUIRE/RELEASE. It's simpler and less
> overhead especially given that most bpf progs that people care about are
> non-sleepable and already in RCU critical section anyway.
> 
It's just that if flushing is involved, the cond_resched() within
css_rstat_flush() would preclude RCU.

  reply	other threads:[~2026-08-11 22:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07 19:37 [PATCH 0/2] block: expose blkcg io.stat to BPF Ziyang Men
2026-08-07 19:37 ` [PATCH 1/2] block: add BPF kfuncs to read blkcg io.stat Ziyang Men
2026-08-07 20:00   ` sashiko-bot
2026-08-10 20:00   ` Tejun Heo
2026-08-10 22:46     ` Ziyang Men
2026-08-11  0:17       ` JP Kobryn
2026-08-11 16:54         ` Tejun Heo
2026-08-11 22:07           ` JP Kobryn [this message]
2026-08-12  1:07     ` Shakeel Butt
2026-08-07 19:37 ` [PATCH 2/2] selftests/bpf: add test for blkcg io.stat BPF kfuncs Ziyang Men
2026-08-07 19:51   ` sashiko-bot

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=c9fe7691-d808-4363-a826-14ac8a9bd575@linux.dev \
    --to=jp.kobryn@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bpf@vger.kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=hannes@cmpxchg.org \
    --cc=jolsa@kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@meta.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=mkoutny@suse.com \
    --cc=mykolal@meta.com \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=tj@kernel.org \
    --cc=yonghong.song@linux.dev \
    --cc=ziyang.meme@gmail.com \
    /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.