bpf: Run sleepable programs with migration disabled
authorAlexei Starovoitov <ast@kernel.org>
Wed, 10 Feb 2021 03:36:27 +0000 (19:36 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 11 Feb 2021 15:18:55 +0000 (16:18 +0100)
commit031d6e02ddbb8dea747c1abb697d556901f07dd4
tree2a4acbda0c22f3a2df375ed31a4123e5f2bd761a
parent700d4796ef59f5faf240d307839bd419e2b6bdff
bpf: Run sleepable programs with migration disabled

In older non-RT kernels migrate_disable() was the same as preempt_disable().
Since commit 74d862b682f5 ("sched: Make migrate_disable/enable() independent of RT")
migrate_disable() is real and doesn't prevent sleeping.

Running sleepable programs with migration disabled allows to add support for
program stats and per-cpu maps later.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: KP Singh <kpsingh@kernel.org>
Link: https://lore.kernel.org/bpf/20210210033634.62081-3-alexei.starovoitov@gmail.com
kernel/bpf/trampoline.c