Re: [PATCH 27/42] x86: restore end_of_ram to E820_RAM

2015-07-09 Thread Matt Fleming
On Thu, 09 Jul, at 09:45:41AM, Christoph Hellwig wrote:
> Btw, where is this patch coming from?  It looks reasonable but I didn't
> see it on any list.

It's on LKML, original patch is here,

  
https://lkml.kernel.org/r/1436300428-21163-28-git-send-email-ying...@kernel.org

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 27/42] x86: restore end_of_ram to E820_RAM

2015-07-09 Thread Christoph Hellwig
Btw, where is this patch coming from?  It looks reasonable but I didn't
see it on any list.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 27/42] x86: restore end_of_ram to E820_RAM

2015-07-08 Thread Dan Williams
On Wed, Jul 8, 2015 at 10:44 AM, Matt Fleming  wrote:
> On Tue, 07 Jul, at 01:20:13PM, Yinghai Lu wrote:
>> We don't need to create mapping for E820_PRAM.
>>
>> Signed-off-by: Yinghai Lu 
>> ---
>>  arch/x86/kernel/e820.c | 12 
>>  1 file changed, 4 insertions(+), 8 deletions(-)
>>
>> diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
>> index a102564..46ec08d 100644
>> --- a/arch/x86/kernel/e820.c
>> +++ b/arch/x86/kernel/e820.c
>> @@ -753,7 +753,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)
>> +static unsigned long __init e820_end_pfn(unsigned long limit_pfn, unsigned 
>> type)
>>  {
>>   int i;
>>   unsigned long last_pfn = 0;
>> @@ -764,11 +764,7 @@ static unsigned long __init e820_end_pfn(unsigned long 
>> limit_pfn)
>>   unsigned long start_pfn;
>>   unsigned long end_pfn;
>>
>> - /*
>> -  * Persistent memory is accounted as ram for purposes of
>> -  * establishing max_pfn and mem_map.
>> -  */
>> - if (ei->type != E820_RAM && ei->type != E820_PRAM)
>> + if (ei->type != type)
>>   continue;
>>
>>   start_pfn = ei->addr >> PAGE_SHIFT;
>> @@ -793,12 +789,12 @@ static unsigned long __init e820_end_pfn(unsigned long 
>> limit_pfn)
>>  }
>>  unsigned long __init e820_end_of_ram_pfn(void)
>>  {
>> - return e820_end_pfn(MAX_ARCH_PFN);
>> + return e820_end_pfn(MAX_ARCH_PFN, E820_RAM);
>>  }
>>
>>  unsigned long __init e820_end_of_low_ram_pfn(void)
>>  {
>> - return e820_end_pfn(1UL << (32-PAGE_SHIFT));
>> + return e820_end_pfn(1UL<<(32 - PAGE_SHIFT), E820_RAM);
>>  }
>>
>>  static void early_panic(char *msg)
>
> Could you explain why you no longer want to allow pesistent memory to be
> used in figuring out max_pfn? This partially reverts commit ec776ef6bbe1
> ("x86/mm: Add support for the non-standard protected e820 type").
>

pmem is accessed through the driver or through ->direct_access().
Existing NVDIMM devices are already pushing hundreds of gigabytes
which is too large to provide "struct page" coverage by default.
We're looking at other means to provide "struct page" for pmem.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 27/42] x86: restore end_of_ram to E820_RAM

2015-07-08 Thread Matt Fleming
On Tue, 07 Jul, at 01:20:13PM, Yinghai Lu wrote:
> We don't need to create mapping for E820_PRAM.
> 
> Signed-off-by: Yinghai Lu 
> ---
>  arch/x86/kernel/e820.c | 12 
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
> index a102564..46ec08d 100644
> --- a/arch/x86/kernel/e820.c
> +++ b/arch/x86/kernel/e820.c
> @@ -753,7 +753,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)
> +static unsigned long __init e820_end_pfn(unsigned long limit_pfn, unsigned 
> type)
>  {
>   int i;
>   unsigned long last_pfn = 0;
> @@ -764,11 +764,7 @@ static unsigned long __init e820_end_pfn(unsigned long 
> limit_pfn)
>   unsigned long start_pfn;
>   unsigned long end_pfn;
>  
> - /*
> -  * Persistent memory is accounted as ram for purposes of
> -  * establishing max_pfn and mem_map.
> -  */
> - if (ei->type != E820_RAM && ei->type != E820_PRAM)
> + if (ei->type != type)
>   continue;
>  
>   start_pfn = ei->addr >> PAGE_SHIFT;
> @@ -793,12 +789,12 @@ static unsigned long __init e820_end_pfn(unsigned long 
> limit_pfn)
>  }
>  unsigned long __init e820_end_of_ram_pfn(void)
>  {
> - return e820_end_pfn(MAX_ARCH_PFN);
> + return e820_end_pfn(MAX_ARCH_PFN, E820_RAM);
>  }
>  
>  unsigned long __init e820_end_of_low_ram_pfn(void)
>  {
> - return e820_end_pfn(1UL << (32-PAGE_SHIFT));
> + return e820_end_pfn(1UL<<(32 - PAGE_SHIFT), E820_RAM);
>  }
>  
>  static void early_panic(char *msg)

Could you explain why you no longer want to allow pesistent memory to be
used in figuring out max_pfn? This partially reverts commit ec776ef6bbe1
("x86/mm: Add support for the non-standard protected e820 type").

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 27/42] x86: restore end_of_ram to E820_RAM

2015-07-07 Thread Yinghai Lu
We don't need to create mapping for E820_PRAM.

Signed-off-by: Yinghai Lu 
---
 arch/x86/kernel/e820.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index a102564..46ec08d 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -753,7 +753,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)
+static unsigned long __init e820_end_pfn(unsigned long limit_pfn, unsigned 
type)
 {
int i;
unsigned long last_pfn = 0;
@@ -764,11 +764,7 @@ static unsigned long __init e820_end_pfn(unsigned long 
limit_pfn)
unsigned long start_pfn;
unsigned long end_pfn;
 
-   /*
-* Persistent memory is accounted as ram for purposes of
-* establishing max_pfn and mem_map.
-*/
-   if (ei->type != E820_RAM && ei->type != E820_PRAM)
+   if (ei->type != type)
continue;
 
start_pfn = ei->addr >> PAGE_SHIFT;
@@ -793,12 +789,12 @@ static unsigned long __init e820_end_pfn(unsigned long 
limit_pfn)
 }
 unsigned long __init e820_end_of_ram_pfn(void)
 {
-   return e820_end_pfn(MAX_ARCH_PFN);
+   return e820_end_pfn(MAX_ARCH_PFN, E820_RAM);
 }
 
 unsigned long __init e820_end_of_low_ram_pfn(void)
 {
-   return e820_end_pfn(1UL << (32-PAGE_SHIFT));
+   return e820_end_pfn(1UL<<(32 - PAGE_SHIFT), E820_RAM);
 }
 
 static void early_panic(char *msg)
-- 
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/