lkml.org 
[lkml]   [2006]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Register atomic_notifiers in atomic context
Alan Stern <stern@rowland.harvard.edu> wrote:
>
> The calls to register_cpu_notifier are harder. That chain really does
> need to be blocking

Why?

> which means we can't avoid calling down_write. The
> only solution I can think of is to use down_write_trylock in the
> blocking_notifier_chain_register and unregister routines, even though
> doing that is a crock.
>
> Or else change __down_read and __down_write to use spin_lock_irqsave
> instead of spin_lock_irq. What do you think would be best?

Nothing's pretty. Perhaps look at system_state and not do any locking at all
in early boot?

> > I'd suggest that in further development, you enable might_sleep() in early
> > boot - that would have caught such things..
>
> Not a bad idea. I presume that removing the "system_state ==
> SYSTEM_RUNNING" test in __might_sleep will have that effect?

Yup.
-
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: 2006-02-23 20:08    [W:0.093 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site