Re: [PATCH 1/2] kthread_create

From: Davide Libenzi
Date: Wed Dec 31 2003 - 02:21:38 EST


On Wed, 31 Dec 2003, Srivatsa Vaddagiri wrote:

> On Tue, Dec 30, 2003 at 09:56:05PM -0800, Davide Libenzi wrote:
> > Also, what happens in the task woke up by a send does not reschedule
> > before another CPU does another send? Wouldn't a message be lost?
> >
>
> The messages should not be lost because we take the cpucontrol
> semaphore in kthread_start or kthread_destroy before sending
> a (start or destroy) message.

I see, ok. At that point though, having the message struct inside the task
struct could save the *to pointer and (because of the big lock above), using
barrier and proper order in setting *from and *info, the spin lock. OTOH
the big lock above really make the global message structure private, so it
does not make much difference.



- Davide







-
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/