From: Laura Abbott <labbott@redhat.com>
To: Shawn Guo <shawnguo@kernel.org>,
linux-kernel@vger.kernel.org,
inux-arm-kernel@lists.infradead.org
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
Arnd Bergmann <arnd@arndb.de>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Michal Nazarewicz <mina86@mina86.com>,
Vlastimil Babka <vbabka@suse.cz>,
Minchan Kim <minchan@kernel.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: CMA region absolutely for a particular device?
Date: Tue, 7 Jun 2016 08:55:54 -0700 [thread overview]
Message-ID: <c4ddd222-9bab-e9d5-0c5c-2c02fd3813a8@redhat.com> (raw)
In-Reply-To: <20160607125911.GA4279@tiger>
On 06/07/2016 05:59 AM, Shawn Guo wrote:
> Hi,
>
> I'm using a separate CMA region than the system default one for
> a particular device to avoid fragmentation. It does help. But under
> certain circumstance (memory shortage), it seems some of the pages in
> the region will be used by system. The really bad thing is that when
> a CMA allocation tries to move these occupied pages around, it just
> fails to do so with messages like "alloc_contig_range: ... PFNs busy".
> These pages thus become holes in a contiguous block and prevent the
> allocation from succeeding.
>
> Is it possible to make a CMA absolutely for a particular device, and
> even system movable pages cannot use the memory? I can reserve a memory
> region from kernel and manage it with some custom and private interface
> for that particular device. But obviously, the standard dma-mapping API
> and established underneath CMA infrastructural is more desirable to use,
> right?
>
> This is an arm64 device running on 4.1 kernel. Any comments or
> suggestions will be appreciated. Thanks.
>
> Shawn
>
You could try backporting the ZONE_CMA patches
http://article.gmane.org/gmane.linux.kernel.mm/152016 . The primary problem
there was CMA utilization but there was some discussion about migration
success as well http://article.gmane.org/gmane.linux.kernel/2228789
If that doesn't work for you, I think the 'reusable' property can be dropped
and it should just become a DMA coherent pool. I haven't tested this though.
Thanks,
Laura
next prev parent reply other threads:[~2016-06-07 15:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-07 12:59 Shawn Guo
2016-06-07 15:55 ` Laura Abbott [this message]
2016-06-08 11:04 ` Shawn Guo
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=c4ddd222-9bab-e9d5-0c5c-2c02fd3813a8@redhat.com \
--to=labbott@redhat.com \
--cc=arnd@arndb.de \
--cc=iamjoonsoo.kim@lge.com \
--cc=inux-arm-kernel@lists.infradead.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mina86@mina86.com \
--cc=minchan@kernel.org \
--cc=shawnguo@kernel.org \
--cc=vbabka@suse.cz \
/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
all inboxes | Powered by JetHome®