mmots: memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap fix
Subsystems (5)
Defconfig for x86_64 complainsarch/x86/mm/init_64.c: In function a??register_page_bootmem_memmapa??:arch/x86/mm/init_64.c:1340: error: implicit declaration of function a??get_page_bootmema?? arch/x86/mm/init_64.c:1340: error: a??MIX_SECTION_INFOa?? undeclared (first use in this function)arch/x86/mm/init_64.c:1340: error: (Each undeclared identifier is
reported only oncearch/x86/mm/init_64.c:1340: error: for each function it appears in.) arch/x86/mm/init_64.c:1361: error: a??SECTION_INFOa?? undeclared (first use in this function)
move register_page_bootmem_memmap to memory_hotplug where it is used and where it has all required symbols
--- arch/x86/mm/init_64.c | 58 ----------------------------------------------- include/linux/mm.h | 2 -- mm/memory_hotplug.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 59 insertions(+), 61 deletions(-)
arch/x86/mm/init_64.c +0 -58
@@ -1317,64 +1317,6 @@ vmemmap_populate(struct page *start_page, unsigned long size, int node)return 0 ; } -void register_page_bootmem_memmap (unsigned long section_nr, -struct page *start_page,unsigned long size) -{ -unsigned long addr = (unsigned long )start_page; -unsigned long end = (unsigned long )(start_page + size); -unsigned long next; -pgd_t *pgd; -pud_t *pud; -pmd_t *pmd; -unsigned int nr_pages; -struct page *page; - -for (; addr < end; addr = next) { -pte_t *pte =NULL ; - - pgd =pgd_offset_k (addr); -if (pgd_none (*pgd)) { - next = (addr +PAGE_SIZE ) &PAGE_MASK ; -continue ; - } -get_page_bootmem (section_nr,pgd_page (*pgd),MIX_SECTION_INFO ); - - pud =pud_offset (pgd, addr); -if (pud_none (*pud)) { - next = (addr +PAGE_SIZE ) &PAGE_MASK ; -continue ; - } -get_page_bootmem (section_nr,pud_page (*pud),MIX_SECTION_INFO ); - -if (!cpu_has_pse) { - next = (addr +PAGE_SIZE ) &PAGE_MASK ; - pmd =pmd_offset (pud, addr); -if (pmd_none (*pmd)) -continue ; -get_page_bootmem (section_nr,pmd_page (*pmd), -MIX_SECTION_INFO ); - - pte =pte_offset_kernel (pmd, addr); -if (pte_none (*pte)) -continue ; -get_page_bootmem (section_nr,pte_page (*pte), -SECTION_INFO ); - }else { - next =pmd_addr_end (addr, end); - - pmd =pmd_offset (pud, addr); -if (pmd_none (*pmd)) -continue ; - - nr_pages =1 << (get_order (PMD_SIZE )); - page =pmd_page (*pmd); -while (nr_pages--) -get_page_bootmem (section_nr, page++, -SECTION_INFO ); - } - } -} -void __meminit vmemmap_populate_print_last (void ) {if (p_start) {
include/linux/mm.h +0 -2
@@ -1724,8 +1724,6 @@ void vmemmap_populate_print_last(void);#ifdef CONFIG_MEMORY_HOTPLUG void vmemmap_free (struct page *memmap,unsigned long nr_pages);#endif -void register_page_bootmem_memmap (unsigned long section_nr,struct page *map, -unsigned long size);enum mf_flags {MF_COUNT_INCREASED =1 <<0 ,
mm/memory_hotplug.c +59 -1
78 lines not on this page · raw message
Signature · 11 lines
1.7.10.4 -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
On Fri 11-01-13 10:56:58, Michal Hocko wrote:
[...]
Quoted 13 lines
mm/memory_hotplug.c +0
-1@@ -91,7 +91,6 @@ static void release_memory_resource(struct resource *res)return ; } -#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE void get_page_bootmem (unsigned long info,struct page *page,unsigned long type) {
mm/memory_hotplug.c void get_page_bootmem(unsigned long info, struct page *page, · line 106
Quoted 7 lines
mm/memory_hotplug.c +1
-0@@ -101,6 +100,7 @@ void get_page_bootmem(unsigned long info, struct page *page,atomic_inc (&page->_count); } +#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE /* reference to __meminit __free_pages_bootmem is valid * so use __ref to tell modpost not to generate a warning */ void __ref put_page_bootmem (struct page *page)
Ups this slipped through and it is unnecessary.
---
Defconfig for x86_64 complainsarch/x86/mm/init_64.c: In function a??register_page_bootmem_memmapa??:arch/x86/mm/init_64.c:1340: error: implicit declaration of function a??get_page_bootmema?? arch/x86/mm/init_64.c:1340: error: a??MIX_SECTION_INFOa?? undeclared (first use in this function)arch/x86/mm/init_64.c:1340: error: (Each undeclared identifier is
reported only oncearch/x86/mm/init_64.c:1340: error: for each function it appears in.) arch/x86/mm/init_64.c:1361: error: a??SECTION_INFOa?? undeclared (first use in this function)
move register_page_bootmem_memmap to memory_hotplug where it is used and where it has all required symbols
--- arch/x86/mm/init_64.c | 58 ------------------------------------------------- include/linux/mm.h | 2 -- mm/memory_hotplug.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 60 deletions(-)
arch/x86/mm/init_64.c +0 -58
@@ -1317,64 +1317,6 @@ vmemmap_populate(struct page *start_page, unsigned long size, int node)return 0 ; } -void register_page_bootmem_memmap (unsigned long section_nr, -struct page *start_page,unsigned long size) -{ -unsigned long addr = (unsigned long )start_page; -unsigned long end = (unsigned long )(start_page + size); -unsigned long next; -pgd_t *pgd; -pud_t *pud; -pmd_t *pmd; -unsigned int nr_pages; -struct page *page; - -for (; addr < end; addr = next) { -pte_t *pte =NULL ; - - pgd =pgd_offset_k (addr); -if (pgd_none (*pgd)) { - next = (addr +PAGE_SIZE ) &PAGE_MASK ; -continue ; - } -get_page_bootmem (section_nr,pgd_page (*pgd),MIX_SECTION_INFO ); - - pud =pud_offset (pgd, addr); -if (pud_none (*pud)) { - next = (addr +PAGE_SIZE ) &PAGE_MASK ; -continue ; - } -get_page_bootmem (section_nr,pud_page (*pud),MIX_SECTION_INFO ); - -if (!cpu_has_pse) { - next = (addr +PAGE_SIZE ) &PAGE_MASK ; - pmd =pmd_offset (pud, addr); -if (pmd_none (*pmd)) -continue ; -get_page_bootmem (section_nr,pmd_page (*pmd), -MIX_SECTION_INFO ); - - pte =pte_offset_kernel (pmd, addr); -if (pte_none (*pte)) -continue ; -get_page_bootmem (section_nr,pte_page (*pte), -SECTION_INFO ); - }else { - next =pmd_addr_end (addr, end); - - pmd =pmd_offset (pud, addr); -if (pmd_none (*pmd)) -continue ; - - nr_pages =1 << (get_order (PMD_SIZE )); - page =pmd_page (*pmd); -while (nr_pages--) -get_page_bootmem (section_nr, page++, -SECTION_INFO ); - } - } -} -void __meminit vmemmap_populate_print_last (void ) {if (p_start) {
include/linux/mm.h +0 -2
@@ -1724,8 +1724,6 @@ void vmemmap_populate_print_last(void);#ifdef CONFIG_MEMORY_HOTPLUG void vmemmap_free (struct page *memmap,unsigned long nr_pages);#endif -void register_page_bootmem_memmap (unsigned long section_nr,struct page *map, -unsigned long size);enum mf_flags {MF_COUNT_INCREASED =1 <<0 ,
mm/memory_hotplug.c +58 -0
64 lines not on this page · raw message
Signature · 11 lines
1.7.10.4 -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Hi Michal,
Thank you very much for the nice catch. :)
Quoted 177 lines · Michal Hocko
Defconfig for
x86_64complainsarch/x86/mm/init_64.c: In function ‘register_page_bootmem_memmap’:arch/x86/mm/init_64.c:1340: error: implicit declaration of function ‘get_page_bootmem’arch/x86/mm/init_64.c:1340: error: ‘MIX_SECTION_INFO’ undeclared (first
use in this function)arch/x86/mm/init_64.c:1340: error: (Each undeclared identifier is
reported only oncearch/x86/mm/init_64.c:1340: error: for each function it appears in.)arch/x86/mm/init_64.c:1361: error: ‘SECTION_INFO’ undeclared (first use in this function)move
register_page_bootmem_memmaptomemory_hotplugwhere it is used and where it has all required symbolsSigned-off-by Michal Hocko<[email protected]>--- arch/x86/mm/init_64.c | 58 ----------------------------------------------- include/linux/mm.h | 2 -- mm/memory_hotplug.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 59 insertions(+), 61 deletions(-)arch/x86/mm/init_64.c +0
-58@@ -1317,64 +1317,6 @@ vmemmap_populate(struct page *start_page, unsigned long size, int node)return 0 ; } -void register_page_bootmem_memmap (unsigned long section_nr, -struct page *start_page,unsigned long size) -{ -unsigned long addr = (unsigned long )start_page; -unsigned long end = (unsigned long )(start_page + size); -unsigned long next; -pgd_t *pgd; -pud_t *pud; -pmd_t *pmd; -unsigned int nr_pages; -struct page *page; - -for (; addr< end; addr = next) { -pte_t *pte =NULL ; - - pgd =pgd_offset_k (addr); -if (pgd_none (*pgd)) { - next = (addr +PAGE_SIZE )&PAGE_MASK ; -continue ; - } -get_page_bootmem (section_nr,pgd_page (*pgd),MIX_SECTION_INFO ); - - pud =pud_offset (pgd, addr); -if (pud_none (*pud)) { - next = (addr +PAGE_SIZE )&PAGE_MASK ; -continue ; - } -get_page_bootmem (section_nr,pud_page (*pud),MIX_SECTION_INFO ); - -if (!cpu_has_pse) { - next = (addr +PAGE_SIZE )&PAGE_MASK ; - pmd =pmd_offset (pud, addr); -if (pmd_none (*pmd)) -continue ; -get_page_bootmem (section_nr,pmd_page (*pmd), -MIX_SECTION_INFO ); - - pte =pte_offset_kernel (pmd, addr); -if (pte_none (*pte)) -continue ; -get_page_bootmem (section_nr,pte_page (*pte), -SECTION_INFO ); - }else { - next =pmd_addr_end (addr, end); - - pmd =pmd_offset (pud, addr); -if (pmd_none (*pmd)) -continue ; - - nr_pages =1 << (get_order (PMD_SIZE )); - page =pmd_page (*pmd); -while (nr_pages--) -get_page_bootmem (section_nr, page++, -SECTION_INFO ); - } - } -} -void __meminit vmemmap_populate_print_last (void ) {if (p_start) {include/linux/mm.h +0
-2@@ -1724,8 +1724,6 @@ void vmemmap_populate_print_last(void);#ifdef CONFIG_MEMORY_HOTPLUG void vmemmap_free (struct page *memmap,unsigned long nr_pages);#endif -void register_page_bootmem_memmap (unsigned long section_nr,struct page *map, -unsigned long size);enum mf_flags {MF_COUNT_INCREASED =1 <<0 ,mm/memory_hotplug.c +52
-1@@ -91,7 +91,6 @@ static void release_memory_resource(struct resource *res)return ; } -#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE void get_page_bootmem (unsigned long info,struct page *page,unsigned long type) {@@ -101,6 +100,7 @@ void get_page_bootmem(unsigned long info, struct page *page,atomic_inc (&page->_count); } +#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE /* reference to __meminit __free_pages_bootmem is valid * so use __ref to tell modpost not to generate a warning */ void __ref put_page_bootmem (struct page *page)@@ -128,6 +128,64 @@ void __ref put_page_bootmem(struct page *page) } +void register_page_bootmem_memmap (unsigned long section_nr, +struct page *start_page,unsigned long size) +{ +unsigned long addr = (unsigned long )start_page; +unsigned long end = (unsigned long )(start_page + size); +unsigned long next; +pgd_t *pgd; +pud_t *pud; +pmd_t *pmd; +unsigned int nr_pages; +struct page *page; + +for (; addr< end; addr = next) { +pte_t *pte =NULL ; + + pgd =pgd_offset_k (addr); +if (pgd_none (*pgd)) { + next = (addr +PAGE_SIZE )&PAGE_MASK ; +continue ; + } +get_page_bootmem (section_nr,pgd_page (*pgd),MIX_SECTION_INFO ); + + pud =pud_offset (pgd, addr); +if (pud_none (*pud)) { + next = (addr +PAGE_SIZE )&PAGE_MASK ; +continue ; + } +get_page_bootmem (section_nr,pud_page (*pud),MIX_SECTION_INFO ); + +if (!cpu_has_pse) { + next = (addr +PAGE_SIZE )&PAGE_MASK ; + pmd =pmd_offset (pud, addr); +if (pmd_none (*pmd)) +continue ; +get_page_bootmem (section_nr,pmd_page (*pmd), +MIX_SECTION_INFO ); + + pte =pte_offset_kernel (pmd, addr); +if (pte_none (*pte)) +continue ; +get_page_bootmem (section_nr,pte_page (*pte), +SECTION_INFO ); + }else { + next =pmd_addr_end (addr, end); + + pmd =pmd_offset (pud, addr); +if (pmd_none (*pmd)) +continue ; + + nr_pages =1 << (get_order (PMD_SIZE )); + page =pmd_page (*pmd);
mm/memory_hotplug.c void __ref put_page_bootmem(struct page *page) · line 191
Quoted 10 lines
mm/memory_hotplug.c +7
-0+while (nr_pages--) +get_page_bootmem (section_nr, page++, +SECTION_INFO ); + } + } +} +#ifndef CONFIG_SPARSEMEM_VMEMMAP static void register_page_bootmem_info_section (unsigned long start_pfn) {
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
On Fri 11-01-13 11:17:45, Michal Hocko wrote:
[...]
Quoted 28 lines
mm/memory_hotplug.c +20
-0@@ -128,6 +128,64 @@ void __ref put_page_bootmem(struct page *page) } +void register_page_bootmem_memmap (unsigned long section_nr, +struct page *start_page,unsigned long size) +{ +unsigned long addr = (unsigned long )start_page; +unsigned long end = (unsigned long )(start_page + size); +unsigned long next; +pgd_t *pgd; +pud_t *pud; +pmd_t *pmd; +unsigned int nr_pages; +struct page *page; + +for (; addr < end; addr = next) { +pte_t *pte =NULL ; + + pgd =pgd_offset_k (addr); +if (pgd_none (*pgd)) { + next = (addr +PAGE_SIZE ) &PAGE_MASK ; +continue ; + }
mm/memory_hotplug.c void __ref put_page_bootmem(struct page *page) · line 160
Quoted 10 lines
mm/memory_hotplug.c +10
-0+get_page_bootmem (section_nr,pgd_page (*pgd),MIX_SECTION_INFO ); + + pud =pud_offset (pgd, addr); +if (pud_none (*pud)) { + next = (addr +PAGE_SIZE ) &PAGE_MASK ; +continue ; + } +get_page_bootmem (section_nr,pud_page (*pud),MIX_SECTION_INFO ); + +if (!cpu_has_pse) {
Darn! And now that I am looking at the patch closer it is too x86 centric so this cannot be in the generic code. I will try to cook something better. Sorry about the noise.
[...]
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 36 lines · Michal Hocko
On Fri 11-01-13 11:17:45, Michal Hocko wrote:
[...]Quoted 34 lines
mm/memory_hotplug.c +26
-0@@ -128,6 +128,64 @@ void __ref put_page_bootmem(struct page *page) } +void register_page_bootmem_memmap (unsigned long section_nr, +struct page *start_page,unsigned long size) +{ +unsigned long addr = (unsigned long )start_page; +unsigned long end = (unsigned long )(start_page + size); +unsigned long next; +pgd_t *pgd; +pud_t *pud; +pmd_t *pmd; +unsigned int nr_pages; +struct page *page; + +for (; addr < end; addr = next) { +pte_t *pte =NULL ; + + pgd =pgd_offset_k (addr); +if (pgd_none (*pgd)) { + next = (addr +PAGE_SIZE ) &PAGE_MASK ; +continue ; + } +get_page_bootmem (section_nr,pgd_page (*pgd),MIX_SECTION_INFO ); + + pud =pud_offset (pgd, addr); +if (pud_none (*pud)) { + next = (addr +PAGE_SIZE ) &PAGE_MASK ; +continue ;
Quoted 8 lines
mm/memory_hotplug.c void __ref put_page_bootmem(struct page *page) · line 160
Quoted 4 lines
mm/memory_hotplug.c +4
-0+ } +get_page_bootmem (section_nr,pud_page (*pud),MIX_SECTION_INFO ); + +if (!cpu_has_pse) {Darn! And now that I am looking at the patch closer it is too x86 centric so this cannot be in the generic code. I will try to cook something better. Sorry about the noise.
It is more complicated than I thought. One would tell it's a mess. The patch bellow fixes the compilation issue but I am not sure we want to include memory_hotplug.h into arch/x86/mm/init_64.c. Moreover
+void register_page_bootmem_memmap(unsigned long section_nr,
+ struct page *start_page, unsigned long size)
+{
+ /* TODO */
+}
for other archs would suggest that the code is not ready yet. Should this rather be dropped for now?
---
Hi Michal,
arch/x86/mm/init_64.c line 32
Quoted 12 lines · Michal Hocko
Signed-off-by Michal Hocko <[email protected]>--- arch/x86/mm/init_64.c | 3 +++ include/linux/mm.h | 2 ++ 2 files changed, 5 insertions(+)arch/x86/mm/init_64.c +0
-0@@ -32,6 +32,7 @@#include <linux/memory_hotplug.h>
linux/memory_hotplug.h has already been included here.
I think it's OK to add add the missing CONFIG option or move the memory-hotlug related complaint code into the CONFIG span.
thanks,
linfeng
arch/x86/mm/init_64.c line 35
Quoted 3 lines
arch/x86/mm/init_64.c +1
-0#include <linux/nmi.h> #include <linux/gfp.h> +#include <linux/memory_hotplug.h>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 9 lines · Lin Feng
Hi Michal,
Quoted 6 lines · Michal Hocko
Signed-off-by Michal Hocko <[email protected]>--- arch/x86/mm/init_64.c | 3 +++ include/linux/mm.h | 2 ++ 2 files changed, 5 insertions(+)
Quoted 7 lines
arch/x86/mm/init_64.c line 32
Quoted 6 lines
arch/x86/mm/init_64.c +0
-0@@ -32,6 +32,7 @@#include <linux/memory_hotplug.h>
linux/memory_hotplug.hhas already been included here.
Ohh, I have missed that.
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 15 lines · Michal Hocko
Quoted 4 lines
Darn! And now that I am looking at the patch closer it is too x86 centric so this cannot be in the generic code. I will try to cook something better. Sorry about the noise.
It is more complicated than I thought. One would tell it's a mess. The patch bellow fixes the compilation issue but I am not sure we want to include
memory_hotplug.hintoarch/x86/mm/init_64.c. Moreover(quoted diff) +5
-0+void register_page_bootmem_memmap(unsigned long section_nr, + struct page *start_page, unsigned long size) +{ + /* TODO */ +}
Quoted 2 lines
for other archs would suggest that the code is not ready yet. Should this rather be dropped for now?
Hi Michal,
Do you mean remove register_page_bootmem_memmap() from other architectures ? Well, I think this function is called by register_page_bootmem_info_section(), which is a common function in mm/memory_hotplug.c shared by all architectures. So I don't think we should remove it. :)
Thanks. :)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Lin Feng
Tested-byarch/x86/mm/init_64.c line 35
Quoted 9 lines · Michal Hocko
arch/x86/mm/init_64.c +1
-0@@ -32,6 +32,7 @@#include <linux/memory_hotplug.h> #include <linux/nmi.h> #include <linux/gfp.h> +#include <linux/memory_hotplug.h>
except for this,
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 16 lines · Tang Chen
Quoted 15 lines · Michal Hocko
Quoted 4 lines
Darn! And now that I am looking at the patch closer it is too x86 centric so this cannot be in the generic code. I will try to cook something better. Sorry about the noise.
It is more complicated than I thought. One would tell it's a mess. The patch bellow fixes the compilation issue but I am not sure we want to include
memory_hotplug.hintoarch/x86/mm/init_64.c. Moreover(quoted diff) +5
-0+void register_page_bootmem_memmap(unsigned long section_nr, + struct page *start_page, unsigned long size) +{ + /* TODO */ +}
Quoted 7 lines
Quoted 2 lines
for other archs would suggest that the code is not ready yet. Should this rather be dropped for now?
Hi Michal,
Do you mean remove
register_page_bootmem_memmap()from other architectures ?
No I meant the patch to be dropped until it gets implementation for other architectures or the users of the function would be explicit about archs which are supported. What happens if the implementation is empty will the generic code work properly? From my very limitted understanding of the code it won't.
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 22 lines · Michal Hocko
Quoted 21 lines · Tang Chen
Quoted 15 lines · Michal Hocko
Quoted 4 lines
Darn! And now that I am looking at the patch closer it is too x86 centric so this cannot be in the generic code. I will try to cook something better. Sorry about the noise.
It is more complicated than I thought. One would tell it's a mess. The patch bellow fixes the compilation issue but I am not sure we want to include
memory_hotplug.hintoarch/x86/mm/init_64.c. Moreover(quoted diff) +5
-0+void register_page_bootmem_memmap(unsigned long section_nr, + struct page *start_page, unsigned long size) +{ + /* TODO */ +}Quoted 2 lines
for other archs would suggest that the code is not ready yet. Should this rather be dropped for now?
Hi Michal,
Quoted 8 lines
Quoted 2 lines
Do you mean remove
register_page_bootmem_memmap()from other architectures ?No I meant the patch to be dropped until it gets implementation for other architectures or the users of the function would be explicit about archs which are supported. What happens if the implementation is empty will the generic code work properly? From my very limitted understanding of the code it won't.
Hi Michal,
Hum, I see. Thank you for your remind. :) register_page_bootmem_info_section() will be different in other architectures if register_page_bootmem_memmap() is empty.
I think we can post a patch to make register_page_bootmem_info_section() the same as before, and we just implement the x86 version first. So that it will have no harm to other architectures.
How do you think ?
Thanks. :)
Quoted 1 line
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 32 lines · Tang Chen
Quoted 22 lines · Michal Hocko
Quoted 21 lines · Tang Chen
Quoted 15 lines · Michal Hocko
Quoted 4 lines
Darn! And now that I am looking at the patch closer it is too x86 centric so this cannot be in the generic code. I will try to cook something better. Sorry about the noise.
It is more complicated than I thought. One would tell it's a mess. The patch bellow fixes the compilation issue but I am not sure we want to include
memory_hotplug.hintoarch/x86/mm/init_64.c. Moreover(quoted diff) +5
-0+void register_page_bootmem_memmap(unsigned long section_nr, + struct page *start_page, unsigned long size) +{ + /* TODO */ +}Quoted 2 lines
for other archs would suggest that the code is not ready yet. Should this rather be dropped for now?
Hi Michal,
Quoted 8 lines
Quoted 2 lines
Do you mean remove
register_page_bootmem_memmap()from other architectures ?No I meant the patch to be dropped until it gets implementation for other architectures or the users of the function would be explicit about archs which are supported. What happens if the implementation is empty will the generic code work properly? From my very limitted understanding of the code it won't.
Quoted 5 lines
Hi Michal,
Hum, I see. Thank you for your remind. :)
register_page_bootmem_info_section()will be different in other architectures ifregister_page_bootmem_memmap()is empty.
Not sure I understand what "different" means here but I suspect it would be buggy. Is that correct?
Quoted 3 lines
I think we can post a patch to make
register_page_bootmem_info_section()the same as before, and we just implement the x86 version first. So that it will have no harm to other architectures.
I haven't followed the previous versions of the patch - I have noticed this being broken only because it failed during my automatic build testing when merging new mmots tree into mm git tree. I have no objections for further patches of course but this one seems to be buggy so it should be dropped until a fixed version is available.
Quoted 6 lines
How do you think ?
Thanks. :)
Quoted 1 line
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>