Date: Mon, 08 Jul 2002 15:27:38 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: David Xu <bsddiy@yahoo.com> Cc: freebsd-current@FreeBSD.ORG, julian@elischer.org, Bruce Evans <bde@zeta.org.au> Subject: Re: Timeout and SMP race Message-ID: <XFMail.20020708152738.jhb@FreeBSD.org> In-Reply-To: <20020704132044.7338.qmail@web20909.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 04-Jul-2002 David Xu wrote: > in RELENG_4, when one calls callout_stop() (not nested in softclock execute > path > , I am not talking about this case), after it returns, he can believe that the > callout is truely stopped, however in CURRENT, this assumption is false, now we > > must care if callout_stop() truely stopped the callout when it returned, this > is all difference I see, we bring in this race which not exists in RELENG_4, > see what hacking code put in kern_condvar.c and kern_synch.c in CURRENT source, In 4.x we don't support concurrent threads in the kernel either, so of course we have new races to deal with. Unfortunately there is no good way to reliably try to synchronize callout_stop() with softclock(). The callout function may reuse the callout structure associated with it, so we can't use that callout structure to save any state across the call. -- 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.20020708152738.jhb>