Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 5 Dec 2001 21:29:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 5 Dec 2001 21:28:59 -0500 Received: from mail.xmailserver.org ([208.129.208.52]:43791 "EHLO mail.xmailserver.org") by vger.kernel.org with ESMTP id ; Wed, 5 Dec 2001 21:28:54 -0500 Date: Wed, 5 Dec 2001 18:39:55 -0800 (PST) From: Davide Libenzi X-X-Sender: davide@blue1.dev.mcafeelabs.com To: Matthew Dobson cc: lkml Subject: Re: [RFC][PATCH] cpus_allowed/launch_policy patch, 2.4.16 In-Reply-To: <3C0ED52E.B15F0ED7@us.ibm.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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/