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]
Date:	Tue, 26 Jan 2016 13:48:14 -0800
From:	Dan Williams <dan.j.williams@...el.com>
To:	Vlastimil Babka <vbabka@...e.cz>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Rik van Riel <riel@...hat.com>,
	"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Christoph Hellwig <hch@....de>, Linux MM <linux-mm@...ck.org>,
	Ingo Molnar <mingo@...hat.com>, Mel Gorman <mgorman@...e.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Jerome Glisse <j.glisse@...il.com>,
	Sudip Mukherjee <sudipm.mukherjee@...il.com>,
	Joonsoo Kim <iamjoonsoo.kim@....com>,
	Laura Abbott <labbott@...oraproject.org>
Subject: Re: [RFC PATCH] mm: support CONFIG_ZONE_DEVICE + CONFIG_ZONE_DMA

On Tue, Jan 26, 2016 at 1:42 PM, Vlastimil Babka <vbabka@...e.cz> wrote:
> On 26.1.2016 1:06, Dan Williams wrote:
>> It appears devices requiring ZONE_DMA are still prevalent (see link
>> below).  For this reason the proposal to require turning off ZONE_DMA to
>> enable ZONE_DEVICE is untenable in the short term.  We want a single
>> kernel image to be able to support legacy devices as well as next
>> generation persistent memory platforms.
>>
>> Towards this end, alias ZONE_DMA and ZONE_DEVICE to work around needing
>> to maintain a unique zone number for ZONE_DEVICE.  Record the geometry
>> of ZONE_DMA at init (->init_spanned_pages) and use that information in
>> is_zone_device_page() to differentiate pages allocated via
>> devm_memremap_pages() vs true ZONE_DMA pages.  Otherwise, use the
>> simpler definition of is_zone_device_page() when ZONE_DMA is turned off.
>>
>> Note that this also teaches the memory hot remove path that the zone may
>> not have sections for all pfn spans (->zone_dyn_start_pfn).
>>
>> A user visible implication of this change is potentially an unexpectedly
>> high "spanned" value in /proc/zoneinfo for the DMA zone.
>
> [+CC Joonsoo, Laura]
>
> Sounds like quite a hack :(

Indeed...

> Would it be possible to extend the bits encoding
> zone? Potentially, ZONE_CMA could be added one day...

Not without impacting the ability to quickly lookup the numa node and
parent section for a page.  See ZONES_WIDTH, NODES_WIDTH, and
SECTIONS_WIDTH.

My initial implementation of ZONE_DEVICE ran into this conflict when
ZONES_SHIFT is > 2, and I fell back to cannibalizing ZONE_DMA.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ