linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: Tiezhu Yang <yangtiezhu@loongson.cn>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	Xuefeng Li <lixuefeng@loongson.cn>
Subject: Re: [PATCH 2/2] MIPS: Select ARCH_KEEP_MEMBLOCK to enable sysfs memblock debug
Date: Thu, 3 Dec 2020 11:58:51 +0800	[thread overview]
Message-ID: <9c9af0de-387b-f113-b0a2-c5767c31c16d@flygoat.com> (raw)
In-Reply-To: <1606965544-22611-3-git-send-email-yangtiezhu@loongson.cn>



在 2020/12/3 上午11:19, Tiezhu Yang 写道:
> In the current code, CONFIG_ARCH_KEEP_MEMBLOCK is not set for MIPS arch,
> memblock_discard() will discard memory and reserved arrays if they were
> allocated, select ARCH_KEEP_MEMBLOCK to give a chance to track "memory"
> and "reserved" memblocks after early boot, with this patch, we can see
> the following two sysfs interfaces under DEBUG_FS.
>
> /sys/kernel/debug/memblock/memory
> /sys/kernel/debug/memblock/reserved

Is this really necessary?
memblock data is not really necessary after boot for non-debug purpose.

Given that MIPS is widely used in embedded systems which doesn't have much
memory, keeping unused data after boot is kinda unconvincing.

If you intend to debug that please do it locally.

Thanks.

- Jiaxun


>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
>   arch/mips/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 44a47ad..f65da197 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -9,6 +9,7 @@ config MIPS
>   	select ARCH_HAS_PTE_SPECIAL if !(32BIT && CPU_HAS_RIXI)
>   	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
>   	select ARCH_HAS_UBSAN_SANITIZE_ALL
> +	select ARCH_KEEP_MEMBLOCK
>   	select ARCH_SUPPORTS_UPROBES
>   	select ARCH_USE_BUILTIN_BSWAP
>   	select ARCH_USE_CMPXCHG_LOCKREF if 64BIT

  reply	other threads:[~2020-12-03  4:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03  3:19 [PATCH 0/2] memblock debug Tiezhu Yang
2020-12-03  3:19 ` [PATCH 1/2] MIPS: Move memblock_dump_all() to the end of setup_arch() Tiezhu Yang
2020-12-04 12:07   ` Thomas Bogendoerfer
2020-12-03  3:19 ` [PATCH 2/2] MIPS: Select ARCH_KEEP_MEMBLOCK to enable sysfs memblock debug Tiezhu Yang
2020-12-03  3:58   ` Jiaxun Yang [this message]
2020-12-04 12:08     ` Thomas Bogendoerfer
2020-12-05  5:05       ` Tiezhu Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9c9af0de-387b-f113-b0a2-c5767c31c16d@flygoat.com \
    --to=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=tsbogend@alpha.franken.de \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).