----- Original Message ----- 
From: "Julian Elischer" <[EMAIL PROTECTED]>
To: "David Xu" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, July 04, 2002 4:36 PM
Subject: Re: Timeout and SMP race

> 
> 
> On Thu, 4 Jul 2002, David Xu wrote:
> 
> > while we are getting rid of Giant,  current race condition between softclock()
> > and callout_stop() is unacceptable. the race causes two many places in source
> > code would be modified to fit this new behaviour,  besides this, everywhere 
> > callout_stop() is used need to hold sched_lock and do a mi_switch() and
> > modify td_flags is also unacceptable, this SMP race should be resolved in 
> > kern_timeout.c.  
> > 
> > David Xu
> 
> This is probably true..
> the current hacks for this are rather horrible. I think there msut be
> better ways. Your suggestion sounds plausible.
> 
> 

if another thread other than softclock itself is calling callout_stop(),
and callout_stop() detected that softclock is currently running the 
callout,  it should wait until softclock finishes the work, then return.

-David Xu



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to