PERFORCE change 81809 for review

John Baldwin jhb at FreeBSD.org
Thu Aug 11 15:35:57 GMT 2005


On Wednesday 10 August 2005 06:38 pm, Sam Leffler wrote:
> http://perforce.freebsd.org/chv.cgi?CH=81809
>
> Change 81809 by sam at sam_ebb on 2005/08/10 22:37:39
>
> 	Bandaid deadlock: on tx timeout we're in the callout callback
> 	when we clock the state machine, but this results in a call
> 	to callout_drain which blocks because the callout is active.
> 	Workaround for now is to use callout_stop which won't block
> 	but this potentially leaves us open to a race.

If you use callout_init_mtx() instead then I think it closes the race for you 
as softclock will block on your mutex before trying to run the callout and it 
will not run it if you cancel the callout before you drop your lock.

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


More information about the p4-projects mailing list