From: Pierre Ossman <drzeus-list@drzeus.cx>
To: LKML <linux-kernel@vger.kernel.org>
Subject: Choosing scatter/gather limits
Date: Mon, 11 Oct 2004 12:53:23 +0200 [thread overview]
Message-ID: <416A6623.9000105@drzeus.cx> (raw)
I've been adding scatter/gather support for the MMC host driver I'm
writing. I cannot find any documentation on how to chose the limits though.
The device is an ISA device capable of DMA and PIO transfers. The
scatter/gather system seems to be designed for PCI but I figured it
could be used here aswell. Should save the time needed to shuffle stuff
into a common buffer (or doing a lot of requests).
When in DMA mode the maximum segment size is 64kB (since ISA DMA cannot
transfer larger blocks). The maximum sector limit should perhaps be 128
then. I don't know if 512 bytes per sector is something you can rely on.
The MMC cards can (in theory) choose any sector size they want.
In PIO mode the segment size and sector count doesn't have an upper
limit. I just traverse the scatter list as I read data.
The segment counts are also unlimited since these parts are handled in
software.
So how do I choose these values? The segment counts affect memory usage
(since I have to allocate the scatterlist) but the others are just a
matter of how much data can be stuffed into one request. Should they be
set to 0xffffffff then?
Rgds
Pierre Ossman
next reply other threads:[~2004-10-11 10:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-11 10:53 Pierre Ossman [this message]
2004-10-13 11:22 ` Choosing scatter/gather limits Russell King
2004-10-13 12:48 ` Pierre Ossman
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=416A6623.9000105@drzeus.cx \
--to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.