From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: Jens Axboe <axboe@suse.de>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: How to map high memory for block io
Date: Wed, 1 Mar 2006 23:29:13 +0000 [thread overview]
Message-ID: <20060301232913.GC4024@flint.arm.linux.org.uk> (raw)
In-Reply-To: <43DFAEC6.3090205@drzeus.cx>
On Tue, Jan 31, 2006 at 07:39:02PM +0100, Pierre Ossman wrote:
> Jens Axboe wrote:
> > On Mon, Jan 30 2006, Pierre Ossman wrote:
> >
> >> Jens Axboe wrote:
> >>
> >>>
> >>> Ah, you need to disable clustering to prevent that from happening! I was
> >>> confused there for a while.
> >>>
> >>>
> >>>
> >> And which is the lesser evil, highmem bounce buffers or disabling
> >> clustering? I'd probably vote for the former since the MMC overhead can
> >> be quite large.
> >>
> >
> > Disabling clustering is by far the least expensive way to accomplish it.
> >
> >
>
> Russell, what's your view on this? And how should we handle it with
> regard to MMC drivers?
Okay, I've hit this same problem (but in a slightly different way) with
mmci.c. The way I'm proposing to fix this for mmci is to introduce a
new capability which says "clustering is supported by this driver."
I'm unconvinced that we can safely fiddle with the queue's flags once
the queue is in use, hence why I've gone for the init-time only solution.
Maybe Jens can comment on that?
(The side effect of this patch is that everyone ends up with clustering
disabled until they explicitly update their driver to enable it - which
results in us defaulting to a safe operation mode.)
diff -up -x BitKeeper -x ChangeSet -x SCCS -x _xlk -x '*.orig' -x '*.rej' -x .git a/drivers/mmc/mmc_queue.c b/drivers/mmc/mmc_queue.c
--- a/drivers/mmc/mmc_queue.c Sun Nov 6 22:16:40 2005
+++ b/drivers/mmc/mmc_queue.c Wed Mar 1 23:18:33 2006
@@ -144,6 +144,14 @@ int mmc_init_queue(struct mmc_queue *mq,
blk_queue_max_hw_segments(mq->queue, host->max_hw_segs);
blk_queue_max_segment_size(mq->queue, host->max_seg_size);
+ /*
+ * If the host does not support clustered requests, tell BIO.
+ * It is not clear when we can alter this, so only do it at
+ * initialisation time, before the queue is in use.
+ */
+ if (!(host->caps & MMC_CAP_CLUSTER))
+ mq->queue->queue_flags &= ~(1 << QUEUE_FLAG_CLUSTER);
+
mq->queue->queuedata = mq;
mq->req = NULL;
diff -up -x BitKeeper -x ChangeSet -x SCCS -x _xlk -x '*.orig' -x '*.rej' -x .git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
--- a/include/linux/mmc/host.h Sun Nov 6 22:20:12 2005
+++ b/include/linux/mmc/host.h Wed Mar 1 23:10:18 2006
@@ -85,6 +85,7 @@ struct mmc_host {
unsigned long caps; /* Host capabilities */
#define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */
+#define MMC_CAP_CLUSTER (1 << 1) /* host can support clustered BIOs */
/* host specific block data */
unsigned int max_seg_size; /* see blk_queue_max_segment_size */
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
next prev parent reply other threads:[~2006-03-01 23:29 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-27 6:45 How to map high memory for block io Pierre Ossman
2006-01-27 10:26 ` Jens Axboe
2006-01-27 10:33 ` Pierre Ossman
2006-01-27 10:43 ` Jens Axboe
2006-01-27 12:14 ` Pierre Ossman
2006-01-27 12:39 ` Jens Axboe
2006-01-27 13:16 ` Pierre Ossman
2006-01-27 13:48 ` Pierre Ossman
2006-01-27 14:00 ` Jens Axboe
2006-01-27 14:14 ` Pierre Ossman
2006-01-27 18:37 ` Pierre Ossman
2006-01-27 19:43 ` Russell King
2006-01-27 20:04 ` Pierre Ossman
2006-01-27 20:10 ` Jens Axboe
2006-01-27 20:14 ` Russell King
2006-01-27 20:22 ` Jens Axboe
2006-01-27 20:26 ` Russell King
2006-01-27 20:38 ` Pierre Ossman
2006-01-27 21:58 ` Pierre Ossman
2006-01-27 22:54 ` Russell King
2006-01-28 19:17 ` Jens Axboe
2006-01-28 19:32 ` Pierre Ossman
2006-01-29 15:22 ` Jens Axboe
2006-01-30 7:57 ` Pierre Ossman
2006-01-30 8:09 ` Jens Axboe
2006-01-31 18:39 ` Pierre Ossman
2006-03-01 23:29 ` Russell King [this message]
2006-03-02 7:21 ` Jens Axboe
2006-03-02 7:26 ` Pierre Ossman
2006-03-02 9:41 ` Russell King
2006-03-02 9:52 ` Pierre Ossman
2006-03-02 10:04 ` Russell King
2006-03-02 10:26 ` Pierre Ossman
2006-03-02 11:45 ` Russell King
2007-01-30 20:41 ` Pierre Ossman
2006-01-27 20:28 ` Pierre Ossman
2006-01-27 20:12 ` Pierre Ossman
2006-01-27 20:16 ` Russell King
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=20060301232913.GC4024@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=axboe@suse.de \
--cc=drzeus-list@drzeus.cx \
--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