Re: [PATCH] mm: check pfn_valid first in zero_resv_unavail

2017-12-01 Thread Dave Young
On 12/01/17 at 10:42am, Michal Hocko wrote: > On Fri 01-12-17 17:29:51, Dave Young wrote: > > On 12/01/17 at 10:19am, Michal Hocko wrote: > > > On Fri 01-12-17 16:56:57, Dave Young wrote: > > > > On 11/30/17 at 10:35am, Michal Hocko wrote: > > > [...] > > > > > Can we exclude that range from the me

Re: [PATCH] mm: check pfn_valid first in zero_resv_unavail

2017-12-01 Thread Michal Hocko
On Fri 01-12-17 17:29:51, Dave Young wrote: > On 12/01/17 at 10:19am, Michal Hocko wrote: > > On Fri 01-12-17 16:56:57, Dave Young wrote: > > > On 11/30/17 at 10:35am, Michal Hocko wrote: > > [...] > > > > Can we exclude that range from the memblock allocator instead? E.g. what > > > > happens if s

Re: [PATCH] mm: check pfn_valid first in zero_resv_unavail

2017-12-01 Thread Dave Young
On 12/01/17 at 10:19am, Michal Hocko wrote: > On Fri 01-12-17 16:56:57, Dave Young wrote: > > On 11/30/17 at 10:35am, Michal Hocko wrote: > [...] > > > Can we exclude that range from the memblock allocator instead? E.g. what > > > happens if somebody allocates from that range? > > > > It is a EFI

Re: [PATCH] mm: check pfn_valid first in zero_resv_unavail

2017-12-01 Thread Michal Hocko
On Fri 01-12-17 16:56:57, Dave Young wrote: > On 11/30/17 at 10:35am, Michal Hocko wrote: [...] > > Can we exclude that range from the memblock allocator instead? E.g. what > > happens if somebody allocates from that range? > > It is a EFI BGRT image buffer provided by firmware, they are reserved

Re: [PATCH] mm: check pfn_valid first in zero_resv_unavail

2017-12-01 Thread Dave Young
On 11/30/17 at 12:25pm, Pavel Tatashin wrote: > Hi Dave, > > Because unavailable memory can be in the middle of a section, I think > a proper fix would be to do pfn_valid() check only at the beginning of > section. Otherwise, we might miss zeroing a struct page is in the > middle of a section but

Re: [PATCH] mm: check pfn_valid first in zero_resv_unavail

2017-12-01 Thread Dave Young
On 11/30/17 at 10:35am, Michal Hocko wrote: > On Thu 30-11-17 14:04:31, Dave Young wrote: > > With latest kernel I get below bug while testing kdump: > > > > [0.00] BUG: unable to handle kernel paging request at > > ea00034b1040 > > [0.00] IP: zero_resv_unavail+0xbd/0x126 > >

Re: [PATCH] mm: check pfn_valid first in zero_resv_unavail

2017-11-30 Thread Pavel Tatashin
Hi Dave, Because unavailable memory can be in the middle of a section, I think a proper fix would be to do pfn_valid() check only at the beginning of section. Otherwise, we might miss zeroing a struct page is in the middle of a section but pfn_valid() could potentially return false as that page i

Re: [PATCH] mm: check pfn_valid first in zero_resv_unavail

2017-11-30 Thread Michal Hocko
On Thu 30-11-17 14:04:31, Dave Young wrote: > With latest kernel I get below bug while testing kdump: > > [0.00] BUG: unable to handle kernel paging request at ea00034b1040 > [0.00] IP: zero_resv_unavail+0xbd/0x126 > [0.00] PGD 37b98067 P4D 37b98067 PUD 37b97067 PMD 0

[PATCH] mm: check pfn_valid first in zero_resv_unavail

2017-11-29 Thread Dave Young
With latest kernel I get below bug while testing kdump: [0.00] BUG: unable to handle kernel paging request at ea00034b1040 [0.00] IP: zero_resv_unavail+0xbd/0x126 [0.00] PGD 37b98067 P4D 37b98067 PUD 37b97067 PMD 0 [0.00] Oops: 0002 [#1] SMP [0.00] Modu