[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201209100239.GB30892@linux>
Date: Wed, 9 Dec 2020 11:02:43 +0100
From: Oscar Salvador <osalvador@...e.de>
To: David Hildenbrand <david@...hat.com>
Cc: mhocko@...nel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, vbabka@...e.cz, pasha.tatashin@...een.com
Subject: Re: [RFC PATCH v3 4/4] mm,memory_hotplug: Add mhp_memmap_on_memory
boot option
On Wed, Dec 02, 2020 at 10:42:18AM +0100, David Hildenbrand wrote:
> I have another memhp tunable in the works. I suggest doing it like
> page_shuffling and using, module parameters instead. Makes this
> a bit nicer IMHO.
Does that have any impact?
> diff --git a/mm/Makefile b/mm/Makefile
> index 069f216e109e..ba7714b5eaa1 100644
> --- a/mm/Makefile
> +++ b/mm/Makefile
> @@ -58,9 +58,13 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
> page-alloc-y := page_alloc.o
> page-alloc-$(CONFIG_SHUFFLE_PAGE_ALLOCATOR) += shuffle.o
>
> +# Give "memory_hotplug" its own module-parameter namespace
> +memory-hotplug-$(CONFIG_MEMORY_HOTPLUG) := memory_hotplug.o
> +
> obj-y += page-alloc.o
> obj-y += init-mm.o
> obj-y += memblock.o
> +obj-y += $(memory-hotplug-y)
>
> ifdef CONFIG_MMU
> obj-$(CONFIG_ADVISE_SYSCALLS) += madvise.o
> @@ -82,7 +86,6 @@ obj-$(CONFIG_SLAB) += slab.o
> obj-$(CONFIG_SLUB) += slub.o
> obj-$(CONFIG_KASAN) += kasan/
> obj-$(CONFIG_FAILSLAB) += failslab.o
> -obj-$(CONFIG_MEMORY_HOTPLUG) += memory_hotplug.o
> obj-$(CONFIG_MEMTEST) += memtest.o
> obj-$(CONFIG_MIGRATION) += migrate.o
> obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += huge_memory.o khugepaged.o
>
>
> The you can just use module_param/MODULE_PARM_DESC and set the parameter via
>
> "memory_hotplug.memmap_on_memory"
I have to confess that I was not aware of this trick, but looks cleaner
overall.
Thanks
--
Oscar Salvador
SUSE L3
Powered by blists - more mailing lists