From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Gao, Yunpeng" <yunpeng.gao@intel.com>
Cc: James Bottomley <James.Bottomley@suse.de>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Robert Hancock <hancockrwd@gmail.com>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: How to make kernel block layer generate bigger request in the request queue?
Date: Tue, 13 Apr 2010 16:20:34 +0100 [thread overview]
Message-ID: <20100413162034.445a388b@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <CE761E84DADF2947A4AF22FB8D97A4731CB7230B@shsmsx501.ccr.corp.intel.com>
> And I just curious why the block layer does not merge these contiguous sectors into one single request? For example, if > the block layer generate 'start_sect: 48776, nsect: 64, rw: r' instead of below requests, I think the performance will
> be better.
You said earlier "My hardware doesn't support scatter/gather"
> start_sect: 48776, nsect: 8, rw: r
> start_sect: 48784, nsect: 8, rw: r
> start_sect: 48792, nsect: 8, rw: r
> start_sect: 48800, nsect: 8, rw: r
> start_sect: 48808, nsect: 8, rw: r
> start_sect: 48816, nsect: 8, rw: r
> start_sect: 48824, nsect: 8, rw: r
> start_sect: 48832, nsect: 8, rw: r
Print the bus address of each request and you will probably find they are
not contiguous so they have not been merged because your hardware could
not do that transfer and you have no IOMMU.
If the overhead per command is really really huge you can preallocate an
internal buffer of say 32K or 64K in your driver and tell the block layer
you do scatter gather, then copy the buffers into a linear chunk. I'd be
very surprised if that was a win overall on any vaguely sane hardware but
flash with erase block overhead and the like might be one of the less
sane cases.
Alan
next prev parent reply other threads:[~2010-04-13 15:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-09 14:07 How to make kernel block layer generate bigger request in the request queue? Gao, Yunpeng
2010-04-09 23:54 ` Robert Hancock
2010-04-10 2:05 ` Martin K. Petersen
2010-04-10 14:58 ` James Bottomley
2010-04-12 18:26 ` Martin K. Petersen
2010-04-12 19:58 ` James Bottomley
2010-04-13 15:06 ` Gao, Yunpeng
2010-04-13 15:20 ` Alan Cox [this message]
2010-04-19 6:42 ` Gao, Yunpeng
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=20100413162034.445a388b@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=James.Bottomley@suse.de \
--cc=hancockrwd@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=yunpeng.gao@intel.com \
/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