From: m.szyprowski@samsung.com (Marek Szyprowski)
To: linux-arm-kernel@lists.infradead.org
Subject: CMA region and highmem
Date: Fri, 23 Jan 2015 08:26:52 +0100 [thread overview]
Message-ID: <54C1F7BC.20604@samsung.com> (raw)
In-Reply-To: <CAD8Lp46rqXwQR5L=-Tt_iL0CPDsKt+hVYU7-viS0uHvmVXLqng@mail.gmail.com>
Hello,
On 2015-01-22 21:55, Daniel Drake wrote:
> On Thu, Aug 21, 2014 at 3:32 AM, Marek Szyprowski
> <m.szyprowski@samsung.com> wrote:
>> You are right, but frankly drivers doing large DMA allocations should take
>> advantage of DMA_ATTR_NO_KERNEL_MAPPING DMA attribute, because all they
>> usually do is just mapping those buffers to userspace. For a bit complex
>> example, see drivers/gpu/drm/exynos/exynos_drm_buf.c or
>> drivers/gpu/drm/msm/msm_drv.c.
> Thanks again for the insight here. Revisiting this topic now:
>
> Looking at DMA_ATTR_NO_KERNEL_MAPPING in latest linus git, this only
> seems to be implemented for IOMMU setups.
> On other setups this flag seems to be ignored, so on such setups, your
> change that tends to place the CMA region in high memory now puts
> pressure on the vmalloc area even when the driver asked for
> NO_KERNEL_MAPPING.
>
> Is there a good reason why the non-IOMMU codepath doesn't obey
> DMA_ATTR_NO_KERNEL_MAPPING?
No, it simply has not been implemented yet. Mainly because initially CMA
regions were allocated in low memory and all my development boards that time
didn't have enough memory to experiment with high mem...
> We ran a quick experiment here
> implementing this (i.e. just bailing out of __alloc_from_contiguous
> before mapping the memory into kernel space) and it seems to work.
Right. This should be enough. Feel free to submit a patch.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
next prev parent reply other threads:[~2015-01-23 7:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-13 19:18 CMA region and highmem Russell King - ARM Linux
2014-08-20 7:03 ` Marek Szyprowski
2014-08-21 9:22 ` Daniel Drake
2014-08-21 9:32 ` Marek Szyprowski
2015-01-22 20:55 ` Daniel Drake
2015-01-23 7:26 ` Marek Szyprowski [this message]
2014-08-21 9:32 ` Russell King - ARM Linux
2014-10-23 2:10 ` Gregory Fong
2014-10-23 8:55 ` Russell King - ARM Linux
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=54C1F7BC.20604@samsung.com \
--to=m.szyprowski@samsung.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.