public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Con Kolivas <kernel@kolivas.org>
To: bert hubert <ahu@ds9a.nl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: BUG in ht-aware scheduler/nice in 2.6.7-rc2 on dual xeon
Date: Mon, 7 Jun 2004 19:03:57 +1000	[thread overview]
Message-ID: <200406071903.57648.kernel@kolivas.org> (raw)
In-Reply-To: <20040607085625.GA11276@outpost.ds9a.nl>

On Mon, 7 Jun 2004 18:56, bert hubert wrote:
> Con, Ingo, List,
>
> I'm overjoyed with decent ht-aware scheduling in 2.6.7-rc2 and it does
> mostly the right thing. However, the 'nice' work by Con shows some slight
> problems.
>
> Please find attached program 'eat-time.cc'. Make sure not to compile it
> with -O which might confuse things as this program basically does nothing.
>
> Run it without arguments to determine the speed of 1 cpu, it outputs a
> number (megaloops/second). Then start it with that number as a parameter:
>
> Sample:
>
> $ ./eat-time
> 592
> $ ./eat-time 592
> 99%
> 99%
> 100%
> etc
>
> Now starting four of these at the same time gives the desired result:
>
> $ ./eat-time 592 & ./eat-time 592 & ./eat-time 592 & ./eat-time 592
> 50%
> 50%
> 50%
> 50%
> etc
>
> This however:
>
> $ ./eat-time 592 & ./eat-time 592 &
> 100%
> 99%
> In another xterm:
> $ nice -n +19 ./eat-time 592 & nice -n +19 ./eat-time 592
> 5%
> 5%
> 5%
>
> Fails sometimes, with all processes getting 50%. The above 'screenshot' is
> from the working and expected situation, which happens most of the time.
>
> When it goes wrong, top shows me that Cpu0 and Cpu1 are 100% user, while
> Cpu2 and Cpu3 are both 100% nice.  The niced processes show up in top as
> PRiority 39, the unniced ones (NI = 0) as PR 25.

This is just because the scheduler balancing is not aware of nice and when two 
same niceness tasks are on the same physical core they get equal shares. The 
ht-aware nice only works at keeping different nice values on the same 
physical core fair. There is no more that can be done using the current ht 
aware mechanism; a far more complicated balancing algorithm that takes nice 
into account would be required.

Con

  reply	other threads:[~2004-06-07  9:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-07  8:56 BUG in ht-aware scheduler/nice in 2.6.7-rc2 on dual xeon bert hubert
2004-06-07  9:03 ` Con Kolivas [this message]
2004-06-07  9:13 ` Nick Piggin

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=200406071903.57648.kernel@kolivas.org \
    --to=kernel@kolivas.org \
    --cc=ahu@ds9a.nl \
    --cc=linux-kernel@vger.kernel.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