From: Hillf Danton <hdanton@sina.com>
To: John Stultz <john.stultz@linaro.org>
Cc: James Jones <jajones@nvidia.com>,
Robin Murphy <robin.murphy@arm.com>,
Liam Mark <lmark@codeaurora.org>,
lkml <linux-kernel@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
Ezequiel Garcia <ezequiel@collabora.com>,
linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH v4 7/7] dma-buf: system_heap: Add a system-uncached heap re-using the system heap
Date: Fri, 30 Oct 2020 15:50:23 +0800 [thread overview]
Message-ID: <20201030075023.3250-1-hdanton@sina.com> (raw)
On Thu, 29 Oct 2020 21:04:30 -0700 John Stultz wrote:
>
> But I'll try to share my thoughts:
>
> So the system heap allows for allocation of non-contiguous buffers
> (currently allocated from page_alloc), which we keep track using
> sglists.
> Since the resulting dmabufs are shared between multiple devices, we
> want to provide a *specific type of memory* (in this case
> non-contiguous system memory), rather than what the underlying
> dma_alloc_attr() allocates for a specific device.
If the memory slice(just a page for simple case) from
dma_alloc_attr(for device-A) does not work for device-B, nor can
page_alloc do the job imho.
>
> My sense is dma_mmap_wc() likely ought to be paired with switching to
> using dma_alloc_wc() as well, which calls down to dma_alloc_attr().
> Maybe one could use dma_alloc_attr against the heap device to allocate
> chunks that we track in the sglist. But I'm not sure how that saves us
> much other than possibly swapping dma_mmap_wc() for remap_pfn_range()?
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2020-10-30 8:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 7:50 Hillf Danton [this message]
2020-10-30 19:21 ` [PATCH v4 7/7] dma-buf: system_heap: Add a system-uncached heap re-using the system heap John Stultz
-- strict thread matches above, loose matches on Subject: below --
2020-10-30 2:47 Hillf Danton
2020-10-30 4:04 ` John Stultz
2020-10-29 0:16 [RESEND][PATCH v4 0/7] dma-buf: Performance improvements for system heap & a system-uncached implementation John Stultz
2020-10-29 0:16 ` [PATCH v4 7/7] dma-buf: system_heap: Add a system-uncached heap re-using the system heap John Stultz
2020-10-29 7:10 ` Hillf Danton
2020-10-29 22:28 ` John Stultz
2020-10-17 1:32 [PATCH v4 0/7] dma-buf: Performance improvements for system heap & a system-uncached implementation John Stultz
2020-10-17 1:32 ` [PATCH v4 7/7] dma-buf: system_heap: Add a system-uncached heap re-using the system heap John Stultz
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=20201030075023.3250-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ezequiel@collabora.com \
--cc=hch@infradead.org \
--cc=jajones@nvidia.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lmark@codeaurora.org \
--cc=robin.murphy@arm.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