mirror of
https://github.com/systemd/systemd.git
synced 2026-08-10 01:48:09 +00:00
process-util: Add support SCHED_EXT scheduling policy
Allow CPUSchedulingPolicy to be set to "ext". SCHED_EXT is a new scheduling policy in Linux v6.12 that allows processes to be scheduled using custom BPF schedulers instead of the default in-kernel ones. Selectively setting the SCHED_EXT policy is useful for systems running in "partial mode" where not all processes are run using a custom scheduler. Fallback to SCHED_OTHER and print an error message for systems where SCHED_EXT isn't available.
This commit is contained in:
@@ -55,3 +55,11 @@ int __clone2(int (*fn)(void *), void *stack_base, size_t stack_size, int flags,
|
||||
int missing_sched_setattr(pid_t pid, struct sched_attr *attr, unsigned flags);
|
||||
# define sched_setattr missing_sched_setattr
|
||||
#endif
|
||||
|
||||
/* f0e1a0643a59bf1f922fa209cec86a170b784f3f (6.12),
|
||||
* defined in sched.h in glibc since glibc-2.41. */
|
||||
#ifndef SCHED_EXT
|
||||
# define SCHED_EXT 7
|
||||
#else
|
||||
static_assert(SCHED_EXT == 7, "");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user