tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: vnode lock and v_numoutput
Date: Mon, 26 Jan 2015 21:01:58 +0100
From: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
On Mon, Jan 26, 2015 at 07:33:18PM +0000, Taylor R Campbell wrote:
> We should probably do the same thing in genfs_do_io and anywhere else
> that uses nestiobuf for writes, and invent a better way to express the
> nestiobuf API so it's less ridiculously error-prone.
Yes, I'll look at this (but I don't know why it does +2 here).
genfs_do_io does +2 because it needs to count the nestiobuf master
biodone and the caller-supplied (*iodone)(mbp) callback, which calls
biodone or vwakeup (see uvm_aio_biodone or genfs_dio_iodone).
Counting the nestiobuf master biodone can be done like we're doing
with vnd. I would guess (and hope) that counting the caller-supplied
iodone callback can be done after biowait and before (*iodone)(mbp).
But I guess genfs_do_io() is safe as is: it's probably called
with the vnode locked, as VOP_BMAP() is called without taking and
releasing the lock.
Maybe... I think there's a great deal too much blocking (i.e., any)
while the vnode lock is held, but I suppose cleaning that up can be
left for another day.
Home |
Main Index |
Thread Index |
Old Index