Re: [PATCH 2/3] x86, mm: Don't clear page table if next range is ram

2012-10-10 Thread Yinghai Lu
On Wed, Oct 10, 2012 at 6:41 AM, Konrad Rzeszutek Wilk wrote: > On Tue, Oct 09, 2012 at 06:00:12PM -0700, Yinghai Lu wrote: >> On Tue, Oct 9, 2012 at 8:46 AM, Konrad Rzeszutek Wilk >> wrote: >> >> + !e820_any_mapped(addr & PAGE_MASK, next, 0)) >> > >> > What is the 0

Re: [PATCH 2/3] x86, mm: Don't clear page table if next range is ram

2012-10-10 Thread Konrad Rzeszutek Wilk
On Tue, Oct 09, 2012 at 06:00:12PM -0700, Yinghai Lu wrote: > On Tue, Oct 9, 2012 at 8:46 AM, Konrad Rzeszutek Wilk > wrote: > >> + !e820_any_mapped(addr & PAGE_MASK, next, 0)) > > > > What is the 0 parameter for? > > any type OK, which means that it either should have

Re: [PATCH 2/3] x86, mm: Don't clear page table if next range is ram

2012-10-10 Thread Konrad Rzeszutek Wilk
On Tue, Oct 09, 2012 at 06:00:12PM -0700, Yinghai Lu wrote: On Tue, Oct 9, 2012 at 8:46 AM, Konrad Rzeszutek Wilk kon...@kernel.org wrote: + !e820_any_mapped(addr PAGE_MASK, next, 0)) What is the 0 parameter for? any type OK, which means that it either should

Re: [PATCH 2/3] x86, mm: Don't clear page table if next range is ram

2012-10-10 Thread Yinghai Lu
On Wed, Oct 10, 2012 at 6:41 AM, Konrad Rzeszutek Wilk kon...@kernel.org wrote: On Tue, Oct 09, 2012 at 06:00:12PM -0700, Yinghai Lu wrote: On Tue, Oct 9, 2012 at 8:46 AM, Konrad Rzeszutek Wilk kon...@kernel.org wrote: + !e820_any_mapped(addr PAGE_MASK, next, 0))

Re: [PATCH 2/3] x86, mm: Don't clear page table if next range is ram

2012-10-09 Thread Yinghai Lu
On Tue, Oct 9, 2012 at 8:46 AM, Konrad Rzeszutek Wilk wrote: >> + !e820_any_mapped(addr & PAGE_MASK, next, 0)) > > What is the 0 parameter for? any type if type != 0, the will only check entries with same type. int e820_any_mapped(u64 start, u64 end, unsigned type) {

Re: [PATCH 2/3] x86, mm: Don't clear page table if next range is ram

2012-10-09 Thread Konrad Rzeszutek Wilk
On Sat, Oct 06, 2012 at 12:44:28AM -0700, Yinghai Lu wrote: > During adding code from BRK to map buffer for final page table, > > It should be safe to remove early_memmap for page table accessing. > > But get panic after that. > > It turns out we clear the initial page table wrongly for next

Re: [PATCH 2/3] x86, mm: Don't clear page table if next range is ram

2012-10-09 Thread Konrad Rzeszutek Wilk
On Sat, Oct 06, 2012 at 12:44:28AM -0700, Yinghai Lu wrote: During adding code from BRK to map buffer for final page table, It should be safe to remove early_memmap for page table accessing. But get panic after that. It turns out we clear the initial page table wrongly for next range

Re: [PATCH 2/3] x86, mm: Don't clear page table if next range is ram

2012-10-09 Thread Yinghai Lu
On Tue, Oct 9, 2012 at 8:46 AM, Konrad Rzeszutek Wilk kon...@kernel.org wrote: + !e820_any_mapped(addr PAGE_MASK, next, 0)) What is the 0 parameter for? any type if type != 0, the will only check entries with same type. int e820_any_mapped(u64 start, u64 end,

[PATCH 2/3] x86, mm: Don't clear page table if next range is ram

2012-10-06 Thread Yinghai Lu
During adding code from BRK to map buffer for final page table, It should be safe to remove early_memmap for page table accessing. But get panic after that. It turns out we clear the initial page table wrongly for next range that is separated by holes. And it only happens when we are trying to

[PATCH 2/3] x86, mm: Don't clear page table if next range is ram

2012-10-06 Thread Yinghai Lu
During adding code from BRK to map buffer for final page table, It should be safe to remove early_memmap for page table accessing. But get panic after that. It turns out we clear the initial page table wrongly for next range that is separated by holes. And it only happens when we are trying to