mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Phil Endecott" <phil_wueww_endecott@chezphil.org>
To: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: nice and hyperthreading on atom
Date: Sat, 06 Sep 2008 19:24:39 +0100	[thread overview]
Message-ID: <1220725479644@dmwebmail.dmwebmail.chezphil.org> (raw)
In-Reply-To: <20080906094248.5930911a@infradead.org>

Arjan van de Ven writes:
>> Phil Endecott wrote:
>> Dear Experts,
>>
>> I have an ASUS Eee with an Atom processor, which has hyperthreading 
>> enabled.  If I have two processes, one nice and the other normal, they 
>> each get 50% of the CPU time.  Of course this is what you'd expect if 
>> the scheduler didn't understand that the two virtual processors are not 
>> really independent.  I'd like to fix it.
>
> but you cannot imfluence the cpu's scheduling of the instructions.
> 
> As an OS one COULD decide to just not schedule the nice task at all,
> but then, especially on atom where HT has a high efficiency, your cpu
> is mostly idle ...

Here's how I imagine it: say I have one regular task and one "nice -9" 
task.  On a conventional uniprocessor system they would get about 90% 
and 10% of the CPU respectively.  On the hyperthreadng system they 
currently get equal shares; except that the CPU is more efficient with 
two threads running, so you could perhaps say that they get 60% each or 
something like that.  But 60% is still less than 90%, and I don't want 
my foreground interactive task being slowed down that much by this 
niced task.  So I envisage the system spending 20% of its time running 
both tasks and the remaining 80% of the time running just the 
higher-priority task.  That way, I get half of 20% = 10% spent on the 
nice task and half of 20% plus 80% = 90% spent on the foreground task.  
(Or maybe something like 12% + 92%, allowing for the hyperthreading efficiency.)

Here's a link to Con Kolivas' post where he described something like 
this back in 2004:

   http://thread.gmane.org/gmane.linux.kernel/178090/focus=178882


Phil.




  reply	other threads:[~2008-09-06 18:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-06 15:43 Phil Endecott
2008-09-06 16:31 ` Peter Zijlstra
2008-09-06 16:42 ` Arjan van de Ven
2008-09-06 18:24   ` Phil Endecott [this message]
2008-09-06 18:30   ` Ulrich Drepper
2008-09-07  9:34     ` Peter Zijlstra
2008-09-07 13:58 ` Phil Endecott
2008-09-08  1:09   ` Bill Davidsen

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=1220725479644@dmwebmail.dmwebmail.chezphil.org \
    --to=phil_wueww_endecott@chezphil.org \
    --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

all inboxes | Powered by JetHome®