Results 1 to 3 of 3
Hi,
I'm developing a simple "stacking" linux block device driver. In it's simplest form, this driver will only pass all requests to the "target" device by changing the bi_bdev on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-01-2011 #1Just Joined!
- Join Date
- Sep 2011
- Posts
- 2
Ultra slow write speed with custom linux "stacking" block device drive
Hi,
I'm developing a simple "stacking" linux block device driver. In it's simplest form, this driver will only pass all requests to the "target" device by changing the bi_bdev on the bio.
The driver uses the "make_request" to process incoming requests as opposed with having a standard request queue set up.
The problem is that write performance using this setup makes it unusable; performance is about 10% of the target device. Read performance seem mostly unaffected.
In concept, this is pretty much the same as the MD or DM drivers in linux, but with a "noop" personality; all requests are simply passed to one single target device, always. Of course MD/DM don't suffer from the write performance problem I'm describing, so I want to find out what I'm doing wrong.
Here's the simplest driver I could write that exposes the problem:
It's been tested against 2.6.38. To try it, make sure you define TARGET_NAME to an existing device. Once loaded, /dev/passthrough will appear. To quickly test write speed, I do:Code:https://github.com/wegel/passthrough
WARNING: the following will effectively write zeroes to your target device, destroying it's MBR and partitions. Don't use a target device on which you have actual data!!
Please let me know if you have any idea what I'm doing wrong, or if you have a suggestion on where to post my question to get a better chance to have it answered. Thanks!Code:sudo dd if=/dev/zero of=/dev/passthrough bs=1024 count=10000
- 09-03-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,156
You should probably move this to the kernel forum.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-03-2011 #3Just Joined!
- Join Date
- Sep 2011
- Posts
- 2
Oh right... Could a Mod please move this thread to Kernel? Thanks and sorry about that.


Reply With Quote
