Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Sep 2005 07:50:14 -0700
From:      Sam Leffler <sam@errno.com>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern vfs_bio.c
Message-ID:  <433D50A6.3030800@errno.com>
In-Reply-To: <28581.1128068575@critter.freebsd.dk>
References:  <28581.1128068575@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote:
> In message <433C0A4B.8030504@errno.com>, Sam Leffler writes:
> 
> 
>>vmware is great for finding races like these because of the way it 
>>handles concurrency.  I can remember finding many problems like this in 
>>"client operating systems" when I worked on it.
> 
> 
> Can you elaborate on the "the way it handles concurrency" without
> violating any paperwork ?  It sounds like something we should know
> about...
> 

Mostly that code of the form:

unguarded assignment to variable v
wait for interrupt to see if v changed value

will almost always fail (i.e. you must protect against an interrupt when 
writing v).  On real hardware it would typically work because the 
hardware takes enough time to post the interrupt for the cpu to get 
ready to wait.  This kind of kernel programming 101 mistake mostly was 
found in device drivers but not always.

	Sam




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?433D50A6.3030800>