LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   block device driver blk_alloc_queue settings (http://www.linuxquestions.org/questions/linux-kernel-70/block-device-driver-blk_alloc_queue-settings-861169/)

arun.p 02-07-2011 09:20 AM

block device driver blk_alloc_queue settings
 
I wrote a block device driver which concatenates multiple /dev/sd* disks and create a single disk.

I used blk_alloc_queue() to create a queue for my concatenated disk and registered a dispatch function using blk_queue_make_request(). In the dispatch function i forward the io to the sd disk based on the bio->bi_sector.

But, the performance(i/o per second) of my concatenated disk is just above 50% compared to sd disk.

I think i am not setting some parameters for the queue and that might be bringing down the performance of my concatenated disk. Here are the blk_queue_* functions which i have used.

blk_queue_make_request
blk_queue_bounce_limit
blk_queue_stack_limits
blk_queue_max_sectors

Can someone help what am i missing?

nini09 02-08-2011 03:42 PM

Do you set your logical block size using blk_queue_logical_block_size?

arun.p 02-09-2011 07:01 AM

nini09,

I am using 2.6.18-128.el5 kernel. There is no blk_queue_logical_block_size function in this version. So, i tried using blk_queue_hardsect_size() which i believe is the equivalent of blk_queue_logical_block_size(). But, there is no change in the performance.

nini09 02-09-2011 03:41 PM

How do you test the performance of Linux sd disk and your new concatenates disk?

arun.p 02-10-2011 06:23 AM

I am using IoMeter to test the Performance.

nini09 02-10-2011 04:23 PM

It look like your test target is disk device. Both disk device type is different, sd disk is SCSI disk and your disk is raw block disk.

arun.p 02-21-2011 12:13 PM

nini09,
sorry for the late response. I figured out the problem, now i am getting good performance. The problem was that i did not provide a handler for flush function in the queue.


All times are GMT -5. The time now is 07:20 PM.