Skip to contentSkip to conversation

mix-block size for raw_io ??

DISCUSSION BenHanokh Gabriel 2 participants 2 messages Oct 12, 2000 Memory management

lore
Share & tools
lore
#0 lore raw

hi

i saw that the raw interface is using 1/2K blocks for io.
i understand that raw_io needs to support disk accesses in sector resolution, but why is it not possible to mix block sizes for the same device -> giving a much better performance using something like:
---------------------
left_bytes = io_size % 4K
bytes = io_size - left_bytes

call brw_kiovec(bytes) // using_4K_blocks
call brw_kiovec(left_bytes) // using_1/2K_blocks
----------------------

the brw_kiovec() doesn't seems to remember block_size between calls as it calculates everything based on the block_size passed as parameter.

is there any reason why we don't use mix-block-size ?

please CC me for answers

THX
/Gabriel BenHanokh

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

#1 lore raw

Hi,

Quoted 5 lines · BenHanokh Gabriel

i saw that the raw interface is using 1/2K blocks for io.
i understand that raw_io needs to support disk accesses in sector resolution, but why is it not possible to mix block sizes for the same device

It is possible in principle, but I can't guarantee that every device driver will work properly if you do this.

Quoted 1 line

is there any reason why we don't use mix-block-size ?

Because it would be a short-term hack --- the real solution to this problem is to push kiobufs right down into the block device request layer. SGI have already got patches to do this, with support in the scsi and ide drivers.

Cheers,
Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/