public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* CMA region absolutely for a particular device?
@ 2016-06-07 12:59 Shawn Guo
  2016-06-07 15:55 ` Laura Abbott
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn Guo @ 2016-06-07 12:59 UTC (permalink / raw)
  To: linux-kernel, inux-arm-kernel
  Cc: Marek Szyprowski, Arnd Bergmann, Laurent Pinchart,
	Michal Nazarewicz, Vlastimil Babka, Laura Abbott, Minchan Kim,
	Joonsoo Kim, Shawn Guo

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-08 11:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-07 12:59 CMA region absolutely for a particular device? Shawn Guo
2016-06-07 15:55 ` Laura Abbott
2016-06-08 11:04   ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox