Block Device Settings

Rishi Agrawal rishi.b.agrawal at gmail.com
Sat Oct 24 06:25:57 EDT 2015


Hi,

I have written a block device driver. I now want to set few limits on it so
that it can perform efficiently.

Kernel Version : 3.13.0-24-generic #46-Ubuntu SMP

1. I want to limit the number of bio's in one request to 1.
2. I want to limit the number of blocks in a bio to 1.
3. I want to change the block_size/sector_size of the device to
4K/8K/16K/32K based on the user's input.


How can I achieve these settings?

I found the following settings but I am not very much sure that these are
the right ones.

Also setting these parameters might end up having a adverse performance
issue on the system, which I am not aware about.

Please guide.


File: blk-settings.c
blk_queue_max_segments()
blk_queue_max_segment_size()
blk_queue_logical_block_size()
blk_queue_physical_block_size()
blk_limits_io_min()
blk_queue_io_min()
blk_limits_io_opt()


-- 
Regards,
Rishi Agrawal

A simple act of caring creates an endless ripple.
Be the change that you wish to see in the world.
Be thoroughly used up when you die, for the harder you work, the more you
live.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20151024/155619a5/attachment.html 


More information about the Kernelnewbies mailing list