[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-kernel
Subject: Re: [PATCH 1/2] kthread_create
From: Rusty Russell <rusty () rustcorp ! com ! au>
Date: 2003-12-31 23:25:38
Message-ID: 20040101233438.1A0822C05A () lists ! samba ! org
[Download RAW message or body]
In message <Pine.LNX.4.44.0312302255080.1457-100000@bigblue.dev.mdolabs.com> you write:
> On Wed, 31 Dec 2003, Srivatsa Vaddagiri wrote:
>
> > 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.
My original version used barriers. But IMHO if you're using barriers
and your code isn't speed-critical, you don't have enough locks.
So I just threw a spinlock around the struct, and no more barrier
issues.
Cheers,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
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/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic