mirror of
https://github.com/sched-ext/scx.git
synced 2024-11-28 21:50:23 +00:00
Merge pull request #131 from sched-ext/htejun
scx: Update vmlinux to use SCX_KICK_IDLE
This commit is contained in:
commit
73c68c6f4a
@ -176,7 +176,7 @@ static bool dispatch_to_cpu(s32 cpu)
|
||||
scx_bpf_dispatch(p, SCX_DSQ_LOCAL_ON | cpu, SCX_SLICE_INF, 0);
|
||||
|
||||
if (cpu != central_cpu)
|
||||
scx_bpf_kick_cpu(cpu, 0);
|
||||
__COMPAT_scx_bpf_kick_cpu_IDLE(cpu);
|
||||
|
||||
bpf_task_release(p);
|
||||
return true;
|
||||
|
@ -192,7 +192,7 @@ void BPF_STRUCT_OPS(qmap_enqueue, struct task_struct *p, u64 enq_flags)
|
||||
scx_bpf_dispatch(p, SCX_DSQ_GLOBAL, 0, enq_flags);
|
||||
cpu = scx_bpf_pick_idle_cpu(p->cpus_ptr, 0);
|
||||
if (cpu >= 0)
|
||||
scx_bpf_kick_cpu(cpu, 0);
|
||||
__COMPAT_scx_bpf_kick_cpu_IDLE(cpu);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
* Copyright (c) 2022 Tejun Heo <tj@kernel.org>
|
||||
* Copyright (c) 2022 David Vernet <dvernet@meta.com>
|
||||
*/
|
||||
#ifndef __SCHED_EXT_COMMON_BPF_H
|
||||
#define __SCHED_EXT_COMMON_BPF_H
|
||||
#ifndef __SCX_COMMON_BPF_H
|
||||
#define __SCX_COMMON_BPF_H
|
||||
|
||||
#include "vmlinux.h"
|
||||
#include <bpf/bpf_helpers.h>
|
||||
@ -243,4 +243,6 @@ u32 bpf_cpumask_any_and_distribute(const struct cpumask *src1,
|
||||
void bpf_rcu_read_lock(void) __ksym;
|
||||
void bpf_rcu_read_unlock(void) __ksym;
|
||||
|
||||
#include "compat.bpf.h"
|
||||
|
||||
#endif /* __SCHED_EXT_COMMON_BPF_H */
|
||||
|
18
scheds/include/scx/compat.bpf.h
Normal file
18
scheds/include/scx/compat.bpf.h
Normal file
@ -0,0 +1,18 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) 2024 Meta Platforms, Inc. and affiliates.
|
||||
* Copyright (c) 2024 Tejun Heo <tj@kernel.org>
|
||||
* Copyright (c) 2024 David Vernet <dvernet@meta.com>
|
||||
*/
|
||||
#ifndef __SCX_COMPAT_BPF_H
|
||||
#define __SCX_COMPAT_BPF_H
|
||||
|
||||
static inline void __COMPAT_scx_bpf_kick_cpu_IDLE(s32 cpu)
|
||||
{
|
||||
if (bpf_core_enum_value_exists(enum scx_kick_flags, SCX_KICK_IDLE))
|
||||
scx_bpf_kick_cpu(cpu, SCX_KICK_IDLE);
|
||||
else
|
||||
scx_bpf_kick_cpu(cpu, 0);
|
||||
}
|
||||
|
||||
#endif
|
138515
scheds/include/vmlinux/vmlinux-v6.7-g6851d5f5be95.h
Normal file
138515
scheds/include/vmlinux/vmlinux-v6.7-g6851d5f5be95.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
vmlinux-v6.7-g58ac752df8fa.h
|
||||
vmlinux-v6.7-g6851d5f5be95.h
|
@ -318,7 +318,7 @@ static void dispatch_task(struct task_struct *p, u64 dsq_id, u64 enq_flags)
|
||||
return;
|
||||
dsq_id = dsq_to_cpu(cpu);
|
||||
}
|
||||
scx_bpf_kick_cpu(cpu, 0);
|
||||
__COMPAT_scx_bpf_kick_cpu_IDLE(cpu);
|
||||
break;
|
||||
}
|
||||
dbg_msg("dispatch: pid=%d (%s) dsq=%llu", p->pid, p->comm, dsq_id);
|
||||
|
Loading…
Reference in New Issue
Block a user