On Thu, Sep 27, 2012 at 06:06:30PM +0800, Wen Congyang wrote: > Please try the following patch: > From a38ec678e0a9b48b252f457d7910b7527049dc43 Mon Sep 17 00:00:00 2001 > From: Wen Congyang <wency@xxxxxxxxxxxxxx> > Date: Thu, 27 Sep 2012 17:27:57 +0800 > Subject: [PATCH] clear the memory to store page information this solves the hot re-add problem for me. thanks for the quick solution. - Vasilis > > --- > mm/sparse.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/mm/sparse.c b/mm/sparse.c > index ab9d755..36dda08 100644 > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -639,7 +639,6 @@ static struct page *__kmalloc_section_memmap(unsigned long nr_pages) > got_map_page: > ret = (struct page *)pfn_to_kaddr(page_to_pfn(page)); > got_map_ptr: > - memset(ret, 0, memmap_size); > > return ret; > } > @@ -761,6 +760,8 @@ int __meminit sparse_add_one_section(struct zone *zone, unsigned long start_pfn, > goto out; > } > > + memset(memmap, 0, sizeof(struct page) * nr_pages); > + > ms->section_mem_map |= SECTION_MARKED_PRESENT; > > ret = sparse_init_one_section(ms, section_nr, memmap, usemap); > -- > 1.7.1 > > Thanks > Wen Congyang > > > > > thanks, > > > > - Vasilis > > > > [1] https://lkml.org/lkml/2012/9/6/635 > > [2] https://lkml.org/lkml/2012/9/11/542 > > [3] https://lkml.org/lkml/2012/9/20/37 > > [4] http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/98691 > > > > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html