tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

vnode_has_large_blocks() (vnd.c rev 1.255)



Hello,
in vnd.c rev 1.255, vnode_has_large_blocks() has been introduced, and
will cause vnd to use VOP_READ/VOP_WRITE instead of VOP_BMAP/VOP_STRATEGY
if it returns true. The commit message was:
Fall back to VOP_READ/VOP_WRITE if the simulated disk has smaller
sectors than the underlying filesystem and VOP_STRATEGY would fail.

But actually, vnode_has_large_blocks() always return true because at this
point, getdisksize() always fail: the vnd is not yet initialized so we
can't read its wegdes or disklabel information.
This has catastrofic performance consequences for Xen file-backed virtual
disks, as every write is now turned in a (possibly much larger)
read/modify/write cycle.

What is, exactly, the purpose of this commit and what problem does it tries
to solve ? AFAIK, handle_with_strategy() will split the request as
appropriate if it's too large for the underlying filesystem.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index