-   Linux - Kernel (
-   -   block device driver blk_alloc_queue settings (

arun.p 02-07-2011 08: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.


Can someone help what am i missing?

nini09 02-08-2011 02:42 PM

Do you set your logical block size using blk_queue_logical_block_size?

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


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 02:41 PM

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

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

I am using IoMeter to test the Performance.

nini09 02-10-2011 03: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 11:13 AM

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 04:40 PM.