mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Signed-off-by: Stefan Richter <[email protected]>
This commit is contained in:
parent
f30e6d3e41
commit
13882a82ee
9 changed files with 35 additions and 5 deletions
|
|
@ -396,6 +396,7 @@ static void out_packet_callback(struct fw_iso_context *context, u32 cycle,
|
|||
|
||||
for (i = 0; i < packets; ++i)
|
||||
queue_out_packet(s, ++cycle);
|
||||
fw_iso_context_queue_flush(s->context);
|
||||
}
|
||||
|
||||
static int queue_initial_skip_packets(struct amdtp_out_stream *s)
|
||||
|
|
|
|||
Loading…
Reference in a new issue