All of lore.kernel.org
 help / color / mirror / Atom feed
* Choosing scatter/gather limits
@ 2004-10-11 10:53 Pierre Ossman
  2004-10-13 11:22 ` Russell King
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre Ossman @ 2004-10-11 10:53 UTC (permalink / raw)
  To: LKML

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-13 12:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-11 10:53 Choosing scatter/gather limits Pierre Ossman
2004-10-13 11:22 ` Russell King
2004-10-13 12:48   ` Pierre Ossman

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.