Re: [PATCH v3 2/2] mm/memblock: Add reserve_mem debugfs info

From: Guilherme G. Piccoli

Date: Thu Mar 19 2026 - 13:24:04 EST


On 19/03/2026 13:34, Mike Rapoport wrote:
> [...]
>> -static int __init memblock_init_debugfs(void)
>> +static inline void memblock_debugfs_make_dirs(struct dentry *root)
>
> This does not make dirs but rather exposes files representing memblock
> arrays.
>
> How about calling this function
> memblock_debugfs_expose_arrays()?
>

I sincerely couldn't agree more - it should have have been a braino, why
on earth I called it this way?! Apologies, will respin soon...will wait
until weekend in case someone else has opinions.


>> {
>> - struct dentry *root = debugfs_create_dir("memblock", NULL);
>> -
>> - debugfs_create_file("memory", 0444, root,
>> - &memblock.memory, &memblock_debug_fops);
>> - debugfs_create_file("reserved", 0444, root,
>> - &memblock.reserved, &memblock_debug_fops);
>> #ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP
>> debugfs_create_file("physmem", 0444, root, &physmem,
>> &memblock_debug_fops);
>> #endif
>> + debugfs_create_file("memory", 0444, root,
>> + &memblock.memory, &memblock_debug_fops);
>> + debugfs_create_file("reserved", 0444, root,
>> + &memblock.reserved, &memblock_debug_fops);
>
> No need to move these after PHYS_MAP attribute
>

OK, your call, will change it in the respin as well.
Thanks,


Guilherme