Open MPI logo

Hardware Locality Users' Mailing List Archives

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

Subject: Re: [hwloc-users] possible concurrency issue with reading /proc data on Linux
From: Samuel Thibault (samuel.thibault_at_[hidden])
Date: 2012-04-21 17:46:29


Vlad, le Sat 21 Apr 2012 23:37:11 +0200, a écrit :
> 433 /* take the number of links as a good estimate for the number of tids */
> 434 if (fstat(dirfd(taskdir), &sb) == 0)
> 435 max_tids = sb.st_nlink;
>
> "taskdir" here is /proc/<pid>/task, correct? In which case the threads will be
> doing readdir() on the same DIR stream...

No, each thread opens its own DIR in hwloc_linux_foreach_proc_tid.

Samuel