aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/firewire.h
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2011-05-02 03:33:56 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2011-05-10 16:53:45 -0400
commit13882a82ee1646336c3996c93b4a560a55d2a419 (patch)
tree8a144d874a0ac46273a7e2f2dd344458d7eb4bfa /include/linux/firewire.h
parentf30e6d3e419bfb5540fa82ba7eca01d578556e6b (diff)
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>
Diffstat (limited to 'include/linux/firewire.h')
-rw-r--r--include/linux/firewire.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/firewire.h b/include/linux/firewire.h
index de90e1ff8488..c0fb405bb435 100644
--- a/include/linux/firewire.h
+++ b/include/linux/firewire.h
@@ -440,6 +440,7 @@ int fw_iso_context_queue(struct fw_iso_context *ctx,
440 struct fw_iso_packet *packet, 440 struct fw_iso_packet *packet,
441 struct fw_iso_buffer *buffer, 441 struct fw_iso_buffer *buffer,
442 unsigned long payload); 442 unsigned long payload);
443void fw_iso_context_queue_flush(struct fw_iso_context *ctx);
443int fw_iso_context_start(struct fw_iso_context *ctx, 444int fw_iso_context_start(struct fw_iso_context *ctx,
444 int cycle, int sync, int tags); 445 int cycle, int sync, int tags);
445int fw_iso_context_stop(struct fw_iso_context *ctx); 446int fw_iso_context_stop(struct fw_iso_context *ctx);