mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-15 09:35:19 +00:00

Simplify the scheduler by making CONFIG_SMP=y primitives and data structures unconditional. Introduce transitory wrappers for functionality not yet converted to SMP. Note that this patch is pretty large, because there's no clear separation between various aspects of the SMP scheduler, it's basically a huge block of #ifdef CONFIG_SMP. A fair amount of it has to be switched on for it to boot and work on UP systems. Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Shrikanth Hegde <sshegde@linux.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Valentin Schneider <vschneid@redhat.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Link: https://lore.kernel.org/r/20250528080924.2273858-21-mingo@kernel.org
27 lines
648 B
C
27 lines
648 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#include <linux/types.h>
|
|
#include <linux/spinlock.h>
|
|
|
|
#define IDX_INVALID -1
|
|
|
|
struct cpudl_item {
|
|
u64 dl;
|
|
int cpu;
|
|
int idx;
|
|
};
|
|
|
|
struct cpudl {
|
|
raw_spinlock_t lock;
|
|
int size;
|
|
cpumask_var_t free_cpus;
|
|
struct cpudl_item *elements;
|
|
};
|
|
|
|
int cpudl_find(struct cpudl *cp, struct task_struct *p, struct cpumask *later_mask);
|
|
void cpudl_set(struct cpudl *cp, int cpu, u64 dl);
|
|
void cpudl_clear(struct cpudl *cp, int cpu);
|
|
int cpudl_init(struct cpudl *cp);
|
|
void cpudl_set_freecpu(struct cpudl *cp, int cpu);
|
|
void cpudl_clear_freecpu(struct cpudl *cp, int cpu);
|
|
void cpudl_cleanup(struct cpudl *cp);
|