From: "Roni Feldman" <roni.feldman+lkml@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Too many stupid questions about the block layer
Date: Thu, 28 Aug 2008 23:38:07 +0300 [thread overview]
Message-ID: <7b5883fc0808281338l4cd77a8k99fa0b03a0eca03c@mail.gmail.com> (raw)
Hello list,
This is pretty long -- I sure hope this is the right place to ask these :)
First of all, I have a board with a NAND flash device, to which I have
a 8k-wide PCI interface.
I've been wondering about these:
1. I would prefer if the block layer always passed me 8k long
segments, even though the hard sector size is 2k. I tried using
blk_queue_hardsect_size() and set it to 8k, but for some reason I get
a panic. Is it possible that hardsect cannot be larger than PAGE_SIZE
(makes some sense)? Or is it just a bug of mine?
2. (This is in case I can't have 8k-one-segment-bios/requests) I'm not
sure whether I should implement request_fn() or make_request_fn(),
since although the device is flash, there's sense in writing
consecutive sectors in one go - with each write of a block of sectors,
the devices erases a whole erase block, which is the size of many
sectors. More writes of consecutive sectors means we don't erase the
same erase block as much. Can I get the same "segment merging"
functionality from the block layer if I use make_request() instead of
request()?
3. I want to handle requests in a kernel thread, one by one. Ideally,
I would just pass the request to my kthread, and call blk_stop_queue
(since I can only handle one request at a time). In my kthread, I will
issue a DMA transfer for the request and in the end call
blk_end_request(), and the blk_start_queue(). But can the block layer
somehow add bio's to my request while the kthread runs? Is there a way
to lock the request (maybe blkdev_dequeue_request)? Am I even on the
right track?
Thanks for your time,
-- Roni Feldman
reply other threads:[~2008-08-28 20:38 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=7b5883fc0808281338l4cd77a8k99fa0b03a0eca03c@mail.gmail.com \
--to=roni.feldman+lkml@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
all inboxes | Powered by JetHome®