All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: fix the check of e_pfn in xen_find_pfn_range
@ 2015-10-27 19:19 Konrad Rzeszutek Wilk
  2015-11-02 17:50 ` David Vrabel
  0 siblings, 1 reply; 5+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-10-27 19:19 UTC (permalink / raw)
  To: xen-devel, david.vrabel; +Cc: Zhenzhong Duan, Konrad Rzeszutek Wilk

From: Zhenzhong Duan <zhenzhong.duan@oracle.com>

On some NUMA system, after dom0 up, we see below warning even if there are
enough pfn ranges that could be used for remapping:
"Unable to find available pfn range, not remapping identity pages"

Fix it to avoid getting a memory region of zero size in xen_find_pfn_range.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 arch/x86/xen/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 387b60d..d1fac0e 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -212,7 +212,7 @@ static unsigned long __init xen_find_pfn_range(unsigned long *min_pfn)
 		e_pfn = PFN_DOWN(entry->addr + entry->size);
 
 		/* We only care about E820 after this */
-		if (e_pfn < *min_pfn)
+		if (e_pfn <= *min_pfn)
 			continue;
 
 		s_pfn = PFN_UP(entry->addr);
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] xen: fix the check of e_pfn in xen_find_pfn_range
  2015-10-27 19:19 [PATCH] xen: fix the check of e_pfn in xen_find_pfn_range Konrad Rzeszutek Wilk
@ 2015-11-02 17:50 ` David Vrabel
  0 siblings, 0 replies; 5+ messages in thread
From: David Vrabel @ 2015-11-02 17:50 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, xen-devel, david.vrabel; +Cc: Zhenzhong Duan

On 27/10/15 19:19, Konrad Rzeszutek Wilk wrote:
> From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
> 
> On some NUMA system, after dom0 up, we see below warning even if there are
> enough pfn ranges that could be used for remapping:
> "Unable to find available pfn range, not remapping identity pages"
> 
> Fix it to avoid getting a memory region of zero size in xen_find_pfn_range.

Applied to for-linus-4.4, thanks.

David

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xen: fix the check of e_pfn in xen_find_pfn_range
  2015-09-02 11:04 ` Juergen Gross
@ 2015-09-15  2:02   ` Zhenzhong Duan
  0 siblings, 0 replies; 5+ messages in thread
From: Zhenzhong Duan @ 2015-09-15  2:02 UTC (permalink / raw)
  To: david.vrabel; +Cc: Juergen Gross, LKML, konrad.wilk, boris.ostrovsky

Hi David

Konrad just ping me on this patch. I originally think I missed to cc you 
but I does.
Could you ack or nak it?

thanks
zduan

在 2015/9/2 19:04, Juergen Gross 写道:
> On 09/02/2015 12:51 PM, Zhenzhong Duan wrote:
>> On some numa system, after dom0 up, we see below warning even if 
>> there are
>> enough pfn ranges could be used for remapping.
>> "Unable to find available pfn range, not remapping identity pages"
>>
>> Fix it to avoid getting a memory region of zero size in 
>> xen_find_pfn_range.
>>
>> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
>
> Reviewed-by: Juergen Gross <jgross@suse.com>
>
>> ---
>>   arch/x86/xen/setup.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
>> index a3a7546..c11f6b2 100644
>> --- a/arch/x86/xen/setup.c
>> +++ b/arch/x86/xen/setup.c
>> @@ -178,7 +178,7 @@ static unsigned long __init xen_find_pfn_range(
>>           e_pfn = PFN_DOWN(entry->addr + entry->size);
>>
>>           /* We only care about E820 after this */
>> -        if (e_pfn < *min_pfn)
>> +        if (e_pfn <= *min_pfn)
>>               continue;
>>
>>           s_pfn = PFN_UP(entry->addr);
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xen: fix the check of e_pfn in xen_find_pfn_range
  2015-09-02 10:51 Zhenzhong Duan
@ 2015-09-02 11:04 ` Juergen Gross
  2015-09-15  2:02   ` Zhenzhong Duan
  0 siblings, 1 reply; 5+ messages in thread
From: Juergen Gross @ 2015-09-02 11:04 UTC (permalink / raw)
  To: zhenzhong.duan, LKML; +Cc: david.vrabel, konrad.wilk, boris.ostrovsky

On 09/02/2015 12:51 PM, Zhenzhong Duan wrote:
> On some numa system, after dom0 up, we see below warning even if there are
> enough pfn ranges could be used for remapping.
> "Unable to find available pfn range, not remapping identity pages"
>
> Fix it to avoid getting a memory region of zero size in xen_find_pfn_range.
>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>

Reviewed-by: Juergen Gross <jgross@suse.com>

> ---
>   arch/x86/xen/setup.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
> index a3a7546..c11f6b2 100644
> --- a/arch/x86/xen/setup.c
> +++ b/arch/x86/xen/setup.c
> @@ -178,7 +178,7 @@ static unsigned long __init xen_find_pfn_range(
>           e_pfn = PFN_DOWN(entry->addr + entry->size);
>
>           /* We only care about E820 after this */
> -        if (e_pfn < *min_pfn)
> +        if (e_pfn <= *min_pfn)
>               continue;
>
>           s_pfn = PFN_UP(entry->addr);


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] xen: fix the check of e_pfn in xen_find_pfn_range
@ 2015-09-02 10:51 Zhenzhong Duan
  2015-09-02 11:04 ` Juergen Gross
  0 siblings, 1 reply; 5+ messages in thread
From: Zhenzhong Duan @ 2015-09-02 10:51 UTC (permalink / raw)
  To: LKML; +Cc: jgross, david.vrabel, konrad.wilk, boris.ostrovsky

On some numa system, after dom0 up, we see below warning even if there are
enough pfn ranges could be used for remapping.
"Unable to find available pfn range, not remapping identity pages"

Fix it to avoid getting a memory region of zero size in xen_find_pfn_range.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
---
  arch/x86/xen/setup.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index a3a7546..c11f6b2 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -178,7 +178,7 @@ static unsigned long __init xen_find_pfn_range(
  		e_pfn = PFN_DOWN(entry->addr + entry->size);
  
  		/* We only care about E820 after this */
-		if (e_pfn < *min_pfn)
+		if (e_pfn <= *min_pfn)
  			continue;
  
  		s_pfn = PFN_UP(entry->addr);
-- 
1.7.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-02 17:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-27 19:19 [PATCH] xen: fix the check of e_pfn in xen_find_pfn_range Konrad Rzeszutek Wilk
2015-11-02 17:50 ` David Vrabel
  -- strict thread matches above, loose matches on Subject: below --
2015-09-02 10:51 Zhenzhong Duan
2015-09-02 11:04 ` Juergen Gross
2015-09-15  2:02   ` Zhenzhong Duan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.