From: d.mueller@elsoft.ch (David Müller (ELSOFT AG))
To: linux-arm-kernel@lists.infradead.org
Subject: Slow access to data in mmaped memory areas
Date: Sat, 5 Mar 2016 17:23:04 +0100 [thread overview]
Message-ID: <56DB07E8.4040003@elsoft.ch> (raw)
Hello
I have a multi-core Cortex-A9 based system where an external busmaster
capable device is transmitting data into the system memory.
Unfortunately the device's DMA engine does not support "scatter-gather"
mode.
The CPU job is to process the data received from the device.
I have written a driver which allocates serveral continuous memory block
(each 2MiB in size) as buffers, and transfers the data from the external
device to the buffers by DMA.
I have also written an application which accesses the data by "mmaping"
the buffers into the application's address space.
All this works ok, but processing performance of the data by the CPU is
pretty slow.
After looking at arch/arm/mm/mmu.c and arch/arm/mm/dma-mapping.c, it
seems like caching is disabled for all mmaped memory areas.
Is this observation correct?
Is there a way to re-enable caching for mmaped memory areas after the
DMA transfer is completed and to disable caching before the next DMA starts?
Dave
reply other threads:[~2016-03-05 16:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56DB07E8.4040003@elsoft.ch \
--to=d.mueller@elsoft.ch \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).