AHCI_MAX_SG
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Jens Axboe
Been wondering about this weird value for a while - why does it default to 168 segments? As clustering is disabled, that makes 672KiB the largest supported request. So currently the dma mapped controller command area is about 91KiB in size, I guess the limit is meant to limit the size of that area because 256 would be nicer. So how about making it 160 which makes the resulting command at least a multiple of 128, or even just 128 which gives us a nice clean 512KiB?
(I hope you don't mind me making a private message public -- several people have asked this, and even you have brought this up in public)
168 is the number that guarantees that AHCI_PORT_PRIV_DMA_SZ is 4K.
No other reason, and, it can (and probably will) be increased in the future.
Jeff