d_maxsize .. si_iosize_max

Andriy Gapon avg at icyb.net.ua
Thu Apr 22 21:59:31 UTC 2010


I see that many disk drivers are careful to set an optimal value for d_maxsize.
On the other hand, si_iosize_max is hardcoded to MAXPHYS in geom_dev.c, which
leads to suboptimal I/O for devices with actual maximum I/O size less than MAXPHYS.
And right now d_maxsize seems to be used only for dumperinfo.maxiosize, which is
a waste.

So, perhaps, d_maxsize should be passed up through GEOM layer as a provider
property, e.g. pp->maxiosize.  So that si_iosize_max could be set correctly.
Or, more importantly, so that final consumers (e.g. filesystems) could now
correct optimal I/O size.

Perhaps, this should even be split into max_read_size and max_write_size for
geoms like gmirror where reads can be done in parallel.

-- 
Andriy Gapon


More information about the freebsd-geom mailing list