public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: don fisher <dfisher@as.arizona.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: sched_setaffinity(), RT priorities and migration thread usage at 30%
Date: Tue, 07 Sep 2004 09:12:54 +1000	[thread overview]
Message-ID: <413CEEF6.6080501@yahoo.com.au> (raw)
In-Reply-To: <413CE863.3050400@as.arizona.edu>

don fisher wrote:
> Hello,
> 
> Apologies in advance if this is a newbie question. I am attempting to 
> write a real-time simulation of an application we have in house. I have 
> a dual processor SMP system, hyperthreading enabled, running kernel 2.6.7.
> 
> The first thread begins at priority 1 (SCHED_RR) and subsequently spawns 
> another time critical task running at priority 2. The initial thread 
> uses setaffinity to set the desired cpu to 2. When the second task 
> begins, the migration thread becomes 30% active (as reported by top) for 
> the duration of its execution. When the priority 2 thread terminates the 
> first thread continues with the migration task consuming only 2% of the 
> CPU.
> 
> If there was any change, I was expecting that the higher priority of the 
> second thread would cause it to execute closer to 100% CPU. I built a 
> test code where each thread computes an identical dumb timing loop. The 
> priority 2 thread ends up executing 30% slower than the priority 1 
> thread due to contention with the migration thread.
> 
> Is this the expected behavior, and if so could you please inform me why? 
> I had not anticipated the any attempt by the kernel to shift the process 
> to another CPU, since sched_setafinity had been applied.
> 

OK I'll have to put something in that doesn't class the balancing
attempt as a failure if it encounters tasks that aren't allowed to
be moved.

      parent reply	other threads:[~2004-09-06 23:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-06 22:44 sched_setaffinity(), RT priorities and migration thread usage at 30% don fisher
2004-09-06 22:59 ` Con Kolivas
2004-09-06 23:12 ` Nick Piggin [this message]

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=413CEEF6.6080501@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=dfisher@as.arizona.edu \
    --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