Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] [hwloc-svn] svn:hwloc r1333
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2009-11-12 12:08:45

On Nov 12, 2009, at 8:44 AM, Samuel Thibault wrote:

> I'm not saying pinning a specific thread is a horror. I'm saying
> expressing which thread should be bound through tids instead of
> pthread_t is. The only sane way I could see an application use tids
> is a monitoring application that looks into /proc/*/task/* . In that
> case, ok we can expose the hwloc_linux_set_tid_cpubind function in a
> hwloc/linux.h header, and we need it for complete PLPA support anyway.
> What I'm against is even mentioning such thing in the main hwloc.h;
> tid
> vs pid vs pthread_t has been confused enough by Linus before the 2.6
> fix
> (to the point that I still see parallel programming courses explaining
> the 2.4 semantic...)

Fair enough. I think we actually agree -- these emails are quite
confusing. :-)

1. Let's not mix thread and PIDs into a single argument like Linux does
2. Binding individual threads is a Good/useful thing
3. Identifying threads by pthread_self() is Good (is that available on
all OS's that we care about?)

More specifically: IMHO, it would be very nice/useful to be able to get
+set the affinity of threads other than the current thread (as
identified by pthread_self()), even if that only works on some OS's.

Jeff Squyres