Skip to content

Commit 079d1ea

Browse files
image-dragonKernel Patches Daemon
authored andcommitted
bpf: use rcu_migrate_* for bpf_inode_storage_free()
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]>
1 parent 931e640 commit 079d1ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/bpf/bpf_inode_storage.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void bpf_inode_storage_free(struct inode *inode)
6262
if (!bsb)
6363
return;
6464

65-
migrate_disable();
65+
rcu_migrate_disable();
6666
rcu_read_lock();
6767

6868
local_storage = rcu_dereference(bsb->storage);
@@ -72,7 +72,7 @@ void bpf_inode_storage_free(struct inode *inode)
7272
bpf_local_storage_destroy(local_storage);
7373
out:
7474
rcu_read_unlock();
75-
migrate_enable();
75+
rcu_migrate_enable();
7676
}
7777

7878
static void *bpf_fd_inode_storage_lookup_elem(struct bpf_map *map, void *key)

0 commit comments

Comments
 (0)