Re: mmotm 2008-09-22-01-36 uploaded (memory_hotplug)

From: Badari Pulavarty
Date: Tue Sep 23 2008 - 18:08:52 EST


On Mon, 2008-09-22 at 12:57 -0700, Andrew Morton wrote:
> On Mon, 22 Sep 2008 11:29:18 -0700
> Randy Dunlap <randy.dunlap@xxxxxxxxxx> wrote:
>
> > On Mon, 22 Sep 2008 01:38:58 -0700 akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> >
> > > The mm-of-the-moment snapshot 2008-09-22-01-36 has been uploaded to
> > >
> > > http://userweb.kernel.org/~akpm/mmotm/
> > >
> > > It contains the following patches against 2.6.27-rc7:
> >
> >
> > mm/built-in.o: In function `remove_memory':
> > (.text+0x497ed): multiple definition of `remove_memory'
> > arch/x86/mm/built-in.o:(.text+0x3d8): first defined here
> > make[1]: *** [vmlinux.o] Error 1
> >
> >
> > so it is defined in both mm/memory_hotplug.c and
> > arch/x86/mm/init_64.c when CONFIG_MEMORY_HOTREMOVE=y.
> >
>
> OK, thanks, it looks like people are changing things under our feet.
>
> Badari, can you please check this fix against
> mm-cleanup-to-make-remove_memory-arch-neutral.patch?
>


When I made the patch, only ppc64, ia64 and s390 had
memory_remove() support in mainline. I sent a patch against
x86 to add hotplug memory remove support. I guess you
merged Gary's patch and sh-arch patch.

I noticed that you cleaned up all these and added to -mm.
Do you want me to merge all these into a single patch and
resend it (against -mm) ? (It will look exactly the same
anyway).


Thanks,
Badari

>
> diff -puN arch/sh/mm/init.c~mm-cleanup-to-make-remove_memory-arch-neutral-fix-fix arch/sh/mm/init.c
> --- a/arch/sh/mm/init.c~mm-cleanup-to-make-remove_memory-arch-neutral-fix-fix
> +++ a/arch/sh/mm/init.c
> @@ -293,20 +293,4 @@ int memory_add_physaddr_to_nid(u64 addr)
> EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
> #endif
>
> -#ifdef CONFIG_MEMORY_HOTREMOVE
> -int remove_memory(u64 start, u64 size)
> -{
> - unsigned long start_pfn = start >> PAGE_SHIFT;
> - unsigned long end_pfn = start_pfn + (size >> PAGE_SHIFT);
> - int ret;
> -
> - ret = offline_pages(start_pfn, end_pfn, 120 * HZ);
> - if (unlikely(ret))
> - printk("%s: Failed, offline_pages() == %d\n", __func__, ret);
> -
> - return ret;
> -}
> -EXPORT_SYMBOL_GPL(remove_memory);
> -#endif
> -
> #endif /* CONFIG_MEMORY_HOTPLUG */
> diff -puN arch/x86/mm/init_64.c~mm-cleanup-to-make-remove_memory-arch-neutral-fix-fix arch/x86/mm/init_64.c
> --- a/arch/x86/mm/init_64.c~mm-cleanup-to-make-remove_memory-arch-neutral-fix-fix
> +++ a/arch/x86/mm/init_64.c
> @@ -796,24 +796,6 @@ int memory_add_physaddr_to_nid(u64 start
> EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
> #endif
>
> -#ifdef CONFIG_MEMORY_HOTREMOVE
> -int remove_memory(u64 start, u64 size)
> -{
> - unsigned long start_pfn, end_pfn;
> - unsigned long timeout = 120 * HZ;
> - int ret;
> - start_pfn = start >> PAGE_SHIFT;
> - end_pfn = start_pfn + (size >> PAGE_SHIFT);
> - ret = offline_pages(start_pfn, end_pfn, timeout);
> - if (ret)
> - goto out;
> - /* Arch-specific calls go here */
> -out:
> - return ret;
> -}
> -EXPORT_SYMBOL_GPL(remove_memory);
> -#endif /* CONFIG_MEMORY_HOTREMOVE */
> -
> #endif /* CONFIG_MEMORY_HOTPLUG */
>
> /*
> _
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/