lkml.org 
[lkml]   [2020]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH v3 4/4] mm,memory_hotplug: Add mhp_memmap_on_memory boot option
From
Date
On 09.12.20 11:02, Oscar Salvador wrote:
> 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?

Not that I am aware of for our use case. You can inspect parameters via

/sys/modules/memory_hotplug/parameters/

then, and even change them (if allowed for a specific module parameters)

>
>> 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.

Me neither before I spotted the page_alloc page_shuffling usage :)


--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2020-12-09 11:07    [W:0.912 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site