All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/2] sched/fair: Choose the CPU where short task is running during wake up
@ 2022-10-23 15:31 Chen Yu
  2022-10-23 15:32 ` [RFC PATCH v2 1/2] sched/fair: Introduce short duration task check Chen Yu
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Chen Yu @ 2022-10-23 15:31 UTC (permalink / raw)
  To: Peter Zijlstra, Vincent Guittot, Tim Chen, Mel Gorman
  Cc: Juri Lelli, Rik van Riel, Aaron Lu, Abel Wu, K Prateek Nayak,
	Yicong Yang, Gautham R . Shenoy, Ingo Molnar, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Daniel Bristot de Oliveira,
	Valentin Schneider, Hillf Danton, Honglei Wang, Len Brown,
	Chen Yu, linux-kernel, Chen Yu

At LPC 2022 Real-time and Scheduling Micro Conference we presented
the cross CPU wakeup issue. This patch is a text version of the
talk, and hopefully, we can clarify the problem and appreciate any
feedback.

The main purpose of this change is to avoid too many crosses CPU
wake up when the system is busy. Please refer to the commit log
of [PATCH 2/2] for detail.

This patch set is composed of two parts. The first part is to introduce
the definition of a short-duration task. The second part leverages the
first part to choose a CPU where only one short-duration task is running
on. This CPU is chosen as the candidate to place a woken task.

This version is modified based on the following feedback on v1:
1. Tim suggested raising the bar to choose a CPU with a short-duration
   task, by checking if the short-duration task is the only runnable
   task on the target CPU.
2. To address Peter's concern: would this patch inhibit spreading the
   workload when there are idle CPUs around? The patch would only take
   effect when the system is relatively busy, and only choose the CPU
   where only one short-duration task is running.
3. Prateek, Honglwei and Hillf suggsted to prefer previous idle CPU to the
   CPU with short-duration task running.

v1 link: https://lore.kernel.org/lkml/20220915165407.1776363-1-yu.c.chen@intel.com/

Chen Yu (2):
  sched/fair: Introduce short duration task check
  sched/fair: Choose the CPU where short task is running during wake up

 include/linux/sched.h   |  8 ++++
 kernel/sched/core.c     |  2 +
 kernel/sched/fair.c     | 99 +++++++++++++++++++++++++++++++++++++++++
 kernel/sched/features.h |  1 +
 4 files changed, 110 insertions(+)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-12-02  3:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-23 15:31 [RFC PATCH v2 0/2] sched/fair: Choose the CPU where short task is running during wake up Chen Yu
2022-10-23 15:32 ` [RFC PATCH v2 1/2] sched/fair: Introduce short duration task check Chen Yu
2022-10-24 10:10   ` Abel Wu
2022-10-25  5:16     ` Chen Yu
2022-11-03 12:44   ` Peter Zijlstra
2022-11-04  4:09     ` Chen Yu
2022-10-23 15:33 ` [RFC PATCH v2 2/2] sched/fair: Choose the CPU where short task is running during wake up Chen Yu
2022-11-02  8:18   ` kernel test robot
2022-11-03 13:04   ` Peter Zijlstra
2022-11-04  4:35     ` Chen Yu
2022-11-22 10:31 ` [RFC PATCH v2 0/2] " K Prateek Nayak
2022-11-30  4:03   ` Chen Yu
2022-12-02  3:21     ` K Prateek Nayak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.