lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c4ddd222-9bab-e9d5-0c5c-2c02fd3813a8@redhat.com>
Date:	Tue, 7 Jun 2016 08:55:54 -0700
From:	Laura Abbott <labbott@...hat.com>
To:	Shawn Guo <shawnguo@...nel.org>, linux-kernel@...r.kernel.org,
	inux-arm-kernel@...ts.infradead.org
Cc:	Marek Szyprowski <m.szyprowski@...sung.com>,
	Arnd Bergmann <arnd@...db.de>,
	Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
	Michal Nazarewicz <mina86@...a86.com>,
	Vlastimil Babka <vbabka@...e.cz>,
	Minchan Kim <minchan@...nel.org>,
	Joonsoo Kim <iamjoonsoo.kim@....com>
Subject: Re: CMA region absolutely for a particular device?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ