lkml.org 
[lkml]   [2002]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Notifier for significant events on i386
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 13:31    [W:0.084 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site