From: Paul Jackson <pj@sgi.com>
To: Nathan Lynch <ntl@pobox.com>
Cc: mingo@elte.hu, steiner@sgi.com, linux-kernel@vger.kernel.org,
rml@novell.com, akpm@osdl.org
Subject: Re: 2.6.16 - sys_sched_getaffinity & hotplug
Date: Sat, 28 Jan 2006 12:06:20 -0800 [thread overview]
Message-ID: <20060128120620.00be8227.pj@sgi.com> (raw)
In-Reply-To: <20060128192736.GD18730@localhost.localdomain>
Nathan wrote:
> Task finishes work and does sched_setaffinity(saved_mask).
Stupid task. If task wants to run on -all- cpus on a
hotplug system, task should not pass a saved mask, but
rather construct a mask with all bits set and pass that:
cpu_set_t mask;
unsigned int i;
/* set all bits in mask - code totally untested */
for (i = 0; i < sizeof(cpu_set_t) / sizeof (__cpu_mask); i++)
mask.__bits[i] = ~0;
sched_setaffinity(&mask);
Similar problems exist for a task running in a cpuset under
migration. Saved masks are useless in all but static systems,
having no migration, no hotplug.
That, or use a library on top of this that lets the task work
with relative (to whatever is available) CPU and (for the
mbind/mempolicy calls) Memory Node numbers and that handles
the above details. If all goes well, I should be releasing
such a library in the not distant future.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401
next prev parent reply other threads:[~2006-01-28 20:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-27 23:06 2.6.16 - sys_sched_getaffinity & hotplug Jack Steiner
2006-01-28 2:58 ` Nathan Lynch
2006-01-29 13:06 ` Jack Steiner
2006-01-28 3:14 ` Paul Jackson
2006-01-28 3:42 ` Nathan Lynch
2006-01-28 4:58 ` Paul Jackson
2006-01-28 5:23 ` Nathan Lynch
2006-01-28 6:40 ` Paul Jackson
2006-01-28 7:04 ` Paul Jackson
2006-01-28 13:32 ` Ingo Molnar
2006-01-28 16:08 ` Jack Steiner
2006-01-28 19:27 ` Nathan Lynch
2006-01-28 20:06 ` Paul Jackson [this message]
2006-01-29 13:51 ` [PATCH] " Jack Steiner
2006-01-28 20:09 ` 2.6.16 " Paul Jackson
2006-01-28 20:50 ` Robert Love
2006-01-28 21:00 ` Paul Jackson
2006-01-29 13:01 ` Ingo Molnar
2006-01-29 16:09 ` Robert Love
2006-01-29 17:26 ` Paul Jackson
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=20060128120620.00be8227.pj@sgi.com \
--to=pj@sgi.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=ntl@pobox.com \
--cc=rml@novell.com \
--cc=steiner@sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.