Skip to content

bpf: introduce and use rcu_migrate_{enable,disable} #9494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: bpf-next_base
Choose a base branch
from

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: bpf: introduce and use rcu_migrate_{enable,disable}
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=991794

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 0786654
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=991794
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: dc0fe95
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=991794
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: c80d797
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=991794
version: 1

migrate_disable() is called to disable migration in the kernel, and it is
used togather with rcu_read_lock() oftenly.

However, with PREEMPT_RCU disabled, it's unnecessary, as rcu_read_lock()
will disable preemption, which will also disable migration.

Introduce rcu_migrate_enable() and rcu_migrate_disable(), which will do
the migration enable and disable only when the rcu_read_lock() can't do
it.

Signed-off-by: Menglong Dong <[email protected]>
Replace the migrate_disable/migrate_enable with
rcu_migrate_disable/rcu_migrate_enable in bpf_cgrp_storage_free to obtain
better performance when PREEMPT_RCU is not enabled.

Signed-off-by: Menglong Dong <[email protected]>
Replace the migrate_disable/migrate_enable with
rcu_migrate_disable/rcu_migrate_enable in bpf_inode_storage_free to obtain
better performance when PREEMPT_RCU is not enabled.

Signed-off-by: Menglong Dong <[email protected]>
Replace the migrate_disable/migrate_enable with
rcu_migrate_disable/rcu_migrate_enable in bpf_iter_run_prog to obtain
better performance when PREEMPT_RCU is not enabled.

Signed-off-by: Menglong Dong <[email protected]>
Replace the migrate_disable/migrate_enable with
rcu_migrate_disable/rcu_migrate_enable in bpf_task_storage_free to obtain
better performance when PREEMPT_RCU is not enabled.

Signed-off-by: Menglong Dong <[email protected]>
Replace the migrate_disable/migrate_enable with
rcu_migrate_disable/rcu_migrate_enable in bpf_prog_run_array_cg to obtain
better performance when PREEMPT_RCU is not enabled.

Signed-off-by: Menglong Dong <[email protected]>
Replace the migrate_disable/migrate_enable with
rcu_migrate_disable/rcu_migrate_enable in trampoline.c to obtain better
performance when PREEMPT_RCU is not enabled.

Signed-off-by: Menglong Dong <[email protected]>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 3ec8560
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=991794
version: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant