Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread H. Peter Anvin
Is that an actual requirement of the API? Xishi Qiu wrote: >On 2013/12/11 12:02, H. Peter Anvin wrote: > >> On 12/10/2013 07:55 PM, Xishi Qiu wrote: >>> >>> I think there is a problem. >>> e.g. >>> [start, end)=[8, 12), and [A, B)=[0, 10), [B, C)=[10,20), >>> then e820_all_mapped() will return 1,

Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread Xishi Qiu
On 2013/12/11 12:02, H. Peter Anvin wrote: > On 12/10/2013 07:55 PM, Xishi Qiu wrote: >> >> I think there is a problem. >> e.g. >> [start, end)=[8, 12), and [A, B)=[0, 10), [B, C)=[10,20), >> then e820_all_mapped() will return 1, it spans two regions. >> > > Why is that a problem? > [start, end

Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread H. Peter Anvin
On 12/10/2013 07:55 PM, Xishi Qiu wrote: > > I think there is a problem. > e.g. > [start, end)=[8, 12), and [A, B)=[0, 10), [B, C)=[10,20), > then e820_all_mapped() will return 1, it spans two regions. > Why is that a problem? -hpa -- To unsubscribe from this list: send the line "unsu

Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread Xishi Qiu
On 2013/12/11 10:55, H. Peter Anvin wrote: > On 12/10/2013 05:35 PM, Xishi Qiu wrote: >> >> In this case, old code is right, but I discuss in another one that >> you wrote above. >> > > So is there a problem or not? I have lost track... > I think there is a problem. e.g. [start, end)=[8, 12),

Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread H. Peter Anvin
On 12/10/2013 05:35 PM, Xishi Qiu wrote: > > In this case, old code is right, but I discuss in another one that > you wrote above. > So is there a problem or not? I have lost track... -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a mes

Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread Xishi Qiu
On 2013/12/11 9:06, H. Peter Anvin wrote: > Ok, the issue I thought we were discussing was actually [A,B) [B,C) [C,D) ... > Hi Peter, Yes, in this case the function will return 1. Thanks, Xishi Qiu > Yinghai Lu wrote: >> On Tue, Dec 10, 2013 at 2:51 PM, H. Peter Anvin wrote: >>> On 12/10/20

Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread Xishi Qiu
On 2013/12/11 5:06, Yinghai Lu wrote: > On Tue, Dec 10, 2013 at 1:06 AM, Xishi Qiu wrote: >> In the following case, e820_all_mapped() will return 1. >> A < start < B-1 and B < end < C, it means spans two regions. >> : [start - end] >> e820 addr: ...[A - B-1][B - C]... > > sho

Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread H. Peter Anvin
Ok, the issue I thought we were discussing was actually [A,B) [B,C) [C,D) ... Yinghai Lu wrote: >On Tue, Dec 10, 2013 at 2:51 PM, H. Peter Anvin wrote: >> On 12/10/2013 01:52 PM, Yinghai Lu wrote: What happens if it spans more than two regions? >>> >>> [A, B), [B+1, C), [C+1, D) ? >>>

Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread Yinghai Lu
On Tue, Dec 10, 2013 at 2:51 PM, H. Peter Anvin wrote: > On 12/10/2013 01:52 PM, Yinghai Lu wrote: >>> >>> What happens if it spans more than two regions? >> >> [A, B), [B+1, C), [C+1, D) ? >> start in [A, B), and end in [C+1, D). >> >> old code: >> first with [A, B), start set to B. >> then with

Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread H. Peter Anvin
On 12/10/2013 01:52 PM, Yinghai Lu wrote: >> >> What happens if it spans more than two regions? > > [A, B), [B+1, C), [C+1, D) ? > start in [A, B), and end in [C+1, D). > > old code: > first with [A, B), start set to B. > then with [B+1, C), start still keep as B. > then with [C+1, D), start stil

Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread Yinghai Lu
On Tue, Dec 10, 2013 at 1:29 PM, H. Peter Anvin wrote: > On 12/10/2013 01:06 PM, Yinghai Lu wrote: >> On Tue, Dec 10, 2013 at 1:06 AM, Xishi Qiu wrote: >>> In the following case, e820_all_mapped() will return 1. >>> A < start < B-1 and B < end < C, it means spans two regions. >>> : [st

Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread H. Peter Anvin
On 12/10/2013 01:06 PM, Yinghai Lu wrote: > On Tue, Dec 10, 2013 at 1:06 AM, Xishi Qiu wrote: >> In the following case, e820_all_mapped() will return 1. >> A < start < B-1 and B < end < C, it means spans two regions. >> : [start - end] >> e820 addr: ...[A - B-1][B - C]... > >

Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread Yinghai Lu
On Tue, Dec 10, 2013 at 1:06 AM, Xishi Qiu wrote: > In the following case, e820_all_mapped() will return 1. > A < start < B-1 and B < end < C, it means spans two regions. > : [start - end] > e820 addr: ...[A - B-1][B - C]... should be [start, end) right? and [A, B),[B, C) > >

[PATCH] mm,x86: fix span coverage in e820_all_mapped()

2013-12-10 Thread Xishi Qiu
In the following case, e820_all_mapped() will return 1. A < start < B-1 and B < end < C, it means spans two regions. : [start - end] e820 addr: ...[A - B-1][B - C]... Signed-off-by: Xishi Qiu --- arch/x86/kernel/e820.c | 15 +++ 1 files changed, 3 insertions(+),