PSET - Processor Sets for the Linux kernel http://isunix.it.ilstu.edu/~thockin/pset/ Tim Hockin Released under the GNU Public License Copyright 1998-1999 Tim Hockin Portions Copyright 1996 Stuart Herbert Just a few notes about this, so I can make it available. -------------------------------------------------------- This project has undergone a complete, from-scratch rewrite since v0.5x. If you are using a version earlier than 0.60, I encourage you to get to at LEAST 0.60. If you are using anything less than the latest, I reccomend you get the latest :) The goal of this project is to make a source compatible and functionally equivalent version of pset (as defined by SGI - partially removed from their IRIX kernel 6.4 and up) for Linux. This enables users to determine which processor or set of processors a process may run on. Possible uses include forcing threads to seperate processors, timings, and probably more. It is focused around the syscall sysmp(). This function takes a number of parameters that determine which function is requested. Functions include: * binding a process/thread to a specific CPU * restricting a CPU's ability to execute some processes * restricting a CPU from running at all * forcing a cpu to run _only_ one process (and its children) * getting information about a CPU's state * creating/destroying sets of processors, to which processes may be bound The TODO file contains things I'd like to see done, fixed, or just notes to myself. The userspace library should be partially done, and work OK. I want to implement library routines that act as wrappers, providing the functionality and API found in SCO/Solaris/..., DEC UNIX, AIX, etc. There are a lot of things that are not done, that are not working quite right, and that are questionable. I've tried to mark all these areas of code with "FIXME", so they can be easily found (and fixed/answered). The BUGS file contans bugs that I know about but didn't/couldn't fix yet. If you can answer my outstanding questions, fix my problems, make my code better, please do. Send bugs (and patches) to me (Tim Hockin) at thockin@isunix.it.ilstu.edu. The home site for the tools and patches is http://isunix.it.ilstu.edu/~thockin/pset/ If you have features you would like to see, or comments, or patches, or gripes, or whatever - send them to me. I'd like to see this go mainstream, and become much better than SGI originally intended. I know some parts of it need to be ported to architectures other than i386, but I don't have expertise or available test equipment in those areas. Help? I no longer include Pset-0.58 (obslete) kernel patches. I recommend that if you need them (for some godforsaken reason) let me know and we can deal with it. I also no longer include the original pset-kit-0.3 that started me on this project. Pretty much EVERYTHING has changed since then and I didn't see the point any longer. It is, of course, still available if you want it. Tim thockin@isunix.it.ilstu.edu Things I have changed or guessed at from SGI's docs: ------------------------------------------------------------------- MP_RESTRICT - remove a CPU from the master set MP_EMPOWER - add a CPU back to the master set MP_ISOLATE - remove a CPU from ALL psets but it's own MP_UNISOLATE - add a CPU back to all sets it was previously in MP_DISABLE - remove a CPU from ALL psets MP_ENABLE - place a CPU back in its own set and the master set MP_NONPREEMPTIVE - disable an isolated CPU, and run a process on it. MP_PREEMPTIVE - return a NONPREEMPTIVE CPU to normal status MP_CURPROC - return the current CPU for this process DISCLAIMER ---------- All standard disclaimers, blah blah blah. This is not guaranteed to be useful, or to even work. There is no warrantee, not even that of fitness for a purpose. For all I know, your system will blow up. It hasn't happened yet, but it could. It's not my fault. :)