Messages in this thread | | | Date | Mon, 31 Oct 2005 18:08:51 +0000 (GMT) | From | Hugh Dickins <> | Subject | Re: [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/
| |