		  Processor Affinity Module (v. 0.2.2)
		  ====================================

** NOTE: This module is no longer supported. It was only useful prior to kernel
	 2.4.18. Robert Love's patches are the current means to have processor
	 affinity. 
				   
Content
--------
 1. Introduction
 2. How to install
 3. License
 4. Usage
 5. Reporting Bugs
 6. Author
 7. Addendum

1.  Introduction
----------------

This is little module to interface to the cpus_allowed data field in
Linux task_struct.  This field is a bit mask indicating which cpus the
process is permitted to execute on.  Our purpose for writing this
module is to have a way to align a process to a processor on an
already existing system; which has not been patched to provide this
capability.  Until processor pinning is in the main stream kernel,
this small module may be of some use.  In essence, we just took Robert
Love's cpu_allowed patch and made it a module.  You interface using
ioctl() calls through our character driver.  An example program in the 
example/ directory creates wrapper functions around the ioctl calls.

2. How to install
-----------------
$ gunzip -c affinity.xx.xx.tgz | tar -xvf -
$ cd cpu-affinity.xxx
$ ./configure 
  If configure can't find where your kernel sources are to build the module
  against, you may need to specify using the --with-kernel variable.  Use
  ./configure --help for assistance.
$ make 
$ make install
$ affinity_load

Now you have a module named cpu_affinity.o in the module/ directory and
an example program which uses the mode in the example/ directory.

3. License
----------
GNU General Public License (GPL)
Version 2, June 1991.  The full text of the GPL is located at:
http://www.gnu.org/licenses/gpl.html

4. Usage
--------
After loading the cpu_affinity.o module via /sbin/insmod or the
affinity_load script, you can use the example program found in
the example/ directory to see how it works.  The example program has
two functions.  First, it allows you to align a the process to a cpu
and then (optionally) it does some sort of busy work so that you can
see it running on the correct cpu by running /usr/bin/top.  Second,
the program allows you to control the processor affinity of other
processes.  The code in affinicy.c should serve as a model for you
coding to your particular needs.

5. Reporting Bugs
-----------------
Direct all bugs to linux-diag@lists.sourceforge.net.

6. Author
---------
David Oleszkiewicz <davole@us.ibm.com>
Daniel Stekloff <dsteklof@us.ibm.com>
Nitin Vashisth <vnitin@us.ibm.com>

7. Addendum
-----------
Ingo's new scheduler in the more recent 2.5 series kernel ignores the
cpus_allowed field in the the task_struct, thus making this module
in-effective.
As of prepatch 2.5.8-pre3 Robert Love's cpu_affinity system calls have been 
added, thus obviating this module beyond that kernel version.

-------------------------------------------------------------------------------
Thu Apr 11 09:23:43 PDT 2002








