kthread_exit(9) unexpectedness
Lawrence Stewart
lstewart at freebsd.org
Wed Nov 19 16:38:36 PST 2008
Lawrence Stewart wrote:
> Julian Elischer wrote:
>> Lawrence Stewart wrote:
>>
[snip]
>
>>
>>>
>>> On the other, we have the 7.x documented behaviour which is correct,
>>> but the actual behaviour of the code (which is historically
>>> consistent) is incorrect and at odds with the 8.x behaviour.
>>
>> in 7.x nearly everything uses kproc... so we could probably safely
>> change it now.
>
> We could definitely change it for all in tree cases easily enough. My
> concern is out of tree code. This change would make any out of tree code
> that relies on the actually implemented wakeup() mechanism potentially
> deadlock, which is not nice. We could argue that the documented
> behaviour is correct and that we're correcting a bug with the fix...
> still, tis cold comfort for anyone who's working code now deadlocks.
>
> I do like the maintenance simplicity the change would bring moving forward.
>
> I'm still not sure the code change is the best idea. Does anyone else
> have thoughts on the matter?
>
[snip]
*slaps forehead*
So, it just occurred to me through my mid-morning mental haze after a
chat with attilio@ that we should just call wakeup() on both the *proc
_and_ *thread in 7.x and be done with it. It doesn't hurt anyone,
maintains the current behaviour, ensures we're living up to our
documented KPI of delivering a wakeup on the thread handle and resolves
the compatibility issues between 7.x and 8.x in this respect - no
potential deadlocks is good++.
I'll have a go at a patch for code + man pages shortly.
Cheers,
Lawrence
More information about the freebsd-arch
mailing list