]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: optimize iso queueing by setting wake only after the last packet
authorClemens Ladisch <clemens@ladisch.de>
Mon, 2 May 2011 07:33:56 +0000 (09:33 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Tue, 10 May 2011 20:53:45 +0000 (22:53 +0200)
commitbbe6242f5888944f0d42c0f572a244f51847e74f
tree8a144d874a0ac46273a7e2f2dd344458d7eb4bfa
parent391a10790bb84e05b3d8713f31137f7e282a6c92
firewire: optimize iso queueing by setting wake only after the last packet

When queueing iso packets, the run time is dominated by the two
MMIO accesses that set the DMA context's wake bit.  Because most
drivers submit packets in batches, we can save much time by
removing all but the last wakeup.

The internal kernel API is changed to require a call to
fw_iso_context_queue_flush() after a batch of queued packets.
The user space API does not change, so one call to
FW_CDEV_IOC_QUEUE_ISO must specify multiple packets to take
advantage of this optimization.

In my measurements, this patch reduces the time needed to queue
fifty skip packets from userspace to one sixth on a 2.5 GHz CPU,
or to one third at 800 MHz.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/core-card.c
drivers/firewire/core-cdev.c
drivers/firewire/core-iso.c
drivers/firewire/core.h
drivers/firewire/net.c
drivers/firewire/ohci.c
drivers/media/dvb/firewire/firedtv-fw.c
include/linux/firewire.h
sound/firewire/amdtp.c