eb7630f95f
In preparation for chain migration, push the awareness of the split between execution and scheduler context down into some of the rt/deadline code paths that deal with load balancing. This patch was broken out from a larger chain migration patch originally by Connor O'Brien. Cc: Joel Fernandes <joelaf@google.com> Cc: Qais Yousef <qyousef@layalina.io> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Valentin Schneider <vschneid@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Ben Segall <bsegall@google.com> Cc: Zimuzo Ezeozue <zezeozue@google.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Will Deacon <will@kernel.org> Cc: Waiman Long <longman@redhat.com> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: "Paul E. McKenney" <paulmck@kernel.org> Cc: Metin Kaya <Metin.Kaya@arm.com> Cc: Xuewen Yan <xuewen.yan94@gmail.com> Cc: K Prateek Nayak <kprateek.nayak@amd.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: kernel-team@android.com Change-Id: Ie71af403e471c201f4eb8a65fe422e738b51d61b Signed-off-by: Connor O'Brien <connoro@google.com> [jstultz: split out from larger chain migration patch] Signed-off-by: John Stultz <jstultz@google.com> Bug: 306081722 --- v8: * Move null exec_ctx check to a later patch, as suggested by Metin v9: * Folded down cpupri null check changes from later patch, as suggested by Metin
28 lines
677 B
C
28 lines
677 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#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;
|
|
};
|
|
|
|
#ifdef CONFIG_SMP
|
|
int cpudl_find(struct cpudl *cp, struct task_struct *sched_ctx,
|
|
struct task_struct *exec_ctx, 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);
|
|
#endif /* CONFIG_SMP */
|