mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: paul.szabo@sydney.edu.au
To: umgwanakikbuti@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: CFS scheduler unfairly prefers pinned tasks
Date: Wed, 7 Oct 2015 07:44:16 +1100	[thread overview]
Message-ID: <201510062044.t96KiGXd021728@como.maths.usyd.edu.au> (raw)
In-Reply-To: <1444133838.2832.141.camel@gmail.com>

Dear Mike,

>> ... the CFS is meant to be fair, using things like vruntime
>> to preempt, and throttling. Why are those pinned tasks not preempted or
>> throttled?
>
> Imagine you own a 8192 CPU box for a moment, all CPUs having one pinned
> task, plus one extra unpinned task, and ponder what would have to happen
> in order to meet your utilization expectation. ...

Sorry but the kernel contradicts. As per my original report, things are
"fair" in the case of:
 - with CGROUP controls and the two kinds of processes run by
   different users, when there is just one un-pinned process
and that is so on my quad-core i5-3470 baby or my 32-core 4*E5-4627v2
server (and everywhere that I tested). The kernel is smart and gets it
right for one un-pinned process: why not for two?

Now re-testing further (on some machines with CGROUP): on the i5-3470
things are fair still with one un-pinned (become un-fair with two), on
the 4*E5-4627v2 are fair still with 4 un-pinned (become un-fair with 5).
Does this suggest that the kernel does things right within each physical
CPU, but breaks across several (or exact contrary)? Maybe not: on a
2*E5530 machine, things are fair with just one un-pinned and un-fair
with 2 already.

> What you're seeing is not a bug.  No task can occupy more than one CPU
> at a time, making space reservation on multiple CPUs a very bad idea.

I agree that pinning may be bad... should not the kernel penalize the
badly pinned processes?

Cheers, Paul

Paul Szabo   psz@maths.usyd.edu.au   http://www.maths.usyd.edu.au/u/psz/
School of Mathematics and Statistics   University of Sydney    Australia

  reply	other threads:[~2015-10-06 20:44 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-05 21:48 paul.szabo
2015-10-06  2:45 ` Mike Galbraith
2015-10-06 10:06   ` paul.szabo
2015-10-06 12:17     ` Mike Galbraith
2015-10-06 20:44       ` paul.szabo [this message]
2015-10-07  1:28         ` Mike Galbraith
2015-10-08  8:19   ` Mike Galbraith
2015-10-08 10:54     ` paul.szabo
2015-10-08 11:19       ` Peter Zijlstra
2015-10-10 13:22         ` [patch] sched: disable task group re-weighting on the desktop Mike Galbraith
2015-10-10 14:03           ` kbuild test robot
2015-10-10 14:41             ` Mike Galbraith
2015-10-10 17:01           ` Peter Zijlstra
2015-10-10 17:13             ` Peter Zijlstra
2015-10-11  2:25             ` Mike Galbraith
2015-10-11 17:42               ` 4.3 group scheduling regression Mike Galbraith
2015-10-12  7:23                 ` Peter Zijlstra
2015-10-12  7:44                   ` Mike Galbraith
2015-10-12  8:04                     ` Peter Zijlstra
2015-10-12  0:53                       ` Yuyang Du
2015-10-12  9:12                         ` Peter Zijlstra
2015-10-12  2:12                           ` Yuyang Du
2015-10-12 10:23                             ` Mike Galbraith
2015-10-12 19:55                               ` Yuyang Du
2015-10-13  4:08                                 ` Mike Galbraith
2015-10-12 20:42                                   ` Yuyang Du
2015-10-13  8:06                                 ` Peter Zijlstra
2015-10-13  0:35                                   ` Yuyang Du
2015-10-13  8:10                                   ` Peter Zijlstra
2015-10-13  0:37                                     ` Yuyang Du
2015-10-12 11:47                             ` Peter Zijlstra
2015-10-12 19:32                               ` Yuyang Du
2015-10-13  8:07                                 ` Peter Zijlstra
2015-10-13  2:22                               ` Mike Galbraith
2015-10-12  8:48                       ` Mike Galbraith
2015-10-10 20:14           ` [patch] sched: disable task group re-weighting on the desktop paul.szabo
2015-10-11  2:38             ` Mike Galbraith
2015-10-11  9:25               ` paul.szabo
2015-10-11 12:49                 ` Mike Galbraith
2015-10-11 19:46           ` paul.szabo
2015-10-12  1:59             ` Mike Galbraith
2015-10-08 14:25       ` CFS scheduler unfairly prefers pinned tasks Mike Galbraith
2015-10-08 21:55         ` paul.szabo
2015-10-09  1:56           ` Mike Galbraith
2015-10-09  2:40           ` Mike Galbraith
2015-10-11  9:43             ` paul.szabo
2015-10-10  3:59     ` Wanpeng Li
2015-10-10  7:58       ` Wanpeng Li
2015-10-11 20:59 paul.szabo

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=201510062044.t96KiGXd021728@como.maths.usyd.edu.au \
    --to=paul.szabo@sydney.edu.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=umgwanakikbuti@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

all inboxes | Powered by JetHome®