On Sat, Jun 16, 2018 at 4:04 AM Jiri Slaby wrote:
>
> On 11/21/2017, 08:24 AM, Michal Hocko wrote:
> > On Thu 16-11-17 20:46:01, Pavel Tatashin wrote:
> >> There is no need to have ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT,
> >> as all the page initialization code is
On Tue, Jun 19, 2018 at 9:50 AM Pavel Tatashin
wrote:
>
> On Sat, Jun 16, 2018 at 4:04 AM Jiri Slaby wrote:
> >
> > On 11/21/2017, 08:24 AM, Michal Hocko wrote:
> > > On Thu 16-11-17 20:46:01, Pavel Tatashin wrote:
> > >> There is no need to have
Thank you Andy for the heads up. I might need to rebase my work
(http://lkml.kernel.org/r/20180629182541.6735-1-pasha.tatas...@oracle.com)
based on this change. But, it is possible it is going to be harder to
parallelize based on device tree. I will need to think about it.
Pavel
On Tue, Jul 3, 20
I am OK, if this patch is removed from Baoquan's series. But, I would
still like to get rid of CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER, I
can work on this in my sparse_init re-write series. ppc64 should
really fallback safely to small chunks allocs, and if it does not
there is some existing bug. Mi
On Thu, Jul 12, 2018 at 5:50 AM Oscar Salvador
wrote:
>
> > > I just roughly check, but if I checked the right place,
> > > vmemmap_populated() checks for the section to contain the flags we are
> > > setting in sparse_init_one_section().
> >
> > Yes.
> >
> > > But with this patch, we populate fir
> Related commit could be one of below ? I see lots of patches related to mm
> and could not bisect
>
> 5479976fda7d3ab23ba0a4eb4d60b296eb88b866 mm: page_alloc: restore
> memblock_next_valid_pfn() on arm/arm64
> 41619b27b5696e7e5ef76d9c692dd7342c1ad7eb
> mm-drop-vm_bug_on-from-__get_free_pages-f
On Tue, Jul 17, 2018 at 6:49 AM Abdul Haleem
wrote:
>
> On Sat, 2018-07-14 at 10:55 +1000, Stephen Rothwell wrote:
> > Hi Abdul,
> >
> > On Fri, 13 Jul 2018 14:43:11 +0530 Abdul Haleem
> > wrote:
> > >
> > > On Thu, 2018-07-12 at 13:44 -0400, Pave
quot; using the
boot CPU. This patch solves this problem, by deferring zeroing "struct
pages" to only when they are initialized.
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
arch/powerpc/mm/init_64.c |2 +-
arch/sparc/mm/init_64.c |2 +-
arch/x86/mm/init_64.c
size)
because there are twice as many "struct page"es for the same amount of memory,
as base pages are twice smaller.
Pavel Tatashin (5):
sparc64: simplify vmemmap_populate
mm: defining memblock_virt_alloc_try_nid_raw
mm: add "zero" argument to vmemmap allocators
m
Remove duplicating code, by using common functions
vmemmap_pud_populate and vmemmap_pgd_populate functions.
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
arch/sparc/mm/init_64.c | 23 ++-
1 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/arch
memory or can deffer it.
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
include/linux/mm.h |9 +
mm/page_alloc.c|3 +++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 54df194..eb052f6 100644
--- a/inc
A new version of memblock_virt_alloc_* allocations:
- Does not zero the allocated memory
- Does not panic if request cannot be satisfied
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
include/linux/bootmem.h |3 +++
mm/memblock.c | 46
: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
arch/powerpc/mm/init_64.c |4 +-
arch/s390/mm/vmem.c |5 ++-
arch/sparc/mm/init_64.c |3 +-
arch/x86/mm/init_64.c |3 +-
include/linux/mm.h|6 ++--
mm/sparse-vmemmap.c | 48
A new version of memblock_virt_alloc_* allocations:
- Does not zero the allocated memory
- Does not panic if request cannot be satisfied
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
include/linux/bootmem.h |3 +++
mm/memblock.c | 46
memory or can deffer it.
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
include/linux/mm.h |9 +
mm/page_alloc.c|3 +++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 54df194..eb052f6 100644
--- a/inc
quot; using the
boot CPU. This patch solves this problem, by deferring zeroing "struct
pages" to only when they are initialized.
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
arch/powerpc/mm/init_64.c |2 +-
arch/s390/mm/vmem.c |2 +-
arch/sparc/mm/init
: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
arch/powerpc/mm/init_64.c |4 +-
arch/s390/mm/vmem.c |5 ++-
arch/sparc/mm/init_64.c |3 +-
arch/x86/mm/init_64.c |3 +-
include/linux/mm.h|6 ++--
mm/sparse-vmemmap.c | 48
t it takes only additional 0.456s per node, which
means on Intel we also benefit from having memset() and initializing all
other fields in one place.
Pavel Tatashin (5):
sparc64: simplify vmemmap_populate
mm: defining memblock_virt_alloc_try_nid_raw
mm: add "zero" argument to vme
Remove duplicating code, by using common functions
vmemmap_pud_populate and vmemmap_pgd_populate functions.
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
arch/sparc/mm/init_64.c | 23 ++-
1 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/arch
A new version of memblock_virt_alloc_* allocations:
- Does not zero the allocated memory
- Does not panic if request cannot be satisfied
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
include/linux/bootmem.h |3 +++
mm/memblock.c | 46
memory or can deffer it.
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
include/linux/mm.h |9 +
mm/page_alloc.c|3 +++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 4375015..1c481fc 100644
--- a/inc
quot; using the
boot CPU. This patch solves this problem, by deferring zeroing "struct
pages" to only when they are initialized on s390 platforms.
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
arch/s390/mm/vmem.c |2 +-
1 files changed, 1 insertions(+), 1 deletions
quot; using the
boot CPU. This patch solves this problem, by deferring zeroing "struct
pages" to only when they are initialized on x86 platforms.
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
arch/x86/mm/init_64.c |2 +-
1 files changed, 1 insertions(+), 1 deletion
: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
arch/powerpc/mm/init_64.c |4 +-
arch/s390/mm/vmem.c |5 ++-
arch/sparc/mm/init_64.c |3 +-
arch/x86/mm/init_64.c |3 +-
include/linux/mm.h|6 ++--
mm/sparse-vmemmap.c | 48
quot; using the
boot CPU. This patch solves this problem, by deferring zeroing "struct
pages" to only when they are initialized on SPARC.
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
arch/sparc/mm/init_64.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(
memmap_buf beforehand. Let clients of alloc_block_buf() to
decide whether that is needed.
Signed-off-by: Pavel Tatashin
---
mm/sparse-vmemmap.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
index 5d255b0..1e9508b 100644
--- a/mm/sparse
Remove duplicating code, by using common functions
vmemmap_pud_populate and vmemmap_pgd_populate functions.
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
arch/sparc/mm/init_64.c | 23 ++-
1 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/arch
enefit from having memset() and initializing all
other fields in one place.
Pavel Tatashin (9):
sparc64: simplify vmemmap_populate
mm: defining memblock_virt_alloc_try_nid_raw
mm: add "zero" argument to vmemmap allocators
mm: do not zero vmemmap_buf
mm: zero struct pages dur
quot; using the
boot CPU. This patch solves this problem, by deferring zeroing "struct
pages" to only when they are initialized on PowerPC platforms.
Signed-off-by: Pavel Tatashin
Reviewed-by: Shannon Nelson
---
arch/powerpc/mm/init_64.c |2 +-
1 files changed, 1 insertions(+), 1 d
To optimize the performance of struct page initialization,
vmemmap_populate() will no longer zero memory.
We must explicitly zero the memory that is allocated by vmemmap_populate()
for kasan, as this memory does not go through struct page initialization
path.
Signed-off-by: Pavel Tatashin
is a fixed time: it
does not increase as memory is increased.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
---
arch/sparc/include/asm/pgtable_64.h | 30 ++
1 file changed, 30 insertions(+)
diff --g
fore, the fix is to switch the above calls.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
---
arch/sparc/mm/init_64.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc
Remove duplicating code by using common functions
vmemmap_pud_populate and vmemmap_pgd_populate.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
---
arch/sparc/mm/init_64.c | 23 ++-
1 file changed, 6 insertions
at struct pages are properly
initialized prior to using them.
The deferred-reserved pages are initialized in free_all_bootmem().
Therefore, the fix is to switch the above calls.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
---
arch/x
To optimize the performance of struct page initialization,
vmemmap_populate() will no longer zero memory.
We must explicitly zero the memory that is allocated by vmemmap_populate()
for kasan, as this memory does not go through struct page initialization
path.
Signed-off-by: Pavel Tatashin
no deferred: https://hastebin.com/muhegoheyi.go
sparc fix deferred: https://hastebin.com/xadinobutu.go
Pavel Tatashin (11):
x86/mm: setting fields in deferred pages
sparc64/mm: setting fields in deferred pages
mm: deferred_init_memmap improvements
sparc64: simplify vmemmap_pop
uct pages explicitly.
The patch involves adding a new memblock iterator:
for_each_resv_unavail_range(i, p_start, p_end)
Which iterates through reserved && !memory lists, and we zero struct pages
explicitly by calling mm_zero_struct_page().
Signed-off-by: Pavel Tatashin
Reviewed
linux would get memory corruptions. I have fixed this issue by
defining a new macro that performs all the necessary operations when we
free the current set of pages.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by:
ement by zeroing the memory in parallel
when struct pages are zeroed.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
---
include/linux/mm.h | 11 +++
mm/sparse-vmemmap.c | 14 +++---
mm/sparse.c | 6 +++---
3
called from zone_sizes_init().
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: Michal Hocko
---
include/linux/mm.h | 9 +
mm/page_alloc.c| 1 +
2 files changed, 10 insertions(+)
diff --git a/include/linux/mm.h b
r raw alloctor
When CONFIG_DEBUG_VM is enabled, this patch sets all the memory that is
returned by memblock_virt_alloc_try_nid_raw() to ones to ensure that no
places excpect zeroed memory.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Ack
at struct pages are properly
initialized prior to using them.
The deferred-reserved pages are initialized in free_all_bootmem().
Therefore, the fix is to switch the above calls.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
---
arch/x
called from zone_sizes_init().
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: Michal Hocko
---
include/linux/mm.h | 9 +
mm/page_alloc.c| 1 +
2 files changed, 10 insertions(+)
diff --git a/include/linux/mm.h b
uct pages explicitly.
The patch involves adding a new memblock iterator:
for_each_resv_unavail_range(i, p_start, p_end)
Which iterates through reserved && !memory lists, and we zero struct pages
explicitly by calling mm_zero_struct_page().
Signed-off-by: Pavel Tatashin
Reviewed
Remove duplicating code by using common functions
vmemmap_pud_populate and vmemmap_pgd_populate.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: David S. Miller
---
arch/sparc/mm/init_64.c | 23 ++-
1
ement by zeroing the memory in parallel
when struct pages are zeroed.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
---
include/linux/mm.h | 11 +++
mm/sparse-vmemmap.c | 15 +++
mm/sparse.c | 6 +++-
linux would get memory corruptions. I have fixed this issue by
defining a new macro that performs all the necessary operations when we
free the current set of pages.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by:
To optimize the performance of struct page initialization,
vmemmap_populate() will no longer zero memory.
We must explicitly zero the memory that is allocated by vmemmap_populate()
for kasan, as this memory does not go through struct page initialization
path.
Signed-off-by: Pavel Tatashin
r raw alloctor
When CONFIG_DEBUG_VM is enabled, this patch sets all the memory that is
returned by memblock_virt_alloc_try_nid_raw() to ones to ensure that no
places excpect zeroed memory.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Ack
To optimize the performance of struct page initialization,
vmemmap_populate() will no longer zero memory.
We must explicitly zero the memory that is allocated by vmemmap_populate()
for kasan, as this memory does not go through struct page initialization
path.
Signed-off-by: Pavel Tatashin
is a fixed time: it
does not increase as memory is increased.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: David S. Miller
---
arch/sparc/include/asm/pgtable_64.h | 30 ++
1 file changed
fore, the fix is to switch the above calls.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: David S. Miller
---
arch/sparc/mm/init_64.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/sparc/
la
sparc base no deferred: https://hastebin.com/ibobeteken.go
sparc base deferred: https://hastebin.com/fariqimiyu.go
sparc fix no deferred: https://hastebin.com/muhegoheyi.go
sparc fix deferred: https://hastebin.com/xadinobutu.go
Pavel Tatashin (11):
x86/mm: setting fields in de
Copy paste error, changing the subject for the header to v8 from v7.
On 09/14/2017 06:35 PM, Pavel Tatashin wrote:
Changelog:
v8 - v7
- Added Acked-by's from Dave Miller for SPARC changes
- Fixed a minor compiling issue on tile architecture reported by kbuild
v7 - v6
- Addressed comments
Hi Mark,
Thank you for looking at this. We can't do this because page table is
not set until cpu_replace_ttbr1() is called. So, we can't do memset() on
this memory until then.
Pasha
ject, than sure I
can send a new version with kasanmap_populate() functions.
Thank you,
Pasha
On 09/15/2017 04:38 PM, Mark Rutland wrote:
On Thu, Sep 14, 2017 at 09:30:28PM -0400, Pavel Tatashin wrote:
Hi Mark, Thank you for looking at this. We can't do this because page
table i
Remove duplicating code by using common functions
vmemmap_pud_populate and vmemmap_pgd_populate.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: David S. Miller
---
arch/sparc/mm/init_64.c | 23 ++-
1
m/fariqimiyu.go
sparc fix no deferred: https://hastebin.com/muhegoheyi.go
sparc fix deferred: https://hastebin.com/xadinobutu.go
Pavel Tatashin (12):
x86/mm: setting fields in deferred pages
sparc64/mm: setting fields in deferred pages
mm: deferred_init_memmap improvements
sparc64:
at struct pages are properly
initialized prior to using them.
The deferred-reserved pages are initialized in free_all_bootmem().
Therefore, the fix is to switch the above calls.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
---
arch/x
fore, the fix is to switch the above calls.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: David S. Miller
---
arch/sparc/mm/init_64.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/sparc/
is a fixed time: it
does not increase as memory is increased.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: David S. Miller
---
arch/sparc/include/asm/pgtable_64.h | 30 ++
1 file changed
ulate() function to resolve this difference.
Signed-off-by: Pavel Tatashin
---
arch/arm64/include/asm/pgtable.h | 3 ++
include/linux/kasan.h| 2 ++
mm/kasan/kasan_init.c| 67
3 files changed, 72 insertions(+)
diff --git a/arch/
To optimize the performance of struct page initialization,
vmemmap_populate() will no longer zero memory.
Therefore, we must use a new interface to allocate and map kasan shadow
memory, that also zeroes memory for us.
Signed-off-by: Pavel Tatashin
---
arch/x86/mm/kasan_init_64.c | 8
linux would get memory corruptions. I have fixed this issue by
defining a new macro that performs all the necessary operations when we
free the current set of pages.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by:
uct pages explicitly.
The patch involves adding a new memblock iterator:
for_each_resv_unavail_range(i, p_start, p_end)
Which iterates through reserved && !memory lists, and we zero struct pages
explicitly by calling mm_zero_struct_page().
Signed-off-by: Pavel Tatashin
Reviewed
r raw alloctor
When CONFIG_DEBUG_VM is enabled, this patch sets all the memory that is
returned by memblock_virt_alloc_try_nid_raw() to ones to ensure that no
places excpect zeroed memory.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Ack
ement by zeroing the memory in parallel
when struct pages are zeroed.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
---
include/linux/mm.h | 11 +++
mm/sparse-vmemmap.c | 15 +++
mm/sparse.c | 6 +++-
To optimize the performance of struct page initialization,
vmemmap_populate() will no longer zero memory.
Therefore, we must use a new interface to allocate and map kasan shadow
memory, that also zeroes memory for us.
Signed-off-by: Pavel Tatashin
---
arch/arm64/mm/kasan_init.c | 12
called from zone_sizes_init().
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: Michal Hocko
---
include/linux/mm.h | 9 +
mm/page_alloc.c| 1 +
2 files changed, 10 insertions(+)
diff --git a/include/linux/mm.h b
when we
free the current set of pages.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
---
mm/page_alloc.c | 168
1 file changed, 85 insertions(+), 83 deletions(-)
diff --g
at struct pages are properly
initialized prior to using them.
The deferred-reserved pages are initialized in free_all_bootmem().
Therefore, the fix is to switch the above calls.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: Mich
deferred: https://hastebin.com/ibobeteken.go
sparc base deferred: https://hastebin.com/fariqimiyu.go
sparc fix no deferred: https://hastebin.com/muhegoheyi.go
sparc fix deferred: https://hastebin.com/xadinobutu.go
Pavel Tatashin (10):
x86/mm: setting fields in deferred pages
Remove duplicating code by using common functions
vmemmap_pud_populate and vmemmap_pgd_populate.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: David S. Miller
Acked-by: Michal Hocko
---
arch/sparc/mm/init_64.c | 23
end)
Which iterates through reserved && !memory lists, and we zero struct pages
explicitly by calling mm_zero_struct_page().
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
---
include/linux/memblock.h | 16
include
To optimize the performance of struct page initialization,
vmemmap_populate() will no longer zero memory.
Therefore, we must use a new interface to allocate and map kasan shadow
memory, that also zeroes memory for us.
Signed-off-by: Pavel Tatashin
---
arch/x86/mm/kasan_init_64.c | 8
fore, the fix is to switch the above calls.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: David S. Miller
Acked-by: Michal Hocko
---
arch/sparc/mm/init_64.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
rt is moved later in this patch into __init_single_page(), which is
called from zone_sizes_init().
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: Michal Hocko
---
include/linux/mm.h | 11 +++
mm/page_alloc.c
r raw alloctor
When CONFIG_DEBUG_VM is enabled, this patch sets all the memory that is
returned by memblock_virt_alloc_try_nid_raw() to ones to ensure that no
places excpect zeroed memory.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Ack
ulate() function to resolve this difference.
Signed-off-by: Pavel Tatashin
---
arch/arm64/include/asm/pgtable.h | 3 ++
include/linux/kasan.h| 2 ++
mm/kasan/kasan_init.c| 67
3 files changed, 72 insertions(+)
diff --git a/arch/
To optimize the performance of struct page initialization,
vmemmap_populate() will no longer zero memory.
Therefore, we must use a new interface to allocate and map kasan shadow
memory, that also zeroes memory for us.
Signed-off-by: Pavel Tatashin
---
arch/arm64/mm/kasan_init.c | 12
is a fixed time: it
does not increase as memory is increased.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: David S. Miller
---
arch/sparc/include/asm/pgtable_64.h | 30 ++
1 file changed
100, Mark Rutland wrote:
>> On Wed, Sep 20, 2017 at 04:17:11PM -0400, Pavel Tatashin wrote:
>> > During early boot, kasan uses vmemmap_populate() to establish its shadow
>> > memory. But, that interface is intended for struct pages use.
>> >
>> > Because of
Hi Will,
In addition to what Michal wrote:
> As an interim step, why not introduce something like
> vmemmap_alloc_block_flags and make the page-table walking opt-out for
> architectures that don't want it? Then we can just pass __GFP_ZERO from
> our vmemmap_populate where necessary and other arch
Hi Will,
> We have two table walks even with your patch series applied afaict: one in
> our definition of vmemmap_populate (arch/arm64/mm/mmu.c) and this one
> in the core code.
I meant to say implementing two new page table walkers, not at runtime.
> My worry is that these are actually highly a
>
> Ok, but I'm still missing why you think that is needed. What would be the
> second page table walker that needs implementing?
>
> I guess we could implement that on arm64 using our current vmemmap_populate
> logic and an explicit memset.
>
Hi Will,
What do you mean by explicit memset()? We ca
>> I guess we could implement that on arm64 using our current vmemmap_populate
>> logic and an explicit memset.
Hi Will,
I will send out a new patch series with x86/arm64 versions of
kasan_map_populate(), so you could take a look if this is something
that is acceptable.
Thank you,
Pavel
at struct pages are properly
initialized prior to using them.
The deferred-reserved pages are initialized in free_all_bootmem().
Therefore, the fix is to switch the above calls.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: Mich
ulate() function to resolve this difference.
Therefore, we must use a new interface to allocate and map kasan shadow
memory, that also zeroes memory for us.
Signed-off-by: Pavel Tatashin
---
arch/arm64/mm/kasan_init.c | 72 ++
1 file changed, 66 insertions(
Remove duplicating code by using common functions
vmemmap_pud_populate and vmemmap_pgd_populate.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: David S. Miller
Acked-by: Michal Hocko
---
arch/sparc/mm/init_64.c | 23
is a fixed time: it
does not increase as memory is increased.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: David S. Miller
---
arch/sparc/include/asm/pgtable_64.h | 30 ++
1 file changed
r raw alloctor
When CONFIG_DEBUG_VM is enabled, this patch sets all the memory that is
returned by memblock_virt_alloc_try_nid_raw() to ones to ensure that no
places excpect zeroed memory.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Ack
rt is moved later in this patch into __init_single_page(), which is
called from zone_sizes_init().
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: Michal Hocko
---
include/linux/mm.h | 11 +++
mm/page_alloc.c
rred: https://hastebin.com/fariqimiyu.go
sparc fix no deferred: https://hastebin.com/muhegoheyi.go
sparc fix deferred: https://hastebin.com/xadinobutu.go
Pavel Tatashin (9):
x86/mm: setting fields in deferred pages
sparc64/mm: setting fields in deferred pages
sparc64: simplify
ulate() function to resolve this difference.
Therefore, we must use a new interface to allocate and map kasan shadow
memory, that also zeroes memory for us.
Signed-off-by: Pavel Tatashin
---
arch/x86/mm/kasan_init_64.c | 75 ++---
1 file changed, 71 insertions(
fore, the fix is to switch the above calls.
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
Acked-by: David S. Miller
Acked-by: Michal Hocko
---
arch/sparc/mm/init_64.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
end)
Which iterates through reserved && !memory lists, and we zero struct pages
explicitly by calling mm_zero_struct_page().
Signed-off-by: Pavel Tatashin
Reviewed-by: Steven Sistare
Reviewed-by: Daniel Jordan
Reviewed-by: Bob Picco
---
include/linux/memblock.h | 16
include
> Btw. I would add your example from
> http://lkml.kernel.org/r/bcf24369-ac37-cedd-a264-3396fb5cf...@oracle.com
> to do changelog
>
Will add, thank you for your review.
Pavel
Hi Will,
Thank you for doing this work. How would you like to proceed?
- If you OK for my series to be accepted as-is, so your patch can be
added later on top, I think, I need an ack from you for kasan changes.
- Otherwise, I can replace: 4267aaf1d279 arm64/kasan: add and use
kasan_map_populate()
I wanted to thank you Michal for spending time and doing the in-depth
reviews of every incremental change. Overall the series is in much
better shape now because of your feedback.
Pavel
On 10/10/2017 10:15 AM, Michal Hocko wrote:
Btw. thanks for your persistance and willingness to go over all
Hi Will,
Ok, I will add your patch at the end of my series.
Thank you,
Pavel
>
> I was thinking that you could just add my patch to the end of your series
> and have the whole lot go up like that. If you want to merge it with your
> patch, I'm fine with that too.
>
> Will
>
> --
> To unsubscribe
1 - 100 of 182 matches
Mail list logo