Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752797AbbDEUGa (ORCPT ); Sun, 5 Apr 2015 16:06:30 -0400 Received: from mail-ie0-f177.google.com ([209.85.223.177]:33890 "EHLO mail-ie0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752528AbbDEUG2 (ORCPT ); Sun, 5 Apr 2015 16:06:28 -0400 MIME-Version: 1.0 In-Reply-To: <5520FDCB.80505@plexistor.com> References: <1427872339-6688-1-git-send-email-hch@lst.de> <1427872339-6688-2-git-send-email-hch@lst.de> <1428077687.31093.120.camel@misato.fc.hp.com> <5520FDCB.80505@plexistor.com> Date: Sun, 5 Apr 2015 13:06:27 -0700 X-Google-Sender-Auth: iEaHE0Bty0WFihXO_U6-RT__zUM Message-ID: Subject: Re: [Linux-nvdimm] [PATCH 1/2] x86: add support for the non-standard protected e820 type From: Yinghai Lu To: Boaz Harrosh Cc: Toshi Kani , Jens Axboe , linux-nvdimm@ml01.01.org, "the arch/x86 maintainers" , Linux Kernel Mailing List , linux-fsdevel@vger.kernel.org, Christoph Hellwig Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2762 Lines: 66 On Sun, Apr 5, 2015 at 2:18 AM, Boaz Harrosh wrote: > On 04/03/2015 08:12 PM, Yinghai Lu wrote: >> On Fri, Apr 3, 2015 at 9:14 AM, Toshi Kani wrote: >>> On Wed, 2015-04-01 at 09:12 +0200, Christoph Hellwig wrote: >>> : >>>> @@ -748,7 +758,7 @@ u64 __init early_reserve_e820(u64 size, u64 align) >>>> /* >>>> * Find the highest page frame number we have available >>>> */ >>>> -static unsigned long __init e820_end_pfn(unsigned long limit_pfn, unsigned type) >>>> +static unsigned long __init e820_end_pfn(unsigned long limit_pfn) >>>> { >>>> int i; >>>> unsigned long last_pfn = 0; >>>> @@ -759,7 +769,11 @@ static unsigned long __init e820_end_pfn(unsigned long limit_pfn, unsigned type) >>>> unsigned long start_pfn; >>>> unsigned long end_pfn; >>>> >>>> - if (ei->type != type) >>>> + /* >>>> + * Persistent memory is accounted as ram for purposes of >>>> + * establishing max_pfn and mem_map. >>>> + */ >>>> + if (ei->type != E820_RAM && ei->type != E820_PRAM) >>>> continue; >>> >>> Should we also delete this code, accounting E820_PRAM as ram, along with >>> the deletion of reserve_pmem() in this version? >> > > Hi Yinghai, Toshi > > In my old patches I did not have these updates as well, and everything > was very much usable, for a long time. > > However. I actually liked these changes in Christoph's patches and > thought they should stay, here is why. > > Today I will be sending patches to make pmem be supported with > page-struct as an optional alternative to the use of ioremap. > This is for advanced users that wants to RDMA direct_IO and so > on directly out of pmem. but it is not related. Should just remove those lines. And even his original changes about memblock is not needed. | You did not modify memblock_x86_fill() to treat | E820_PRAM as E820_RAM, so memblock will not have any | entry for E820_PRAM, so you do not need to call memblock_reserve | there. | | And the same time, init_memory_mapping() will call | init_range_memory_mapping/for_each_mem_pfn_range() to | set kernel mapping for memory range in memblock only. | So here calling init_memory_mapping will not do anything. | then just drop calling to that init_memory_mapping. | --- so will not kernel mapping pmem, is that what you intended to have? | | After those two changes, You do not need this reserve_pmem at all. | Just drop it. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/