From: Felipe Contreras <felipe.contreras@gmail.com>
To: Ohad Ben-Cohen <ohad@wizery.com>
Cc: linux-omap@vger.kernel.org, Kanigeri Hari <h-kanigeri2@ti.com>,
Omar Ramirez Luna <omar.ramirez@ti.com>,
Guzman Lugo Fernando <x0095840@ti.com>,
Menon Nishanth <nm@ti.com>, Hiroshi Doyu <Hiroshi.DOYU@nokia.com>
Subject: Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues
Date: Sun, 2 May 2010 16:17:40 +0300 [thread overview]
Message-ID: <g2w94a0d4531005020617oa856c549k1af5d0100bf013aa@mail.gmail.com> (raw)
In-Reply-To: <1272746671-13423-1-git-send-email-ohad@wizery.com>
On Sat, May 1, 2010 at 11:44 PM, Ohad Ben-Cohen <ohad@wizery.com> wrote:
> This patchset introduces an approach to eliminate the direct calls
> to follow_page and to the low level cache APIs.
>
> The patchset works by caching the page information while memory
> is mapped, and then using that information later when needed
> instead of calling follow_page. The low level cache API is then replaced
> by the standard DMA API.
Finally! Very interesting patch indeed.
> A few key points in the current approach that I'd be happy to hear
> your feedback about:
> 1. The new mapping + page information is currently cached in the
> proc object, but it might fit better inside dmm map objects
> (by enhancing the DMM layer to support the required data caching,
> storing and retrieving).
Sounds like a good idea.
> 2. The information is stored in a linked list. That's pretty fine
> as long as the number of memory mappings per application is not
> extremely high. If that assumption is wrong, a different underlying
> data structure might be better (hash table, priority tree, etc..).
I think a linked list is fine for now. AFAIK only a limited number of
mmaps happen at the same time, usually 4.
> 3. Moving to standard DMA API completely changes the user's point
> of view; users should no longer think in terms of which cache
> manipulation is required, but instead, they should just tell dspbridge
> before a DMA transfer begins, and after it ends. Between the begin
> and end calls, the buffer "belongs" to the DSP and should not
> be accessed by the user.
This is really nice. That API should have been that way since the beginning.
> The patchset renames the flush ioctl to begin_dma_to_dsp and
> the invalidate ioctl to begin_dma_from_dsp. Both functions
> eventually call dma_map_sg, with the former requesting a
> DMA_BIDIRECTIONAL direction, and the latter requesting a
> DMA_FROM_DEVICE direction.
> In addition, the patchset adds two new APIs which calls dma_unmap_sg:
> end_dma_to_dsp and end_dma_from_dsp.
>
> Ideally, there would be only a single begin_dma command and a single
> end_dma one, which would accept an additional parameter that will
> determine the direction of the transfer. Such an approach would be more
> versatile and cleaner, but it would also break all user space apps that
> use dspbridge today.
If I understand correctly all user-space apps would be broken anyway
because they are not issuing the end_dma calls. At the very least they
need to be updated to use them.
Also, in Nokia we patched the bridgedriver to be able to have the 3
operations available from user-space (clean, inv, and flush), so we
would be very interested in having the direction of the transfer
available.
Cheers.
--
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-05-02 13:17 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-01 20:44 [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues Ohad Ben-Cohen
2010-05-01 20:44 ` [RFC/PATCH 1/6] DSPBRIDGE: add memory_map_info to PROC Ohad Ben-Cohen
2010-05-01 20:44 ` [RFC/PATCH 2/6] DSPBRIDGE: remember mapping and page info in proc_map Ohad Ben-Cohen
2010-05-15 8:34 ` Felipe Contreras
2010-05-16 23:00 ` Ohad Ben-Cohen
2010-05-01 20:44 ` [RFC/PATCH 3/6] DSPBRIDGE: remove mapping information in proc_unmap Ohad Ben-Cohen
2010-05-15 8:38 ` Felipe Contreras
2010-05-16 23:02 ` Ohad Ben-Cohen
2010-05-01 20:44 ` [RFC/PATCH 4/6] DSPBRIDGE: do not call follow_page Ohad Ben-Cohen
2010-05-01 20:44 ` [RFC/PATCH 5/6] DSPBRIDGE: do not use low level cache manipulation API Ohad Ben-Cohen
2010-05-02 11:56 ` Ohad Ben-Cohen
2010-05-01 20:44 ` [RFC/PATCH 6/6] DSPBRIDGE: add dspbridge API to mark end of DMA Ohad Ben-Cohen
2010-05-02 13:17 ` Felipe Contreras [this message]
2010-05-02 17:47 ` [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues Ohad Ben-Cohen
2010-05-14 19:27 ` Felipe Contreras
2010-05-14 19:49 ` Omar Ramirez Luna
2010-05-15 8:26 ` Felipe Contreras
2010-05-15 9:08 ` Felipe Contreras
2010-05-16 16:08 ` Felipe Contreras
2010-05-16 17:35 ` Felipe Contreras
2010-05-16 22:57 ` Ohad Ben-Cohen
2010-05-16 23:51 ` Felipe Contreras
2010-05-18 8:05 ` Ohad Ben-Cohen
2010-05-18 11:02 ` Felipe Contreras
2010-05-18 11:14 ` Ohad Ben-Cohen
2010-05-18 11:43 ` Felipe Contreras
2010-05-18 11:57 ` Ohad Ben-Cohen
2010-05-18 12:24 ` Felipe Contreras
2010-05-18 12:53 ` Ohad Ben-Cohen
2010-05-19 16:50 ` Felipe Contreras
2010-05-20 21:22 ` Ohad Ben-Cohen
2010-05-20 21:23 ` Ohad Ben-Cohen
2010-05-21 6:14 ` Felipe Contreras
2010-05-21 8:22 ` Ohad Ben-Cohen
2010-05-21 9:42 ` Felipe Contreras
2010-05-24 16:19 ` Ohad Ben-Cohen
2010-05-24 19:21 ` Felipe Contreras
2010-05-24 19:49 ` Ohad Ben-Cohen
2010-05-16 22:35 ` Ohad Ben-Cohen
2010-05-16 23:15 ` Felipe Contreras
2010-05-16 23:21 ` Ohad Ben-Cohen
2010-05-16 23:25 ` Ohad Ben-Cohen
2010-05-17 0:05 ` Felipe Contreras
2010-05-18 6:20 ` Ohad Ben-Cohen
2010-05-20 21:18 ` Ohad Ben-Cohen
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=g2w94a0d4531005020617oa856c549k1af5d0100bf013aa@mail.gmail.com \
--to=felipe.contreras@gmail.com \
--cc=Hiroshi.DOYU@nokia.com \
--cc=h-kanigeri2@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=ohad@wizery.com \
--cc=omar.ramirez@ti.com \
--cc=x0095840@ti.com \
/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).