From: Robert Love <rml@tech9.net>
To: "Aneesh Kumar K.V" <aneesh.kumar@digital.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 2.5: task cpu affinity syscalls
Date: 11 Apr 2002 15:00:03 -0400 [thread overview]
Message-ID: <1018551604.6524.215.camel@phantasy> (raw)
In-Reply-To: <1018535032.19511.75.camel@satan.xko.dec.com>
On Thu, 2002-04-11 at 10:23, Aneesh Kumar K.V wrote:
> Now that we have API that allow a process to say I would like to go to
> these CPU, Are there any API's available that will allow a CPU to say I
> will take only these process. ( Resource Affinity domains ? )
First, the Linux scheduler is not really designed to do this. It's cpu
affinity works on a per-process basis and in fact needs to explicitly
move CPUs from each CPU. Second, we could probably do this in userspace
using the exported sched_setaffinity syscall (just loop over all tasks,
setting the affinity as-needed).
There is a problem, though. In 2.5 with the O(1) scheduler, if the
process is not currently running on an allowed CPU when it is affined,
it must be forced off to a legal CPU via the migration threads. This is
expensive and complex and _not_ something we want to do to every process
on the system.
For this reason, and because I honestly favor the simple interfaces I
wrote, I think we should stick with just the exported interfaces we
currently have.
This isn't to say we could not do this in userspace - it would not be
hard (but still gross to move mass processes around). We could also
have a version of init that affines itself on boot, thereby having every
other process likewise affined. Then explicitly move away those
processes we want elsewhere. This is cheap and easy.
Robert Love
next prev parent reply other threads:[~2002-04-11 19:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-11 14:23 [PATCH] 2.5: task cpu affinity syscalls Aneesh Kumar K.V
2002-04-11 19:00 ` Robert Love [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-04-08 14:17 Robert Love
2002-04-12 3:34 ` Anton Blanchard
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=1018551604.6524.215.camel@phantasy \
--to=rml@tech9.net \
--cc=aneesh.kumar@digital.com \
--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