Date: Mon, 25 Feb 2008 17:33:15 -0600 From: Brooks Davis <brooks@freebsd.org> To: Jeff Roberson <jroberson@chesapeake.net> Cc: current@freebsd.org Subject: Re: cpuset and affinity implementation Message-ID: <20080225233315.GA59569@lor.one-eyed-alien.net> In-Reply-To: <20080224173229.I920@desktop> References: <20080224173229.I920@desktop>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Sun, Feb 24, 2008 at 05:38:37PM -1000, Jeff Roberson wrote: > Hello, > > I have implemented a new api similar to processors sets on solaris. This > allows you to assign processes to sets of cpus and dynamically change those > sets. This is useful for provisioning purposes to add and remove cpu > resources for a particular process or group of processes. This new > facility also supports binding secific threads to specific cpus which some > applications may want to do. At some point in the future this will be > integrated with jail so you can restrict the cpus any jail is allowed to > use. > > This api should not be considered final and the 'cpuset' tool is quite > rough. This also only works with ULE and is unfortunately intertwined with > a big ULE patch I've been working on. The set management code is generic > but 4BSD doesn't contain the hooks to actually constrain threads. I took a look at the patch this morning. The API looks like it's capable of doing what I need, at least at a first pass. It looks like I should be able to implement the semantics currently employed by the Sun Grid Engine scheduler on Irix systems. The one thing I noticed that I found worrying was the recursion in cpuset_(test)update(). It wasn't immediately clear to me there there is anything to would prevent an arbitrarily deep hierarchy from being created and blowing the kernel stack. I'm I missing something? -- Brooks [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFHw1A6XY6L6fI4GtQRAt7RAJ9EXhkn7LZ2Lm7hKowce3NqNiv02ACg1aZf Tauye9p9tvkOzlAnM35sk0Y= =wuVu -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080225233315.GA59569>
