* [PATCH] ARM: mm: Speed up page list initialization during boot
@ 2014-03-21 19:15 Chirantan Ekbote
0 siblings, 0 replies; 7+ messages in thread
From: Chirantan Ekbote @ 2014-03-21 19:15 UTC (permalink / raw)
To: linux
Cc: linux-mm, linux-arm-kernel, linux-kernel, sonnyrao, dianders,
Chirantan Ekbote
During boot, we populate the page lists by using the page freeing
mechanism on every individual page. Unfortunately, this is very
inefficient because the memory manager spends a lot of time coalescing
pairs of adjacent free pages into bigger blocks.
Rather than adding a single order 0 page at a time, we can take
advantage of the fact that we know that all the pages are available and
free up big blocks of pages at a time instead.
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
---
arch/arm/mm/init.c | 19 +++++++++++++++++--
include/linux/gfp.h | 1 +
mm/internal.h | 1 -
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 97c293e..c7fc2d8 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -22,6 +22,7 @@
#include <linux/memblock.h>
#include <linux/dma-contiguous.h>
#include <linux/sizes.h>
+#include <linux/bitops.h>
#include <asm/mach-types.h>
#include <asm/memblock.h>
@@ -469,8 +470,22 @@ static void __init free_unused_memmap(struct meminfo *mi)
#ifdef CONFIG_HIGHMEM
static inline void free_area_high(unsigned long pfn, unsigned long end)
{
- for (; pfn < end; pfn++)
- free_highmem_page(pfn_to_page(pfn));
+ while (pfn < end) {
+ struct page *page = pfn_to_page(pfn);
+ unsigned long order = min(__ffs(pfn), MAX_ORDER - 1);
+ unsigned long nr_pages = 1 << order;
+ unsigned long rem = end - pfn;
+
+ if (nr_pages > rem) {
+ order = __fls(rem);
+ nr_pages = 1 << order;
+ }
+
+ __free_pages_bootmem(page, order);
+ totalram_pages += nr_pages;
+ totalhigh_pages += nr_pages;
+ pfn += nr_pages;
+ }
}
#endif
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 39b81dc..a63d666 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -367,6 +367,7 @@ void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask);
#define __get_dma_pages(gfp_mask, order) \
__get_free_pages((gfp_mask) | GFP_DMA, (order))
+extern void __free_pages_bootmem(struct page *page, unsigned int order);
extern void __free_pages(struct page *page, unsigned int order);
extern void free_pages(unsigned long addr, unsigned int order);
extern void free_hot_cold_page(struct page *page, int cold);
diff --git a/mm/internal.h b/mm/internal.h
index 29e1e76..d2b8738 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -93,7 +93,6 @@ extern pmd_t *mm_find_pmd(struct mm_struct *mm, unsigned long address);
/*
* in mm/page_alloc.c
*/
-extern void __free_pages_bootmem(struct page *page, unsigned int order);
extern void prep_compound_page(struct page *page, unsigned long order);
#ifdef CONFIG_MEMORY_FAILURE
extern bool is_free_buddy_page(struct page *page);
--
1.9.1.423.g4596e3a
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: [PATCH] ARM: mm: Speed up page list initialization during boot
[not found] <004001d14158$114be8d0$33e3ba70$@samsung.com>
@ 2015-12-28 10:15 ` Jungseung Lee
2015-12-31 13:05 ` Chirantan Ekbote
0 siblings, 1 reply; 7+ messages in thread
From: Jungseung Lee @ 2015-12-28 10:15 UTC (permalink / raw)
To: chirantan, linux-arm-kernel, linux-mm; +Cc: js07.lee
Hi,
>During boot, we populate the page lists by using the page freeing
>mechanism on every individual page. Unfortunately, this is very
>inefficient because the memory manager spends a lot of time coalescing
>pairs of adjacent free pages into bigger blocks.
>
>Rather than adding a single order 0 page at a time, we can take
>advantage of the fact that we know that all the pages are available and
>free up big blocks of pages at a time instead.
>
>Signed-off-by: Chirantan Ekbote <chirantan at chromium.org>
>---
> arch/arm/mm/init.c | 19 +++++++++++++++++-- include/linux/gfp.h | 1
>+
> mm/internal.h | 1 -
> 3 files changed, 18 insertions(+), 3 deletions(-)
>
>diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index
>97c293e..c7fc2d8 100644
>--- a/arch/arm/mm/init.c
>+++ b/arch/arm/mm/init.c
>@@ -22,6 +22,7 @@
> #include <linux/memblock.h>
> #include <linux/dma-contiguous.h>
> #include <linux/sizes.h>
>+#include <linux/bitops.h>
>
> #include <asm/mach-types.h>
> #include <asm/memblock.h>
>@@ -469,8 +470,22 @@ static void __init free_unused_memmap(struct
>meminfo
*mi)
> #ifdef CONFIG_HIGHMEM
> static inline void free_area_high(unsigned long pfn, unsigned long
>end) {
>- for (; pfn < end; pfn++)
>- free_highmem_page(pfn_to_page(pfn));
>+ while (pfn < end) {
>+ struct page *page = pfn_to_page(pfn);
>+ unsigned long order = min(__ffs(pfn), MAX_ORDER - 1);
>+ unsigned long nr_pages = 1 << order;
>+ unsigned long rem = end - pfn;
>+
>+ if (nr_pages > rem) {
>+ order = __fls(rem);
>+ nr_pages = 1 << order;
>+ }
>+
>+ __free_pages_bootmem(page, order);
>+ totalram_pages += nr_pages;
>+ totalhigh_pages += nr_pages;
>+ pfn += nr_pages;
>+ }
> }
> #endif
>
>diff --git a/include/linux/gfp.h b/include/linux/gfp.h index
>39b81dc..a63d666 100644
>--- a/include/linux/gfp.h
>+++ b/include/linux/gfp.h
>@@ -367,6 +367,7 @@ void *alloc_pages_exact_nid(int nid, size_t size,
>gfp_t
gfp_mask);
> #define __get_dma_pages(gfp_mask, order) \
> __get_free_pages((gfp_mask) | GFP_DMA, (order))
>
>+extern void __free_pages_bootmem(struct page *page, unsigned int
>+order);
> extern void __free_pages(struct page *page, unsigned int order);
>extern void free_pages(unsigned long addr, unsigned int order); extern
>void free_hot_cold_page(struct page *page, int cold); diff --git
>a/mm/internal.h b/mm/internal.h index 29e1e76..d2b8738 100644
>--- a/mm/internal.h
>+++ b/mm/internal.h
>@@ -93,7 +93,6 @@ extern pmd_t *mm_find_pmd(struct mm_struct *mm,
>unsigned
long address);
> /*
> * in mm/page_alloc.c
> */
>-extern void __free_pages_bootmem(struct page *page, unsigned int
>order); extern void prep_compound_page(struct page *page, unsigned
>long order); #ifdef CONFIG_MEMORY_FAILURE extern bool
>is_free_buddy_page(struct page *page);
>--
>1.9.1.423.g4596e3a
This patch really could save boot time.
Is there any reason this patch is not merged to mainline kernel?
Best Regards,
Jungseung Lee
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: mm: Speed up page list initialization during boot
2015-12-28 10:15 ` Jungseung Lee
@ 2015-12-31 13:05 ` Chirantan Ekbote
2016-01-02 10:37 ` Russell King - ARM Linux
0 siblings, 1 reply; 7+ messages in thread
From: Chirantan Ekbote @ 2015-12-31 13:05 UTC (permalink / raw)
To: Jungseung Lee; +Cc: linux-arm-kernel@lists.infradead.org, linux-mm
On Mon, Dec 28, 2015 at 2:15 AM, Jungseung Lee <js07.lee@samsung.com> wrote:
> Hi,
>
>>During boot, we populate the page lists by using the page freeing
>>mechanism on every individual page. Unfortunately, this is very
>>inefficient because the memory manager spends a lot of time coalescing
>>pairs of adjacent free pages into bigger blocks.
>>
>>Rather than adding a single order 0 page at a time, we can take
>>advantage of the fact that we know that all the pages are available and
>>free up big blocks of pages at a time instead.
>>
>>Signed-off-by: Chirantan Ekbote <chirantan at chromium.org>
>>---
>> arch/arm/mm/init.c | 19 +++++++++++++++++-- include/linux/gfp.h | 1
>>+
>> mm/internal.h | 1 -
>> 3 files changed, 18 insertions(+), 3 deletions(-)
>>
>>diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index
>>97c293e..c7fc2d8 100644
>>--- a/arch/arm/mm/init.c
>>+++ b/arch/arm/mm/init.c
>>@@ -22,6 +22,7 @@
>> #include <linux/memblock.h>
>> #include <linux/dma-contiguous.h>
>> #include <linux/sizes.h>
>>+#include <linux/bitops.h>
>>
>> #include <asm/mach-types.h>
>> #include <asm/memblock.h>
>>@@ -469,8 +470,22 @@ static void __init free_unused_memmap(struct
>>meminfo
> *mi)
>> #ifdef CONFIG_HIGHMEM
>> static inline void free_area_high(unsigned long pfn, unsigned long
>>end) {
>>- for (; pfn < end; pfn++)
>>- free_highmem_page(pfn_to_page(pfn));
>>+ while (pfn < end) {
>>+ struct page *page = pfn_to_page(pfn);
>>+ unsigned long order = min(__ffs(pfn), MAX_ORDER - 1);
>>+ unsigned long nr_pages = 1 << order;
>>+ unsigned long rem = end - pfn;
>>+
>>+ if (nr_pages > rem) {
>>+ order = __fls(rem);
>>+ nr_pages = 1 << order;
>>+ }
>>+
>>+ __free_pages_bootmem(page, order);
>>+ totalram_pages += nr_pages;
>>+ totalhigh_pages += nr_pages;
>>+ pfn += nr_pages;
>>+ }
>> }
>> #endif
>>
>>diff --git a/include/linux/gfp.h b/include/linux/gfp.h index
>>39b81dc..a63d666 100644
>>--- a/include/linux/gfp.h
>>+++ b/include/linux/gfp.h
>>@@ -367,6 +367,7 @@ void *alloc_pages_exact_nid(int nid, size_t size,
>>gfp_t
> gfp_mask);
>> #define __get_dma_pages(gfp_mask, order) \
>> __get_free_pages((gfp_mask) | GFP_DMA, (order))
>>
>>+extern void __free_pages_bootmem(struct page *page, unsigned int
>>+order);
>> extern void __free_pages(struct page *page, unsigned int order);
>>extern void free_pages(unsigned long addr, unsigned int order); extern
>>void free_hot_cold_page(struct page *page, int cold); diff --git
>>a/mm/internal.h b/mm/internal.h index 29e1e76..d2b8738 100644
>>--- a/mm/internal.h
>>+++ b/mm/internal.h
>>@@ -93,7 +93,6 @@ extern pmd_t *mm_find_pmd(struct mm_struct *mm,
>>unsigned
> long address);
>> /*
>> * in mm/page_alloc.c
>> */
>>-extern void __free_pages_bootmem(struct page *page, unsigned int
>>order); extern void prep_compound_page(struct page *page, unsigned
>>long order); #ifdef CONFIG_MEMORY_FAILURE extern bool
>>is_free_buddy_page(struct page *page);
>>--
>>1.9.1.423.g4596e3a
>
> This patch really could save boot time.
> Is there any reason this patch is not merged to mainline kernel?
>
Well it was ignored when I originally posted it so I assumed mainline
developers weren't really interested. I can re-spin and send a new
version if there's interest in getting it merged now.
> Best Regards,
> Jungseung Lee
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: mm: Speed up page list initialization during boot
2015-12-31 13:05 ` Chirantan Ekbote
@ 2016-01-02 10:37 ` Russell King - ARM Linux
2016-01-05 9:56 ` Jungseung Lee
0 siblings, 1 reply; 7+ messages in thread
From: Russell King - ARM Linux @ 2016-01-02 10:37 UTC (permalink / raw)
To: Chirantan Ekbote
Cc: Jungseung Lee, linux-mm, linux-arm-kernel@lists.infradead.org
On Thu, Dec 31, 2015 at 05:05:54AM -0800, Chirantan Ekbote wrote:
> On Mon, Dec 28, 2015 at 2:15 AM, Jungseung Lee <js07.lee@samsung.com> wrote:
> > Hi,
> >
> >>During boot, we populate the page lists by using the page freeing
> >>mechanism on every individual page. Unfortunately, this is very
> >>inefficient because the memory manager spends a lot of time coalescing
> >>pairs of adjacent free pages into bigger blocks.
> >>
> >>Rather than adding a single order 0 page at a time, we can take
> >>advantage of the fact that we know that all the pages are available and
> >>free up big blocks of pages at a time instead.
> >>
> >>Signed-off-by: Chirantan Ekbote <chirantan at chromium.org>
> >>---
> >> arch/arm/mm/init.c | 19 +++++++++++++++++-- include/linux/gfp.h | 1
> >>+
> >> mm/internal.h | 1 -
> >> 3 files changed, 18 insertions(+), 3 deletions(-)
> >>
> >>diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index
> >>97c293e..c7fc2d8 100644
> >>--- a/arch/arm/mm/init.c
> >>+++ b/arch/arm/mm/init.c
> >>@@ -22,6 +22,7 @@
> >> #include <linux/memblock.h>
> >> #include <linux/dma-contiguous.h>
> >> #include <linux/sizes.h>
> >>+#include <linux/bitops.h>
> >>
> >> #include <asm/mach-types.h>
> >> #include <asm/memblock.h>
> >>@@ -469,8 +470,22 @@ static void __init free_unused_memmap(struct
> >>meminfo
> > *mi)
> >> #ifdef CONFIG_HIGHMEM
> >> static inline void free_area_high(unsigned long pfn, unsigned long
> >>end) {
> >>- for (; pfn < end; pfn++)
> >>- free_highmem_page(pfn_to_page(pfn));
> >>+ while (pfn < end) {
> >>+ struct page *page = pfn_to_page(pfn);
> >>+ unsigned long order = min(__ffs(pfn), MAX_ORDER - 1);
> >>+ unsigned long nr_pages = 1 << order;
> >>+ unsigned long rem = end - pfn;
> >>+
> >>+ if (nr_pages > rem) {
> >>+ order = __fls(rem);
> >>+ nr_pages = 1 << order;
> >>+ }
> >>+
> >>+ __free_pages_bootmem(page, order);
> >>+ totalram_pages += nr_pages;
> >>+ totalhigh_pages += nr_pages;
> >>+ pfn += nr_pages;
> >>+ }
> >> }
> >> #endif
> >>
> >>diff --git a/include/linux/gfp.h b/include/linux/gfp.h index
> >>39b81dc..a63d666 100644
> >>--- a/include/linux/gfp.h
> >>+++ b/include/linux/gfp.h
> >>@@ -367,6 +367,7 @@ void *alloc_pages_exact_nid(int nid, size_t size,
> >>gfp_t
> > gfp_mask);
> >> #define __get_dma_pages(gfp_mask, order) \
> >> __get_free_pages((gfp_mask) | GFP_DMA, (order))
> >>
> >>+extern void __free_pages_bootmem(struct page *page, unsigned int
> >>+order);
> >> extern void __free_pages(struct page *page, unsigned int order);
> >>extern void free_pages(unsigned long addr, unsigned int order); extern
> >>void free_hot_cold_page(struct page *page, int cold); diff --git
> >>a/mm/internal.h b/mm/internal.h index 29e1e76..d2b8738 100644
> >>--- a/mm/internal.h
> >>+++ b/mm/internal.h
> >>@@ -93,7 +93,6 @@ extern pmd_t *mm_find_pmd(struct mm_struct *mm,
> >>unsigned
> > long address);
> >> /*
> >> * in mm/page_alloc.c
> >> */
> >>-extern void __free_pages_bootmem(struct page *page, unsigned int
> >>order); extern void prep_compound_page(struct page *page, unsigned
> >>long order); #ifdef CONFIG_MEMORY_FAILURE extern bool
> >>is_free_buddy_page(struct page *page);
> >>--
> >>1.9.1.423.g4596e3a
> >
> > This patch really could save boot time.
> > Is there any reason this patch is not merged to mainline kernel?
> >
>
> Well it was ignored when I originally posted it so I assumed mainline
> developers weren't really interested. I can re-spin and send a new
> version if there's interest in getting it merged now.
Not getting a reply can be for many reasons: people may be too busy
and there may be too much other mail. I generally have a major problem
with email in that it's all too easy for stuff to get buried and
forgotten. Remember, some of us get a lot of emails a day, and mails
which should get a reply do get dropped simply because there isn't
enough time to read them and properly write replies to every message
that needs a response.
So, it's good practice to resend after a week or so if you think your
message has been missed; it may well have been missed and buried under
a thousand or more other messages by that time.
In any case, it would be nice for such "speed up" changes to be
quantified with some kind of measurement. How much does it speed the
boot process up, and in what circumstances?
Thanks.
--
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] ARM: mm: Speed up page list initialization during boot
2016-01-02 10:37 ` Russell King - ARM Linux
@ 2016-01-05 9:56 ` Jungseung Lee
2016-06-16 2:18 ` Sergey Senozhatsky
0 siblings, 1 reply; 7+ messages in thread
From: Jungseung Lee @ 2016-01-05 9:56 UTC (permalink / raw)
To: 'Chirantan Ekbote', 'Russell King - ARM Linux'
Cc: linux-mm, linux-arm-kernel, js07.lee
> On Thu, Dec 31, 2015 at 05:05:54AM -0800, Chirantan Ekbote wrote:
> > On Mon, Dec 28, 2015 at 2:15 AM, Jungseung Lee <js07.lee@samsung.com>
> wrote:
> > > Hi,
> > >
> > >>During boot, we populate the page lists by using the page freeing
> > >>mechanism on every individual page. Unfortunately, this is very
> > >>inefficient because the memory manager spends a lot of time
> > >>coalescing pairs of adjacent free pages into bigger blocks.
> > >>
> > >>Rather than adding a single order 0 page at a time, we can take
> > >>advantage of the fact that we know that all the pages are available
> > >>and free up big blocks of pages at a time instead.
> > >>
> > >>Signed-off-by: Chirantan Ekbote <chirantan at chromium.org>
> > >>---
> > >> arch/arm/mm/init.c | 19 +++++++++++++++++-- include/linux/gfp.h |
> > >>1
> > >>+
> > >> mm/internal.h | 1 -
> > >> 3 files changed, 18 insertions(+), 3 deletions(-)
> > >>
> > >>diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index
> > >>97c293e..c7fc2d8 100644
> > >>--- a/arch/arm/mm/init.c
> > >>+++ b/arch/arm/mm/init.c
> > >>@@ -22,6 +22,7 @@
> > >> #include <linux/memblock.h>
> > >> #include <linux/dma-contiguous.h>
> > >> #include <linux/sizes.h>
> > >>+#include <linux/bitops.h>
> > >>
> > >> #include <asm/mach-types.h>
> > >> #include <asm/memblock.h>
> > >>@@ -469,8 +470,22 @@ static void __init free_unused_memmap(struct
> > >>meminfo
> > > *mi)
> > >> #ifdef CONFIG_HIGHMEM
> > >> static inline void free_area_high(unsigned long pfn, unsigned long
> > >>end) {
> > >>- for (; pfn < end; pfn++)
> > >>- free_highmem_page(pfn_to_page(pfn));
> > >>+ while (pfn < end) {
> > >>+ struct page *page = pfn_to_page(pfn);
> > >>+ unsigned long order = min(__ffs(pfn), MAX_ORDER - 1);
> > >>+ unsigned long nr_pages = 1 << order;
> > >>+ unsigned long rem = end - pfn;
> > >>+
> > >>+ if (nr_pages > rem) {
> > >>+ order = __fls(rem);
> > >>+ nr_pages = 1 << order;
> > >>+ }
> > >>+
> > >>+ __free_pages_bootmem(page, order);
> > >>+ totalram_pages += nr_pages;
> > >>+ totalhigh_pages += nr_pages;
> > >>+ pfn += nr_pages;
> > >>+ }
> > >> }
> > >> #endif
> > >>
> > >>diff --git a/include/linux/gfp.h b/include/linux/gfp.h index
> > >>39b81dc..a63d666 100644
> > >>--- a/include/linux/gfp.h
> > >>+++ b/include/linux/gfp.h
> > >>@@ -367,6 +367,7 @@ void *alloc_pages_exact_nid(int nid, size_t
> > >>size, gfp_t
> > > gfp_mask);
> > >> #define __get_dma_pages(gfp_mask, order) \
> > >> __get_free_pages((gfp_mask) | GFP_DMA, (order))
> > >>
> > >>+extern void __free_pages_bootmem(struct page *page, unsigned int
> > >>+order);
> > >> extern void __free_pages(struct page *page, unsigned int order);
> > >>extern void free_pages(unsigned long addr, unsigned int order);
> > >>extern void free_hot_cold_page(struct page *page, int cold); diff
> > >>--git a/mm/internal.h b/mm/internal.h index 29e1e76..d2b8738 100644
> > >>--- a/mm/internal.h
> > >>+++ b/mm/internal.h
> > >>@@ -93,7 +93,6 @@ extern pmd_t *mm_find_pmd(struct mm_struct *mm,
> > >>unsigned
> > > long address);
> > >> /*
> > >> * in mm/page_alloc.c
> > >> */
> > >>-extern void __free_pages_bootmem(struct page *page, unsigned int
> > >>order); extern void prep_compound_page(struct page *page, unsigned
> > >>long order); #ifdef CONFIG_MEMORY_FAILURE extern bool
> > >>is_free_buddy_page(struct page *page);
> > >>--
> > >>1.9.1.423.g4596e3a
> > >
> > > This patch really could save boot time.
> > > Is there any reason this patch is not merged to mainline kernel?
> > >
> >
> > Well it was ignored when I originally posted it so I assumed mainline
> > developers weren't really interested. I can re-spin and send a new
> > version if there's interest in getting it merged now.
Chirantan, please send a new version. It really has benefit.
>
> Not getting a reply can be for many reasons: people may be too busy and
> there may be too much other mail. I generally have a major problem with
> email in that it's all too easy for stuff to get buried and forgotten.
> Remember, some of us get a lot of emails a day, and mails which should get
> a reply do get dropped simply because there isn't enough time to read them
> and properly write replies to every message that needs a response.
>
> So, it's good practice to resend after a week or so if you think your
> message has been missed; it may well have been missed and buried under a
> thousand or more other messages by that time.
>
> In any case, it would be nice for such "speed up" changes to be quantified
> with some kind of measurement. How much does it speed the boot process
up,
> and in what circumstances?
In my circumstance CA15 with huge memory, 400ms is reduced.
I can find below sentence from chromium review.
https://chromium-review.googlesource.com/#/c/188971/
This reduces boot time by 260ms on pit and 560ms on pi.
>
> Thanks.
>
> --
> RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
> FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
> according to speedtest.net.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: mm: Speed up page list initialization during boot
2016-01-05 9:56 ` Jungseung Lee
@ 2016-06-16 2:18 ` Sergey Senozhatsky
2016-06-16 13:36 ` Sergey Senozhatsky
0 siblings, 1 reply; 7+ messages in thread
From: Sergey Senozhatsky @ 2016-06-16 2:18 UTC (permalink / raw)
To: 'Chirantan Ekbote'
Cc: Jungseung Lee, 'Russell King - ARM Linux', linux-mm,
linux-arm-kernel, js07.lee, Sergey Senozhatsky,
Sergey Senozhatsky
On (01/05/16 18:56), Jungseung Lee wrote:
[..]
> > > >> #ifdef CONFIG_HIGHMEM
> > > >> static inline void free_area_high(unsigned long pfn, unsigned long
> > > >>end) {
> > > >>- for (; pfn < end; pfn++)
> > > >>- free_highmem_page(pfn_to_page(pfn));
> > > >>+ while (pfn < end) {
> > > >>+ struct page *page = pfn_to_page(pfn);
> > > >>+ unsigned long order = min(__ffs(pfn), MAX_ORDER - 1);
> > > >>+ unsigned long nr_pages = 1 << order;
> > > >>+ unsigned long rem = end - pfn;
> > > >>+
> > > >>+ if (nr_pages > rem) {
> > > >>+ order = __fls(rem);
> > > >>+ nr_pages = 1 << order;
> > > >>+ }
> > > >>+
> > > >>+ __free_pages_bootmem(page, order);
> > > >>+ totalram_pages += nr_pages;
> > > >>+ totalhigh_pages += nr_pages;
+ page_zone(page)->managed_pages += nr_pages; ???
> > > >>+ pfn += nr_pages;
> > > >>+ }
> > > >> }
-ss
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: mm: Speed up page list initialization during boot
2016-06-16 2:18 ` Sergey Senozhatsky
@ 2016-06-16 13:36 ` Sergey Senozhatsky
0 siblings, 0 replies; 7+ messages in thread
From: Sergey Senozhatsky @ 2016-06-16 13:36 UTC (permalink / raw)
To: Sergey Senozhatsky
Cc: 'Chirantan Ekbote', Jungseung Lee,
'Russell King - ARM Linux', linux-mm, linux-arm-kernel,
js07.lee, Sergey Senozhatsky
On (06/16/16 11:18), Sergey Senozhatsky wrote:
> On (01/05/16 18:56), Jungseung Lee wrote:
> [..]
> > > > >> #ifdef CONFIG_HIGHMEM
> > > > >> static inline void free_area_high(unsigned long pfn, unsigned long
> > > > >>end) {
> > > > >>- for (; pfn < end; pfn++)
> > > > >>- free_highmem_page(pfn_to_page(pfn));
> > > > >>+ while (pfn < end) {
> > > > >>+ struct page *page = pfn_to_page(pfn);
> > > > >>+ unsigned long order = min(__ffs(pfn), MAX_ORDER - 1);
> > > > >>+ unsigned long nr_pages = 1 << order;
> > > > >>+ unsigned long rem = end - pfn;
> > > > >>+
> > > > >>+ if (nr_pages > rem) {
> > > > >>+ order = __fls(rem);
> > > > >>+ nr_pages = 1 << order;
> > > > >>+ }
> > > > >>+
> > > > >>+ __free_pages_bootmem(page, order);
> > > > >>+ totalram_pages += nr_pages;
> > > > >>+ totalhigh_pages += nr_pages;
>
> + page_zone(page)->managed_pages += nr_pages; ???
ah, no. __free_pages_boot_core() seems to do it. sorry for the noise.
-ss
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-06-16 13:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-21 19:15 [PATCH] ARM: mm: Speed up page list initialization during boot Chirantan Ekbote
[not found] <004001d14158$114be8d0$33e3ba70$@samsung.com>
2015-12-28 10:15 ` Jungseung Lee
2015-12-31 13:05 ` Chirantan Ekbote
2016-01-02 10:37 ` Russell King - ARM Linux
2016-01-05 9:56 ` Jungseung Lee
2016-06-16 2:18 ` Sergey Senozhatsky
2016-06-16 13:36 ` Sergey Senozhatsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).