Commit 2b4d2501 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'sched_urgent_for_v6.12_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduling fixes from Borislav Petkov:

 - Add PREEMPT_RT maintainers

 - Fix another aspect of delayed dequeued tasks wrt determining their
   state, i.e., whether they're runnable or blocked

 - Handle delayed dequeued tasks and their migration wrt PSI properly

 - Fix the situation where a delayed dequeue task gets enqueued into a
   new class, which should not happen

 - Fix a case where memory allocation would happen while the runqueue
   lock is held, which is a no-no

 - Do not over-schedule when tasks with shorter slices preempt the
   currently running task

 - Make sure delayed to deque entities are properly handled before
   unthrottling

 - Other smaller cleanups and improvements

* tag 'sched_urgent_for_v6.12_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  MAINTAINERS: Add an entry for PREEMPT_RT.
  sched/fair: Fix external p->on_rq users
  sched/psi: Fix mistaken CPU pressure indication after corrupted task state bug
  sched/core: Dequeue PSI signals for blocked tasks that are delayed
  sched: Fix delayed_dequeue vs switched_from_fair()
  sched/core: Disable page allocation in task_tick_mm_cid()
  sched/deadline: Use hrtick_enabled_dl() before start_hrtick_dl()
  sched/eevdf: Fix wakeup-preempt by checking cfs_rq->nr_running
  sched: Fix sched_delayed vs cfs_bandwidth
parents a5ee44c8 5ec36fe2
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -19527,6 +19527,14 @@ S: Maintained
F:	Documentation/tools/rtla/
F:	tools/tracing/rtla/
Real-time Linux (PREEMPT_RT)
M:	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
M:	Clark Williams <clrkwllms@kernel.org>
M:	Steven Rostedt <rostedt@goodmis.org>
L:	linux-rt-devel@lists.linux.dev
S:	Supported
K:	PREEMPT_RT
REALTEK AUDIO CODECS
M:	Oder Chiou <oder_chiou@realtek.com>
S:	Maintained
+5 −0
Original line number Diff line number Diff line
@@ -2133,6 +2133,11 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)

#endif /* CONFIG_SMP */

static inline bool task_is_runnable(struct task_struct *p)
{
	return p->on_rq && !p->se.sched_delayed;
}

extern bool sched_task_on_rq(struct task_struct *p);
extern unsigned long get_wchan(struct task_struct *p);
extern struct task_struct *cpu_curr_snapshot(int cpu);
+4 −1
Original line number Diff line number Diff line
@@ -14,11 +14,14 @@ init_task_work(struct callback_head *twork, task_work_func_t func)
}

enum task_work_notify_mode {
	TWA_NONE,
	TWA_NONE = 0,
	TWA_RESUME,
	TWA_SIGNAL,
	TWA_SIGNAL_NO_IPI,
	TWA_NMI_CURRENT,

	TWA_FLAGS = 0xff00,
	TWAF_NO_ALLOC = 0x0100,
};

static inline bool task_work_pending(struct task_struct *task)
+1 −1
Original line number Diff line number Diff line
@@ -9251,7 +9251,7 @@ static void perf_event_switch(struct task_struct *task,
		},
	};

	if (!sched_in && task->on_rq) {
	if (!sched_in && task_is_runnable(task)) {
		switch_event.event_id.header.misc |=
				PERF_RECORD_MISC_SWITCH_OUT_PREEMPT;
	}
+6 −1
Original line number Diff line number Diff line
@@ -109,7 +109,12 @@ static int __set_task_frozen(struct task_struct *p, void *arg)
{
	unsigned int state = READ_ONCE(p->__state);

	if (p->on_rq)
	/*
	 * Allow freezing the sched_delayed tasks; they will not execute until
	 * ttwu() fixes them up, so it is safe to swap their state now, instead
	 * of waiting for them to get fully dequeued.
	 */
	if (task_is_runnable(p))
		return 0;

	if (p != current && task_curr(p))
Loading