Merge pull request #131 from sched-ext/htejun

scx: Update vmlinux to use SCX_KICK_IDLE
This commit is contained in:
Tejun Heo 2024-02-07 07:04:00 -10:00 committed by GitHub
commit 73c68c6f4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 138541 additions and 6 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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 */

View 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

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
vmlinux-v6.7-g58ac752df8fa.h
vmlinux-v6.7-g6851d5f5be95.h

View File

@ -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);