Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 2002 13:28:09 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Archie Cobbs <archie@dellroad.org>
Cc:        David Xu <davidx@viasoft.com.cn>, freebsd-current@FreeBSD.org, Julian Elischer <julian@elischer.org>
Subject:   Re: Timeout and SMP race
Message-ID:  <XFMail.20020710132809.jhb@FreeBSD.org>
In-Reply-To: <200207101616.g6AGG4T28124@arch20m.dellroad.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 10-Jul-2002 Archie Cobbs wrote:
> John Baldwin writes:
>> It is the same problem. What we do is change callout_stop() to let you know if
>> it actually stopped the timeout or not.  You then have to use your own locking
>> and synchronization in the timeout function and yourself to close the rest of
>> the race.
> 
> OK, thanks.
> 
> What do you think of the idea of letting the timer code (optionally)
> handle all the locking and race conditions?

I'm not sure it can in a clean fashion since of the few cases I've known
so far each client needs a customized solution.  I am open to ideas though.
I'm also open to some redesign of how callouts work to begin with (maybe
using other threads than the one running softclock() to actually execute
callout handlers, etc.).

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020710132809.jhb>