[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250815061824.765906-1-dongml2@chinatelecom.cn>
Date: Fri, 15 Aug 2025 14:18:17 +0800
From: Menglong Dong <menglong8.dong@...il.com>
To: ast@...nel.org
Cc: daniel@...earbox.net,
john.fastabend@...il.com,
andrii@...nel.org,
martin.lau@...ux.dev,
eddyz87@...il.com,
song@...nel.org,
yonghong.song@...ux.dev,
kpsingh@...nel.org,
sdf@...ichev.me,
haoluo@...gle.com,
jolsa@...nel.org,
bpf@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH bpf-next 0/7] bpf: introduce and use rcu_migrate_{enable,disable}
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
Powered by blists - more mailing lists