LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 02-07-2011, 08:20 AM   #1
arun.p
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Rep: Reputation: 0
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?
 
Old 02-08-2011, 02:42 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,842

Rep: Reputation: 160Reputation: 160
Do you set your logical block size using blk_queue_logical_block_size?
 
Old 02-09-2011, 06:01 AM   #3
arun.p
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
Old 02-09-2011, 02:41 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,842

Rep: Reputation: 160Reputation: 160
How do you test the performance of Linux sd disk and your new concatenates disk?
 
Old 02-10-2011, 05:23 AM   #5
arun.p
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Original Poster
Rep: Reputation: 0
I am using IoMeter to test the Performance.
 
Old 02-10-2011, 03:23 PM   #6
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,842

Rep: Reputation: 160Reputation: 160
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.
 
Old 02-21-2011, 11:13 AM   #7
arun.p
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux: easy example of a block device driver? eantoranz Programming 5 12-03-2010 08:28 AM
CDROM block device driver souvikdatta Programming 0 10-23-2010 12:04 PM
Mtd driver as block device and char device Linux_Kid_ Linux - Kernel 1 12-27-2009 12:17 PM
problem with ending requests asynchronously in my block device driver cable_plug2000 Programming 0 12-15-2007 05:12 PM
Block device driver for SDcard kingraja84 Linux - Kernel 0 06-13-2007 05:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration