bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/7] bpf: introduce and use rcu_migrate_{enable,disable}
@ 2025-08-15  6:18 Menglong Dong
  2025-08-15  6:18 ` [PATCH bpf-next 1/7] rcu: add rcu_migrate_enable and rcu_migrate_disable Menglong Dong
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Menglong Dong @ 2025-08-15  6:18 UTC (permalink / raw)
  To: ast
  Cc: daniel, john.fastabend, andrii, martin.lau, eddyz87, song,
	yonghong.song, kpsingh, sdf, haoluo, jolsa, bpf, linux-kernel

migrate_disable() and rcu_read_lock() are used to together in many case in
bpf. However, when PREEMPT_RCU is not enabled, rcu_read_lock() indicate
migrate_disable(), so we don't need to call it in this case.

In this series, we introduce rcu_migrate_disable and rcu_migrate_enable,
which will call migrate_disable and migrate_enable only when PREEMPT_RCU
enabled. And replace the migrate_enable/migrate_disable with
rcu_migrate_enable/rcu_migrate_disable in bpf.

Menglong Dong (7):
  rcu: add rcu_migrate_enable and rcu_migrate_disable
  bpf: use rcu_migrate_* for bpf_cgrp_storage_free()
  bpf: use rcu_migrate_* for bpf_inode_storage_free()
  bpf: use rcu_migrate_* for bpf_iter_run_prog()
  bpf: use rcu_migrate_* for bpf_task_storage_free()
  bpf: use rcu_migrate_* for bpf_prog_run_array_cg()
  bpf: use rcu_migrate_* for trampoline.c

 include/linux/rcupdate.h       | 18 ++++++++++++++++++
 kernel/bpf/bpf_cgrp_storage.c  |  4 ++--
 kernel/bpf/bpf_inode_storage.c |  4 ++--
 kernel/bpf/bpf_iter.c          |  4 ++--
 kernel/bpf/bpf_task_storage.c  |  4 ++--
 kernel/bpf/cgroup.c            |  4 ++--
 kernel/bpf/trampoline.c        | 12 ++++++------
 7 files changed, 34 insertions(+), 16 deletions(-)

-- 
2.50.1


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

end of thread, other threads:[~2025-08-19 21:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-15  6:18 [PATCH bpf-next 0/7] bpf: introduce and use rcu_migrate_{enable,disable} Menglong Dong
2025-08-15  6:18 ` [PATCH bpf-next 1/7] rcu: add rcu_migrate_enable and rcu_migrate_disable Menglong Dong
2025-08-15 13:02   ` Alexei Starovoitov
2025-08-15 15:31     ` Paul E. McKenney
2025-08-17  2:01       ` Menglong Dong
2025-08-19 21:34         ` Paul E. McKenney
2025-08-17  1:55     ` Menglong Dong
2025-08-15  6:18 ` [PATCH bpf-next 2/7] bpf: use rcu_migrate_* for bpf_cgrp_storage_free() Menglong Dong
2025-08-15  6:18 ` [PATCH bpf-next 3/7] bpf: use rcu_migrate_* for bpf_inode_storage_free() Menglong Dong
2025-08-15  6:18 ` [PATCH bpf-next 4/7] bpf: use rcu_migrate_* for bpf_iter_run_prog() Menglong Dong
2025-08-15  6:18 ` [PATCH bpf-next 5/7] bpf: use rcu_migrate_* for bpf_task_storage_free() Menglong Dong
2025-08-15  6:18 ` [PATCH bpf-next 6/7] bpf: use rcu_migrate_* for bpf_prog_run_array_cg() Menglong Dong
2025-08-15  6:18 ` [PATCH bpf-next 7/7] bpf: use rcu_migrate_* for trampoline.c Menglong Dong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).