Messages in this thread | | | Date | Thu, 23 Feb 2006 11:03:50 -0800 | From | Andrew Morton <> | Subject | Re: [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/
| |