On Mon, May 24, 2021 at 09:20:35PM -0700, Darrick J. Wong wrote:
<shrug> I think I'm comfortable starting with 256 for xfs to bump an
ioend to a workqueue, and 4096 pages as the limit for an iomap ioend.
If people demonstrate a need to smart-tune or manual-tune we can always
add one later.
Though I guess I did kind of wonder if maybe a better limit for iomap
would be max_hw_sectors? Since that's the maximum size of an IO that
the kernel will for that device?
(Hm, maybe not; my computers all have it set to 1280k, which is a
pathetic 20 pages on a 64k-page system.)
I've got samsung nvme devices here that set max_hw_sectors_kb to
128kB....
But device sizes ignore that RAID devices give an optimal IO size
for submissions:
$ cat /sys/block/dm-0/queue/optimal_io_size
1048576
$ cat /sys/block/dm-0/queue/max_sectors_kb
128
IOWs, we might be trying to feed lots of devices through the one
submission, so using a "device" limit isn't really something we
should be doing. Ideally I think we should be looking at some
multiple of the maximum optimal IO size that the underlying device
requests if it is set, otherwise a byte limit of some kind....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com