linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] sched/rt: Distribute tasks in find_lowest_rq()
@ 2020-04-14 15:05 Qais Yousef
  2020-04-14 15:05 ` [PATCH 1/4] cpumask: Rename cpumask_any_and_distribute Qais Yousef
                   ` (4 more replies)
  0 siblings, 5 replies; 27+ messages in thread
From: Qais Yousef @ 2020-04-14 15:05 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra
  Cc: Qais Yousef, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman, Andrew Morton,
	Thomas Gleixner, Yury Norov, Paul Turner, Alexey Dobriyan,
	Josh Don, Pavan Kondeti, linux-kernel

Now that we have a proper function that returns a 'random' CPU in a mask [1]
utilize that in find_lowest_rq() to solve the thundering herd issue described
in this thread

	https://lore.kernel.org/lkml/20200219140243.wfljmupcrwm2jelo@e107158-lin/

But as a pre-amble, I noticed that the new cpumask_any_and_distribute() is
actually an alias for cpumask_any_and() which is documented as returning
a 'random' cpu but actually just does cpumask_first_and().

The first 3 patches cleanup the API so that the whole family of
cpumask_any*() take advantage of the new 'random' behavior and in patch
4 I convert the cpumask_first_and() --> cpumask_any_and() in find_lowest_rq()
to allow to better distribute the RT tasks that wake up simultaneously.

[1] https://lore.kernel.org/lkml/20200311010113.136465-1-joshdon@google.com/

CC: Juri Lelli <juri.lelli@redhat.com>
CC: Vincent Guittot <vincent.guittot@linaro.org>
CC: Dietmar Eggemann <dietmar.eggemann@arm.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Ben Segall <bsegall@google.com>
CC: Mel Gorman <mgorman@suse.de>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Yury Norov <yury.norov@gmail.com>
CC: Paul Turner <pjt@google.com>
CC: Alexey Dobriyan <adobriyan@gmail.com>
CC: Josh Don <joshdon@google.com>
CC: Pavan Kondeti <pkondeti@codeaurora.org>
CC: linux-kernel@vger.kernel.org

Qais Yousef (4):
  cpumask: Rename cpumask_any_and_distribute
  cpumask: Make cpumask_any() truly random
  cpumask: Convert cpumask_any_but() to the new random function
  sched/rt: Better distribute tasks that wakeup simultaneously

 include/linux/cpumask.h | 33 ++++++-----------
 kernel/sched/core.c     |  2 +-
 kernel/sched/rt.c       |  4 +-
 lib/cpumask.c           | 82 +++++++++++++++++++++++++++--------------
 4 files changed, 68 insertions(+), 53 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2020-05-28  8:59 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-14 15:05 [PATCH 0/4] sched/rt: Distribute tasks in find_lowest_rq() Qais Yousef
2020-04-14 15:05 ` [PATCH 1/4] cpumask: Rename cpumask_any_and_distribute Qais Yousef
2020-04-14 15:05 ` [PATCH 2/4] cpumask: Make cpumask_any() truly random Qais Yousef
2020-04-14 16:19   ` Steven Rostedt
2020-04-15  9:36     ` Peter Zijlstra
2020-04-20 15:43       ` Qais Yousef
2020-04-20 21:36         ` Josh Don
2020-05-28  8:52   ` [cpumask] a7934287d8: BUG:using__this_cpu_read()in_preemptible[#]code:kworker kernel test robot
2020-04-14 15:05 ` [PATCH 3/4] cpumask: Convert cpumask_any_but() to the new random function Qais Yousef
2020-04-14 16:28   ` Steven Rostedt
2020-04-20 15:49     ` Qais Yousef
2020-04-14 15:05 ` [PATCH 4/4] sched/rt: Better distribute tasks that wakeup simultaneously Qais Yousef
2020-04-14 18:58 ` [PATCH 0/4] sched/rt: Distribute tasks in find_lowest_rq() Valentin Schneider
2020-04-14 20:27   ` Steven Rostedt
2020-04-14 20:56     ` Valentin Schneider
2020-04-15  9:39     ` Peter Zijlstra
2020-04-15 13:18       ` Steven Rostedt
2020-04-21 12:15       ` Qais Yousef
2020-04-21 12:13   ` Qais Yousef
2020-04-21 13:18     ` Valentin Schneider
2020-04-21 13:28       ` Vincent Guittot
2020-04-21 14:22         ` Yury Norov
2020-04-21 14:25         ` Qais Yousef
2020-04-21 14:09       ` Marc Zyngier
2020-04-21 14:22         ` Qais Yousef
2020-04-21 14:28           ` Marc Zyngier
2020-04-21 14:39             ` Qais Yousef

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).