Re: [patch 3/4] sdio: extend sdio_readsb() and friends to handleany length of buffer

From: Pierre Ossman
Date: Wed Aug 08 2007 - 06:38:19 EST


On Wed, 08 Aug 2007 11:19:33 +0100
David Vrabel <david.vrabel@xxxxxxx> wrote:

>
> We need to know the block size in use /before/ the start of the
> transfer as we would like drivers to be able to perform transfers
> with single commands as this can result in significantly better
> performance[1]. The drivers for our (CSR's) WiFi chips should do
> this. This isn't some (as you suggested in a previous post) 'rare'
> requirement.
>

Well, there are more ways that can be achieved.

First, the driver could lock down the block size using
sdio_force_block_size(). Then it knows what it gets.

Second, we could try to make it possible for the driver to indicate
"feel free to pad this transfer". Then we could also remove the need
for drivers to mess with buffers and keep such stuff in the core. We
could even magically remove a memcpy() by setting up two sg entries,
one for the data and one for the padding.

>
> [1] Consider a chip with a block size of 64 that regularly does short
> transfers of between 64 - 128 bytes. Without padding, this would
> require two commands per transfer instead of just one, cutting
> performance by 50%! This scenario could be a WiFi chip doing VoIP.

Provided block size < 128. Otherwise it'll jump straight to the byte
transfer.

--
-- Pierre Ossman

Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/