LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 09: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, 03:42 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,060

Rep: Reputation: 88
Do you set your logical block size using blk_queue_logical_block_size?
 
Old 02-09-2011, 07: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, 03:41 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,060

Rep: Reputation: 88
How do you test the performance of Linux sd disk and your new concatenates disk?
 
Old 02-10-2011, 06: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, 04:23 PM   #6
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,060

Rep: Reputation: 88
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, 12:13 PM   #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 09:28 AM
CDROM block device driver souvikdatta Programming 0 10-23-2010 01:04 PM
Mtd driver as block device and char device Linux_Kid_ Linux - Kernel 1 12-27-2009 01:17 PM
problem with ending requests asynchronously in my block device driver cable_plug2000 Programming 0 12-15-2007 06:12 PM
Block device driver for SDcard kingraja84 Linux - Kernel 0 06-13-2007 06:22 AM


All times are GMT -5. The time now is 08:49 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration