Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Poor performace on mmap reading arm64 on audio device
@ 2020-11-21  9:40 Michael Nazzareno Trimarchi
  2020-11-23 13:23 ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Nazzareno Trimarchi @ 2020-11-21  9:40 UTC (permalink / raw)
  To: Linux-ALSA, Takashi Iwai; +Cc: Nicolin Chen, Mark Brown

Hi all

I'm trying to figure out how to increase performance on audio reading
using the mmap interface. Right now what I understand it's that
allocation comes from core/memalloc.c ops that allocate the memory for
dma under driver/dma.
The reference platform I have is an imx8mm and the allocation in arm64 is:

0xffff800011ff5000-0xffff800012005000          64K PTE       RW NX SHD
AF            UXN MEM/NORMAL-NC

This is the reason that is allocated for dma interface.

Now access linear on the multichannel interface the performance is bad
but worse if I try to access a channel a time on read.
So it looks like it is better to copy the block using memcpy on a
cached area and then operate on a single channel sample. If it's
correct what I'm saying the mmap_begin and mmap_commit
basically they don't do anything on cache level so the page mapping
and way is used is always the same. Can the interface be modified to
allow cache the area during read and restore in the commit
phase?

Michael

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

end of thread, other threads:[~2020-11-23 15:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-21  9:40 Poor performace on mmap reading arm64 on audio device Michael Nazzareno Trimarchi
2020-11-23 13:23 ` Takashi Iwai
2020-11-23 13:44   ` Michael Nazzareno Trimarchi
2020-11-23 13:54     ` Takashi Iwai
2020-11-23 14:19       ` Michael Nazzareno Trimarchi
2020-11-23 14:28         ` Takashi Iwai
2020-11-23 15:15           ` Michael Nazzareno Trimarchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox