Skip to content

Commit b49d133

Browse files
image-dragonKernel Patches Daemon
authored andcommitted
bpf: use rcu_migrate_* for bpf_cgrp_storage_free()
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]>
1 parent 00e673e commit b49d133

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/bpf/bpf_cgrp_storage.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void bpf_cgrp_storage_free(struct cgroup *cgroup)
4545
{
4646
struct bpf_local_storage *local_storage;
4747

48-
migrate_disable();
48+
rcu_migrate_disable();
4949
rcu_read_lock();
5050
local_storage = rcu_dereference(cgroup->bpf_cgrp_storage);
5151
if (!local_storage)
@@ -56,7 +56,7 @@ void bpf_cgrp_storage_free(struct cgroup *cgroup)
5656
bpf_cgrp_storage_unlock();
5757
out:
5858
rcu_read_unlock();
59-
migrate_enable();
59+
rcu_migrate_enable();
6060
}
6161

6262
static struct bpf_local_storage_data *

0 commit comments

Comments
 (0)