From: Rob Harris <rob.harris@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: custom block device driver with 6k block size...
Date: Tue, 28 Apr 2015 17:32:27 -0400 [thread overview]
Message-ID: <553FFC6B.3080302@gmail.com> (raw)
Greetings.
I've been working on developing a custom block device that
(unfortunately) uses 6k block sizes. I've been trying to deal directly
with the BIO's (make_request_fn) and even though I've configured the
request_queue as follows...
blk_queue_io_min( smc_dev->req_queue, SIX_KB );
blk_queue_io_opt( smc_dev->req_queue, TWELVE_KB );
blk_queue_max_segments( smc_dev->req_queue, SIX_KB * 100 / TWELVE_KB );
blk_queue_max_segment_size( smc_dev->req_queue, SIX_KB * 100 );
blk_queue_max_hw_sectors( smc_dev->req_queue, SIX_KB * 100 / 512 );
blk_queue_logical_block_size( smc_dev->req_queue, SIX_KB );
blk_queue_physical_block_size( smc_dev->req_queue, SIX_KB );
blk_queue_segment_boundary( smc_dev->req_queue, SIX_KB-1 );
queue_flag_set_unlocked( QUEUE_FLAG_NONROT, smc_dev->req_queue );
queue_flag_clear_unlocked( QUEUE_FLAG_ADD_RANDOM, smc_dev->req_queue );
... I still seem to always get handed BIO's with PAGE_SIZE(4k)
segment_sizes in the bio_vec and I never seem to get any sort of bio_vec
coalescing when trying a blk_bio_map_sg. Everything returned is always
small (if at all) multiples of PAGE_SIZE. I would love to DMA large
buffers directly back and forth to the controller, but offsetting the
delta between the 4k and 6k offset is a pain.
Is there something simple that I'm missing or doing wrong?
Thanks,
-Rob Harris
reply other threads:[~2015-04-28 21:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=553FFC6B.3080302@gmail.com \
--to=rob.harris@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox