Re: [RFC PATCH 0/3] sysfs: allow suicide

From: Cornelia Huck
Date: Thu Mar 26 2009 - 10:56:24 EST


On Thu, 26 Mar 2009 10:21:23 -0400 (EDT),
Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:

> The idea is that this would come in useful both for suicidal sysfs
> attributes and for hot-unplug events detected by an interrupt handler.

Yes; the ccw bus uses it's own workqueue, so it doesn't need
device_schedule_callback() to commit suicide. I guess other busses
could do the same.

>
> But there's something I'm not clear on. If hot-unplug events are
> detected by an interrupt handler, then what about hot-plug events?
> Wouldn't they be detected by the same interrupt handler? Obviously you
> can't register new devices in interrupt context, so there must be a
> workqueue or kernel thread involved somewhere. Shouldn't the two types
> of events be managed by the same workqueue/thread?

They should, you want to serialize plug/unplug. You'll even want to use
the same queue for plug/unplug not detected in interrupt context.

The next question is how granular those workqueues should be. Per
subsystem? Per bus? Something else?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/