[Devel] Re: [PATCH] mtd_blkdevs: Convert to use the kthread API
Christoph Hellwig
hch at infradead.org
Sun Apr 22 12:26:46 PDT 2007
On Sun, Apr 22, 2007 at 02:23:00PM +0100, David Woodhouse wrote:
> On Sun, 2007-04-22 at 13:24 +0100, Christoph Hellwig wrote:
> > This is the full conversion I sent to Dave in April 2006, but never
> > got any feedback to:
>
> Sorry about that; I need prodding sometimes. I'll provide some now...
>
> Can you show me why the thread won't now miss a wakeup if it goes to
> sleep just as a new request is added to its queue?
Exactly the same thing that happened before. If you look at
wake_up_process it's just a tiny wrapper around try_to_wake_up.
And wake_up expands to __wake_up expaneds to __wake_up_common
which just walks the list of threads attached to the waitqueue
and then calls curr->func, which expands to try_to_wake_up.
So when your thread still is in running state nothing changes.
If your thread is not in running state it'll get woken by both
variants.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list