Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Bogdan Costescu (Bogdan.Costescu_at_[hidden])
Date: 2005-12-09 14:55:31


On Thu, 8 Dec 2005, Jeff Squyres wrote:

> Check out http://svn.open-mpi.org/svn/ompi/trunk/opal/mca/paffinity/
> linux/paffinity_linux.h -- there's a big comment in that file about
> the problem, to include descriptions of the 3 APIs.

I'm sorry, but that is not quite what I wrote about in my message. The
comments refer to the _glibc_ view of the functions, at least I
couldn't see how they map to my reading of the _kernel_ source code.
Let's take one that is specifically mentioned there: Mandrake 10.0,
kernel based on 2.6.3, in file kernel/sched.c there is the function:

/**
  * sys_sched_setaffinity - set the cpu affinity of a process
  * @pid: pid of the process
  * @len: length in bytes of the bitmask pointed to by user_mask_ptr
  * @user_mask_ptr: user-space pointer to the new cpu mask
  */
asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len,
                                       unsigned long __user *user_mask_ptr)

which again has 3 arguments that look exactly like the ones that I
mentioned previously. I don't have access to the source code of
the SGI Altix kernel, so I can't check the other one mentioned there
as a 2-args function. But so far all _kernel_ prototypes of the
function that I have looked at are exactly the same with 3 arguments.

The solution that I proposed works much like a statically linked
binary - it calls via a syscall the _kernel_ function that has a
constant (so far) prototype. It doesn't call the _glibc_ function that
changes prototype.

-- 
Bogdan Costescu
IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: Bogdan.Costescu_at_[hidden]