lkml.org 
[lkml]   [2005]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC,PATCH] RCUify single-thread case of clock_gettime()
On Mon, 31 Oct 2005, Paul E. McKenney wrote:
>
> The attached patch uses RCU to avoid the need to acquire tasklist_lock
> in the single-thread case of clock_gettime(). Still acquires tasklist_lock
> when asking for the time of a (potentially multithreaded) process.
>
> Experimental, has been touch-tested on x86 and POWER. Requires RCU on
> task_struct. Further more focused testing in progress.
>
> Thoughts? (Why? Some off-list users want to be able to monitor CPU
> consumption of specific threads. They need to do so quite frequently,
> so acquiring tasklist_lock is inappropriate.)

Not my area at all, but this looks really dodgy to me, Paul:
could you explain it further?

First off, I don't see what's "RCU" about it at all. Essentially,
you're replacing read_lock(&tasklist_lock) by preempt_disable(),
but calling it by the fancier rcu_read_lock() alias. I thought there
would need to be some more infrastructure to make this RCU and safe?

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-31 19:12    [W:0.104 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site