[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID:
<AM6PR03MB50806070E3D56208DDB8131699C22@AM6PR03MB5080.eurprd03.prod.outlook.com>
Date: Wed, 26 Feb 2025 19:24:44 +0000
From: Juntong Deng <juntong.deng@...look.com>
To: ast@...nel.org,
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,
memxor@...il.com,
tj@...nel.org,
void@...ifault.com,
arighi@...dia.com,
changwoo@...lia.com
Cc: bpf@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH sched_ext/for-6.15 v3 0/5] bpf, sched_ext: Make kfunc filters support struct_ops context to reduce runtime overhead
This patch series makes kfunc filters support the use of struct_ops
context information to reduce SCX runtime overhead.
After improving kfunc filters, SCX no longer needs the mask-based
runtime kfuncs call restriction, so this patch removes the mask-based
runtime restriction and updates the corresponding test case.
I added *st_ops as part of the context information to avoid kfuncs being
incorrectly blocked when used in non-SCX scenarios where the member
offsets would have a different meaning.
Signed-off-by: Juntong Deng <juntong.deng@...look.com>
---
v2 -> v3:
* Change scx_kfunc_ids_ops_context to the more descriptive
scx_kfunc_ids_ops_context_sensitive
* Change the target to sched_ext/for-6.15
* Remove RFC tag
* v2 link: https://lore.kernel.org/bpf/AM6PR03MB5080855B90C3FE9B6C4243B099FE2@AM6PR03MB5080.eurprd03.prod.outlook.com/T/#u
v1 -> v2:
* Use completely new design in filtering
* v1 link: https://lore.kernel.org/bpf/AM6PR03MB5080261D024B49D26F3FFF0099F72@AM6PR03MB5080.eurprd03.prod.outlook.com/T/#u
Juntong Deng (5):
bpf: Add struct_ops context information to struct bpf_prog_aux
sched_ext: Declare context-sensitive kfunc groups that can be used by
different SCX operations
sched_ext: Add scx_kfunc_ids_ops_context_sensitive for unified
filtering of context-sensitive SCX kfuncs
sched_ext: Removed mask-based runtime restrictions on calling kfuncs
in different contexts
selftests/sched_ext: Update enq_select_cpu_fails to adapt to
struct_ops context filter
include/linux/bpf.h | 2 +
include/linux/sched/ext.h | 24 --
kernel/bpf/verifier.c | 8 +-
kernel/sched/ext.c | 385 ++++++++----------
kernel/sched/ext_idle.c | 13 +-
.../sched_ext/enq_select_cpu_fails.c | 37 +-
6 files changed, 194 insertions(+), 275 deletions(-)
--
2.39.5
Powered by blists - more mailing lists