From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753244AbcAZGAk (ORCPT ); Tue, 26 Jan 2016 01:00:40 -0500 Received: from mail-pf0-f172.google.com ([209.85.192.172]:33727 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbcAZGAh (ORCPT ); Tue, 26 Jan 2016 01:00:37 -0500 Date: Tue, 26 Jan 2016 11:30:28 +0530 From: Sudip Mukherjee To: Dan Williams , Mark Cc: akpm@linux-foundation.org, Rik van Riel , linux-nvdimm@ml01.01.org, Dave Hansen , linux-kernel@vger.kernel.org, Christoph Hellwig , linux-mm@kvack.org, Ingo Molnar , Mel Gorman , "H. Peter Anvin" , Jerome Glisse Subject: Re: [RFC PATCH] mm: support CONFIG_ZONE_DEVICE + CONFIG_ZONE_DMA Message-ID: <20160126060028.GB2053@sudip-laptop> References: <20160126000639.358.89668.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160126000639.358.89668.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 25, 2016 at 04:06:40PM -0800, 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: H. Peter Anvin > Cc: Ingo Molnar > Cc: Rik van Riel > Cc: Mel Gorman > Cc: Jerome Glisse > Cc: Christoph Hellwig > Cc: Dave Hansen > Link: https://bugzilla.kernel.org/show_bug.cgi?id=110931 > Fixes: 033fbae988fc ("mm: ZONE_DEVICE for "device memory"") > Reported-by: Sudip Mukherjee It should actually be Reported-by: Mark Hi Mark, Can you please test this patch available at https://patchwork.kernel.org/patch/8116991/ in your setup.. regards sudip