[ltt-dev] [RFC git tree] Userspace RCU (urcu) for Linux (repost)

Paul E. McKenney paulmck at linux.vnet.ibm.com
Mon Feb 9 12:59:43 EST 2009


On Mon, Feb 09, 2009 at 06:45:05PM +0100, Bert Wesarg wrote:
> On Mon, Feb 9, 2009 at 18:40, Paul E. McKenney
> <paulmck at linux.vnet.ibm.com> wrote:
> > On Mon, Feb 09, 2009 at 06:35:38PM +0100, Bert Wesarg wrote:
> >> On Mon, Feb 9, 2009 at 18:34, Paul E. McKenney
> >> <paulmck at linux.vnet.ibm.com> wrote:
> >> > On Mon, Feb 09, 2009 at 06:19:45PM +0100, Bert Wesarg wrote:
> >> >> On Mon, Feb 9, 2009 at 14:16, Paul E. McKenney
> >> >> <paulmck at linux.vnet.ibm.com> wrote:
> >> >> > On Sun, Feb 08, 2009 at 11:53:52PM -0500, Mathieu Desnoyers wrote:
> >> >> >> Yes, I guess the signal is not so bad.
> >> >> >
> >> >> > Now if there were a /proc entry that listed out the tids of the
> >> >> > currently running threads, then it might be possible to do something,
> >> >> > especially for applications with many more threads than CPUs.
> >> >>
> >> >> Do you mean something like: `ls /proc/$pid/tasks/*`? Or is this not
> >> >> atomic enough?
> >> >
> >> > Won't that give me all the threads rather than only the ones currently
> >> > running?
> >>
> >> What do you mean by 'running'?
> >
> > Sitting on a CPU and executing, as opposed to blocked or preempted.
>
> Ok, me too.
> 
> > It is pretty easy to scan the running tasks within the kernel, but I
> > don't know of an efficient way to do it from user mode.  The only way
> > I know of would be to cat out the /proc/$pid/tasks/*/status (IIRC)
> > and look for the task state.
>
> Yes, me too.

I was afraid of that...  ;-)

Do you believe that something like a /proc/runningtids that listsd
currently running tasks be useful in general?  Or just to this algorithm?

							Thanx, Paul




More information about the lttng-dev mailing list