[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Locking in disk(9) api
On Tue, Dec 29, 2009 at 03:53:58PM -0800, John Nemeth wrote:
> In the case in question the real benefit is avoiding a panic when
> dk_stats->io_busy goes negative.
The producer side is protected by the corresponding locks in each
driver (now also in the dm driver). No panic there.
> The system would have to be changed
> to ignore obviously corrupt stats. At which point, you might as well
> not bother keeping them since they will be completely unreliable.
Reading the stats from userland may yield corrupted stats, temporarily.
In reality however, the 'corruption' only means slightly inconsistent
data (e.g. old rxfer, new rbytes within a sample). The chance of
actually seeing a corrupted 64bit number due to non-atomic updates
is pretty low.
Michael van Elst
"A potential Snark may lurk in every tree."
Main Index |
Thread Index |