![]() | ||||||||||
Messages in this thread |
On Thu, Dec 12, 2002 at 12:25:47AM +0000, Stephen Hemminger wrote: > This patch changes notifier to use RCU. No interface change, just a little > more memory in each notifier_block. Also some formatting cleanup. > Please review and give comments. > > <snip patch> This looks good. I have a few of comments: - add read_lock_rcu() / read_unlock_rcu() around the loop in notifier_call_chain() to be preempt-safe. - I would suggest using struct list_head in the notifier_block and use the RCU list routines from include/linux/list.h instead of spreading subtle RCU memory-barrier black magic. - Even though RCU list reading is lockless, premption needs to be disabled while reading as mentioned above. So, we do need an __notifier_call_chain() version for those handlers that could sleep inside the handler: they will have to handle the required locking themselves. -- Vamsi Krishna S. Linux Technology Center, IBM Software Lab, Bangalore. Ph: +91 80 5044959 Internet: vamsi@in.ibm.com - 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-03-22 11:31 [W:0.992 / U:0.030 seconds] ©2003-2008 Jasper Spaans | ||||||||||