linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Valentin Schneider <valentin.schneider@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Morten Rasmussen <morten.rasmussen@arm.com>,
	Qais Yousef <qais.yousef@arm.com>,
	Quentin Perret <qperret@google.com>,
	Pavan Kondeti <pkondeti@codeaurora.org>,
	Rik van Riel <riel@surriel.com>
Subject: Re: [PATCH 7/8] sched/fair: Attempt misfit active balance when migration_type != migrate_misfit
Date: Tue, 09 Feb 2021 18:19:43 +0000	[thread overview]
Message-ID: <jhjlfbxt874.mognet@arm.com> (raw)
In-Reply-To: <CAKfTPtBSkg2tBH5U+GvRWHBe3qxCqdB3w6WPJsZPADDbVQCc0w@mail.gmail.com>

On 09/02/21 09:58, Vincent Guittot wrote:
> On Thu, 28 Jan 2021 at 19:32, Valentin Schneider
>> Giving group_misfit_task a higher group_classify() priority than
>> group_imbalance doesn't seem like the right thing to do. Instead, make
>
> Could you explain why ?
>

Morten had intentionally placed it above (then) group_other but below
group_imbalanced:

  3b1baa6496e6 ("sched/fair: Add 'group_misfit_task' load-balance type")

The reasoning being misfit balance shouldn't take higher priority than
jarring imbalance issues. group_imbalanced is a mixed bag and difficult to
classify, but for sure group_overloaded takes priority as it ought to imply
you can move tasks around without doing an active balance (there's more
tasks than CPUs).

Then again, we do have issues where the busiest group is group_overloaded,
but we'd "want" this to be classified as misfit. This ties in with patch 8.

Take the CPU hog vs pcpu kworker example on a big.LITTLE platform:

  a,b,c,d are our CPU-hogging tasks
  k is a per-CPU kworker

        {CPU0 | a a a a k
  LITTLE{CPU1 | b b b b a
        ------|---------
        {CPU2 | c c c c .
  bigs  {CPU3 | d d d d ^
                        |
                        |
                  newidle pull

CPU2 finished its work and goes through a newidle balance. Ideally here it
would pull either 'a' or 'b' which are CPU-bound tasks running on LITTLE
CPUs. Unfortunately, a per-CPU kworker woke up on CPU0, so since we have:

  DIE [        ]
  MC  [   ][   ]
       0 1  2 3

the DIE (0-1) sched_group has 3 runnable tasks, two of which are CPU hogs:
it gets classified as group_overloaded. Only task 'a' can be pulled, and it
requires patch 8 to be migrated in this scenario.


I'm not sure how we could better classify this, even if admitting we
started tracking preempted misfit tasks. Perhaps not group classification
itself, but the migration_type? i.e. something like

  if (nr_running - sgs->group_weight <= nr_misfits)
  => all preempted tasks are misfit
  => migration_type = migrate_misfit

  reply	other threads:[~2021-02-09 19:54 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28 18:31 [PATCH 0/8] sched/fair: misfit task load-balance tweaks Valentin Schneider
2021-01-28 18:31 ` [PATCH 1/8] sched/fair: Clean up active balance nr_balance_failed trickery Valentin Schneider
2021-02-03 15:14   ` Qais Yousef
2021-02-03 18:42     ` Valentin Schneider
2021-02-04 15:05       ` Qais Yousef
2021-02-05 13:51   ` Vincent Guittot
2021-02-05 14:05     ` Valentin Schneider
2021-02-05 14:34       ` Vincent Guittot
2021-01-28 18:31 ` [PATCH 2/8] sched/fair: Add more sched_asym_cpucapacity static branch checks Valentin Schneider
2021-02-03 15:14   ` Qais Yousef
2021-02-09  8:42   ` Vincent Guittot
2021-01-28 18:31 ` [PATCH 3/8] sched/fair: Tweak misfit-related capacity checks Valentin Schneider
2021-02-03 15:15   ` Qais Yousef
2021-02-03 18:42     ` Valentin Schneider
2021-02-05 14:31   ` Vincent Guittot
2021-02-05 16:59     ` Valentin Schneider
2021-02-05 17:17       ` Vincent Guittot
2021-02-05 20:07         ` Valentin Schneider
2021-02-08 15:29           ` Vincent Guittot
2021-02-08 17:49             ` Valentin Schneider
2021-01-28 18:31 ` [PATCH 4/8] sched/fair: Use dst_cpu's capacity rather than group {min, max} capacity Valentin Schneider
2021-02-03 15:15   ` Qais Yousef
2021-01-28 18:31 ` [PATCH 5/8] sched/fair: Make check_misfit_status() only compare dynamic capacities Valentin Schneider
2021-02-03 15:15   ` Qais Yousef
2021-02-04 10:49     ` Dietmar Eggemann
2021-02-04 11:34       ` Valentin Schneider
2021-02-04 14:57         ` Dietmar Eggemann
2021-01-28 18:31 ` [PATCH 6/8] sched/fair: Filter out locally-unsolvable misfit imbalances Valentin Schneider
2021-02-03 15:16   ` Qais Yousef
2021-02-03 18:43     ` Valentin Schneider
2021-01-28 18:31 ` [PATCH 7/8] sched/fair: Attempt misfit active balance when migration_type != migrate_misfit Valentin Schneider
2021-02-03 15:16   ` Qais Yousef
2021-02-03 18:43     ` Valentin Schneider
2021-02-04 11:44       ` Dietmar Eggemann
2021-02-04 12:22         ` Valentin Schneider
2021-02-09  8:58   ` Vincent Guittot
2021-02-09 18:19     ` Valentin Schneider [this message]
2021-01-28 18:31 ` [PATCH 8/8] sched/fair: Relax task_hot() for misfit tasks Valentin Schneider
2021-02-03 15:17   ` Qais Yousef
2021-02-08 16:21   ` Vincent Guittot
2021-02-08 18:24     ` Valentin Schneider
2021-02-09  8:56       ` Vincent Guittot
2021-02-03 15:14 ` [PATCH 0/8] sched/fair: misfit task load-balance tweaks Qais Yousef
2021-02-03 18:43   ` Valentin Schneider
2021-02-04 12:03     ` Dietmar Eggemann
2021-02-04 12:36       ` Valentin Schneider

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jhjlfbxt874.mognet@arm.com \
    --to=valentin.schneider@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=pkondeti@codeaurora.org \
    --cc=qais.yousef@arm.com \
    --cc=qperret@google.com \
    --cc=riel@surriel.com \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).