page_cgroup: drop multi CONFIG_MEMORY_HOTPLUG
PATCH 3/3 page_cgroup: drop multi CONFIG_MEMORY_HOTPLUG
No need two CONFIG_MEMORY_HOTPLUG place.
Signed-off-by Bob Liu <[email protected]>
--- mm/page_cgroup.c | 30 ++++++++++++++---------------- 1 files changed, 14 insertions(+), 16 deletions(-)
mm/page_cgroup.c +14 -16
@@ -124,22 +124,6 @@ static void *__meminit alloc_page_cgroup(size_t size, int nid)return addr; } -#ifdef CONFIG_MEMORY_HOTPLUG -static void free_page_cgroup (void *addr) -{ -if (is_vmalloc_addr (addr)) { -vfree (addr); - }else { -struct page *page =virt_to_page (addr); -size_t table_size = -sizeof (struct page_cgroup ) *PAGES_PER_SECTION ; - -BUG_ON (PageReserved (page)); -free_pages_exact (addr, table_size); - } -} -#endif -static int __meminit init_section_page_cgroup (unsigned long pfn,int nid) {struct mem_section *section;
@@ -176,6 +160,20 @@ static int __meminit init_section_page_cgroup(unsigned long pfn, int nid)return 0 ; }#ifdef CONFIG_MEMORY_HOTPLUG +static void free_page_cgroup (void *addr) +{ +if (is_vmalloc_addr (addr)) { +vfree (addr); + }else { +struct page *page =virt_to_page (addr); +size_t table_size = +sizeof (struct page_cgroup ) *PAGES_PER_SECTION ; + +BUG_ON (PageReserved (page)); +free_pages_exact (addr, table_size); + } +} +void __free_page_cgroup (unsigned long pfn) {struct mem_section *ms;
Signature · 9 lines
1.7.0.4 -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 1 line · Bob Liu
No need two
CONFIG_MEMORY_HOTPLUGplace.
I originally wanted to have alloc and dealloc at one location but this makes sense as well.
Quoted 2 lines
Signed-off-by Bob Liu <[email protected]>
Acked-by Michal Hocko <[email protected]>
Thanks
Quoted 62 lines
--- mm/page_cgroup.c | 30 ++++++++++++++---------------- 1 files changed, 14 insertions(+), 16 deletions(-)mm/page_cgroup.c +14
-16@@ -124,22 +124,6 @@ static void *__meminit alloc_page_cgroup(size_t size, int nid)return addr; } -#ifdef CONFIG_MEMORY_HOTPLUG -static void free_page_cgroup (void *addr) -{ -if (is_vmalloc_addr (addr)) { -vfree (addr); - }else { -struct page *page =virt_to_page (addr); -size_t table_size = -sizeof (struct page_cgroup ) *PAGES_PER_SECTION ; - -BUG_ON (PageReserved (page)); -free_pages_exact (addr, table_size); - } -} -#endif -static int __meminit init_section_page_cgroup (unsigned long pfn,int nid) {struct mem_section *section;@@ -176,6 +160,20 @@ static int __meminit init_section_page_cgroup(unsigned long pfn, int nid)return 0 ; }#ifdef CONFIG_MEMORY_HOTPLUG +static void free_page_cgroup (void *addr) +{ +if (is_vmalloc_addr (addr)) { +vfree (addr); + }else { +struct page *page =virt_to_page (addr); +size_t table_size = +sizeof (struct page_cgroup ) *PAGES_PER_SECTION ; + +BUG_ON (PageReserved (page)); +free_pages_exact (addr, table_size); + } +} +void __free_page_cgroup (unsigned long pfn) {struct mem_section *ms;Signature · 9 lines
1.7.0.4 -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Signature · 13 lines
Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 3 lines · On Tue, 20 Dec 2011 18:03:41 +0800 Bob Liu <[email protected]> wrote:
No need two
CONFIG_MEMORY_HOTPLUGplace.Signed-off-by Bob Liu <[email protected]>
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>