public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <umgwanakikbuti@gmail.com>
To: Brendan Gregg <brendan.d.gregg@gmail.com>,
	Jeff Merkey <linux.mdb@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] The Linux Scheduler: a Decade of Wasted Cores Report
Date: Sun, 24 Apr 2016 09:05:17 +0200	[thread overview]
Message-ID: <1461481517.3835.125.camel@gmail.com> (raw)
In-Reply-To: <CAE40pddfowQWus-6u9HEYawtUCOycK--3xBHb=AGaOj-tiMekg@mail.gmail.com>

On Sat, 2016-04-23 at 18:38 -0700, Brendan Gregg wrote:

> The bugs they found seem real, and their analysis is great (although
> using visualizations to find and fix scheduler bugs isn't new), and it
> would be good to see these fixed. However, it would also be useful to
> double check how widespread these issues really are. I suspect many on
> this list can test these patches in different environments.

Part of it sounded to me very much like they're meeting and "fixing"
SMP group fairness.  Take the worst case, a threads=cores group of
synchronized threads passing checkpoints in lockstep competing with a
group of one hog: synchronized threads that have a core to themselves
must wait (busy as they mentioned, or sleep) for the straggler thread
who's fair share is a small fraction (1/65 for 64 core box) of a core
to catch up before the group as a unit can proceed.

Without SMP fairness, groups intersecting compete as equals at any
given intersection (assuming shares have not been twiddled), thus a
fully synchronized load can utilize up to 50% of a box [1], whereas
with SMP fairness, worst case load slams head on into a one core wall. 
 Pondering the progress dependency thingy a bit, seems some degree of
that is likely, thus it logically follows that SMP fairness is likely
to find some non zero delta to multiply by box size.

This came up fairly recently, with a university math department admin
grumbling that cranky professors were beating him bloody.  Testing, I
couldn't confirm exactly what he was grumbling about (couldn't figure
out exactly what that was actually), but thinking about it combined
with what I was seeing made me too want to "fix" it by smacking it
squarely between the eyes with my BFH.  Turned out that it had grown a
wart though, isn't nearly as bad in the real world (defined as
measuring random generic stuff on my little box;) as idle pondering,
and measurement of slightly dinged up code had indicated.  Like
everything else, it cuts both ways.

	-Mike

1. IOW do NOT run highly specialized load in generic environment, it is
guaranteed to either suck rock or suck gigantic frick'n boulders.

  reply	other threads:[~2016-04-24  7:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-23 18:20 [RFC] The Linux Scheduler: a Decade of Wasted Cores Report Jeff Merkey
2016-04-24  1:38 ` Brendan Gregg
2016-04-24  7:05   ` Mike Galbraith [this message]
2016-04-25  9:18     ` Mike Galbraith
2016-04-27  7:09       ` [patch] sched: Fix smp nice induced group scheduling load distribution woes Mike Galbraith
2016-04-28  9:11         ` Peter Zijlstra
2016-04-28 12:29           ` Mike Galbraith
2016-04-25  9:34   ` [RFC] The Linux Scheduler: a Decade of Wasted Cores Report Peter Zijlstra
2016-04-25 17:54     ` Rik van Riel

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=1461481517.3835.125.camel@gmail.com \
    --to=umgwanakikbuti@gmail.com \
    --cc=brendan.d.gregg@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux.mdb@gmail.com \
    /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