Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2008 10:38:38 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Jeff Roberson <jroberson@chesapeake.net>
Cc:        Brooks Davis <brooks@freebsd.org>, Andrew Gallatin <gallatin@cs.duke.edu>, Alfred Perlstein <alfred@freebsd.org>, arch@freebsd.org, Robert Watson <rwatson@freebsd.org>, David Xu <davidxu@freebsd.org>
Subject:   Re: cpuset and affinity implementation
Message-ID:  <Pine.GSO.4.64.0802261021560.8556@sea.ntplx.net>
In-Reply-To: <20080225213434.L920@desktop>
References:  <20080220175532.Q920@desktop> <20080220213253.A920@desktop> <20080221092011.J52922@fledge.watson.org> <20080222121253.N920@desktop> <20080222231245.GA28788@lor.one-eyed-alien.net> <20080222134923.M920@desktop> <20080223194047.GB38485@lor.one-eyed-alien.net> <20080223111659.K920@desktop> <20080223213507.GD39699@lor.one-eyed-alien.net> <20080224001902.J920@desktop> <20080225231747.GT99258@elvis.mu.org> <20080225143222.B920@desktop> <Pine.GSO.4.64.0802252003060.3971@sea.ntplx.net> <20080225160433.P920@desktop> <Pine.GSO.4.64.0802252110280.3971@sea.ntplx.net> <20080225194320.V920@desktop> <Pine.GSO.4.64.0802260121160.6723@sea.ntplx.net> <20080225213434.L920@desktop>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 25 Feb 2008, Jeff Roberson wrote:

> Binding a processor set to the process simply sets the per-thread binding of 
> each thread in the process.  There is otherwise no specific process binding. 
> We could keep a pointer to the last specifically bound set in the process if 
> we wanted, but what would it be used for other than querying the id of the 
> process?  What if each thread was seperately specifically bound to a 
> different set?  What set should be used on fork? The set of the process or 
> the thread that called fork?  What about when creating a new thread?

The set used on fork should be the set of the calling thread,
same concept as signal masks I would think.  Same thing when
creating a new thread.  I guess I'd check how Linux and Solaris
do it, see if they are consistent.

I can see how you might _not_ want to inherit bindings in a
created thread.  For a process with real-time threads, the
application might start with superuser privileges, create some
threads with real-time priority and set their bindings, then
setuid() to remove superuser privileges.  Is a privilege check
made in a newly created thread when applying inherited bindings?

> See above discussion.  I'm not sure what you mean by 'default' cpuset here.

I imagine the 'default' cpuset as the system's default cpuset,
in lieu of any administratively created cpusets and bindings
for the process (inherited or explicit).

-- 
DE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0802261021560.8556>