lkml.org 
[lkml]   [2001]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] cpus_allowed/launch_policy patch, 2.4.16
On Wed, 5 Dec 2001, Matthew Dobson wrote:

> pid_t enforce_launch_policy_fork() {
> pid_t pp = fork();
> if (pp == 0) {
> set_affinity(getpid(), get_affinity());
> ...
> }
> return pp;
> }
>
> but, as soon as one of them exec()'s their no longer going to be using your
> functions.

That's the point, cpus_allowed is automatically inherited by the child in
kernel/fork.c
So once you spawn a child with the proposed function, all its dinasty (
if it's not explicitly changed ) will have the same cpu affinity.




- Davide


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.071 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site