<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hi,<br><br></div>I have written a block device driver. I now want to set few limits on it so that it can perform efficiently.<br><br></div><div>Kernel Version : 3.13.0-24-generic #46-Ubuntu SMP<br></div><div><br></div>1. I want to limit the number of bio&#39;s in one request to 1.<br></div>2. I want to limit the number of blocks in a bio to 1.<br></div>3. I want to change the block_size/sector_size of the device to 4K/8K/16K/32K based on the user&#39;s input.<br></div><br><br></div>How can I achieve these settings?<br><br></div>I found the following settings but I am not very much sure that these are the right ones.<br><br></div>Also setting these parameters might end up having a adverse performance issue on the system, which I am not aware about. <br><br></div>Please guide.<br><br><br>File: blk-settings.c<br>blk_queue_max_segments()<br>blk_queue_max_segment_size()<br>blk_queue_logical_block_size()<br>blk_queue_physical_block_size()<br>blk_limits_io_min()<br>blk_queue_io_min()<br>blk_limits_io_opt()<br><br clear="all"><div><div><div><div><div><div><div><div><div><div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><font size="2"><span style="font-family:monospace,monospace">Regards,<br>Rishi Agrawal<br><br></span></font></div><div><span style="font-family:arial narrow,sans-serif"><font size="2">A simple act of caring creates an endless ripple.<br></font></span></div><div><span style="font-family:arial narrow,sans-serif"><font size="2">Be the change that you wish to see in the world.<br></font></span></div><div><span style="font-family:arial narrow,sans-serif"><font size="2">Be thoroughly used up when you die, for the harder you work, the more you live.</font></span></div></div></div>
</div></div></div></div></div></div></div></div></div></div></div>