svn commit: r296320 - in head/sys: kern sys
Hans Petter Selasky
hps at selasky.org
Thu Mar 3 11:38:40 UTC 2016
On 03/03/16 12:27, Konstantin Belousov wrote:
> On Thu, Mar 03, 2016 at 11:59:36AM +0100, Hans Petter Selasky wrote:
>> >I believe all of these callout quirks can be avoided by using a spinlock
>> >to proctect the thread callout like done in projects/hps_head. Has
>> >anyone tried to reproduce the issue with projects/hps_head, before
>> >making this patch?
> I did not looked at your branch, but I do not like this coupling between
> callbacks and thread locks. Even more, this probably cannot make work
> since thread lock is not some fixed lock at all, and introducing one
> more spinlock for the coupling is excessive.
>
Hi,
My thought about this is that the condition in question is rather rare,
and we can trade the addition thread sleep state with a spin lock. My
good feeling is that a spin-lock will be better off than the task-switch
for this rare case.
To implement my approach it requires some minor updating that
callout_init_mtx() will accept a spin-lock type mutex.
--HPS
More information about the svn-src-head
mailing list