public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/4] bpf: add and use migrate_enable_rcu
@ 2025-10-14 11:26 Menglong Dong
  2025-10-14 11:26 ` [PATCH bpf-next 1/4] rcu: factor out migrate_enable_rcu and migrate_disable_rcu Menglong Dong
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Menglong Dong @ 2025-10-14 11:26 UTC (permalink / raw)
  To: ast, paulmck
  Cc: daniel, andrii, martin.lau, eddyz87, song, yonghong.song,
	john.fastabend, kpsingh, sdf, haoluo, jolsa, jakub, davem,
	edumazet, kuba, pabeni, horms, jiang.biao, bpf, linux-kernel,
	netdev

For now, we can use rcu_read_lock_dont_migrate() for the case that call
both rcu_read_lock() and migrate_disable(). However, sometimes they can be
called separately.

Therefore, we factor out migrate_enable_rcu and migrate_disable_rcu from
rcu_read_lock_dont_migrate and rcu_read_unlock_migrate.

And we introduce the function bpf_prog_run_pin_on_cpu_rcu(), which is
similar to bpf_prog_run_pin_on_cpu() but use
migrate_disable_rcu/migrate_enable_rcu instead.

The function bpf_prog_run_pin_on_cpu_rcu() is used in following functions:

  sk_psock_msg_verdict
  sk_psock_tls_strp_read
  sk_psock_strp_read
  sk_psock_strp_parse
  sk_psock_verdict_recv
  bpf_prog_run_clear_cb

Menglong Dong (4):
  rcu: factor out migrate_enable_rcu and migrate_disable_rcu
  bpf: introduce bpf_prog_run_pin_on_cpu_rcu()
  bpf: use bpf_prog_run_pin_on_cpu_rcu() in skmsg.c
  bpf: use bpf_prog_run_pin_on_cpu_rcu() in bpf_prog_run_clear_cb

 include/linux/filter.h   | 16 +++++++++++++++-
 include/linux/rcupdate.h | 18 +++++++++++++++---
 net/core/skmsg.c         | 10 +++++-----
 3 files changed, 35 insertions(+), 9 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-10-15  8:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-14 11:26 [PATCH bpf-next 0/4] bpf: add and use migrate_enable_rcu Menglong Dong
2025-10-14 11:26 ` [PATCH bpf-next 1/4] rcu: factor out migrate_enable_rcu and migrate_disable_rcu Menglong Dong
2025-10-14 14:59   ` Alexei Starovoitov
2025-10-15  8:40     ` Menglong Dong
2025-10-14 11:26 ` [PATCH bpf-next 2/4] bpf: introduce bpf_prog_run_pin_on_cpu_rcu() Menglong Dong
2025-10-14 11:26 ` [PATCH bpf-next 3/4] bpf: use bpf_prog_run_pin_on_cpu_rcu() in skmsg.c Menglong Dong
2025-10-14 11:26 ` [PATCH bpf-next 4/4] bpf: use bpf_prog_run_pin_on_cpu_rcu() in bpf_prog_run_clear_cb Menglong Dong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox