mirror of
https://github.com/sched-ext/scx.git
synced 2024-11-29 06:00:23 +00:00
Merge pull request #1 from sched-ext/fix-rusty-eexist
scx_rusty: Work around spurious task_ctx update failures
This commit is contained in:
commit
d6b978da09
@ -966,7 +966,13 @@ s32 BPF_STRUCT_OPS(rusty_prep_enable, struct task_struct *p,
|
|||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|
||||||
pid = p->pid;
|
pid = p->pid;
|
||||||
ret = bpf_map_update_elem(&task_data, &pid, &taskc, BPF_NOEXIST);
|
|
||||||
|
/*
|
||||||
|
* XXX - We want BPF_NOEXIST but bpf_map_delete_elem() in .disable() may
|
||||||
|
* fail spuriously due to BPF recursion protection triggering
|
||||||
|
* unnecessarily.
|
||||||
|
*/
|
||||||
|
ret = bpf_map_update_elem(&task_data, &pid, &taskc, 0 /*BPF_NOEXIST*/);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
stat_add(RUSTY_STAT_TASK_GET_ERR, 1);
|
stat_add(RUSTY_STAT_TASK_GET_ERR, 1);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user