From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Julian Braha <julianbraha@gmail.com>,
akpm@linux-foundation.org, vbabka@kernel.org, hannes@cmpxchg.org
Cc: mhocko@suse.com, surenb@google.com, rppt@kernel.org,
Liam.Howlett@oracle.com, ljs@kernel.org, david@kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/thp: dead code cleanup in Kconfig
Date: Thu, 2 Apr 2026 08:19:30 +0530 [thread overview]
Message-ID: <d7cb55d2-ea6b-4a76-be05-86ce38b7c3b0@arm.com> (raw)
In-Reply-To: <20260331070730.33915-1-julianbraha@gmail.com>
On 31/03/26 12:37 PM, Julian Braha wrote:
> There is already an 'if TRANSPARENT_HUGEPAGE' condition wrapping several
> config options e.g. 'READ_ONLY_THP_FOR_FS', making
> the 'depends on' statement for each of these a duplicate dependency
> (dead code).
>
> I propose leaving the outer 'if TRANSPARENT_HUGEPAGE...endif' and removing
> the individual 'depends on TRANSPARENT_HUGEPAGE' statement from each
> option.
>
> This dead code was found by kconfirm, a static analysis tool for Kconfig.
>
> Signed-off-by: Julian Braha <julianbraha@gmail.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> mm/Kconfig | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/mm/Kconfig b/mm/Kconfig
> index e8bf1e9e6ad9..29d2de0d5c06 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -810,7 +810,6 @@ if TRANSPARENT_HUGEPAGE
>
> choice
> prompt "Transparent Hugepage Support sysfs defaults"
> - depends on TRANSPARENT_HUGEPAGE
> default TRANSPARENT_HUGEPAGE_ALWAYS
> help
> Selects the sysfs defaults for Transparent Hugepage Support.
> @@ -840,7 +839,6 @@ endchoice
>
> choice
> prompt "Shmem hugepage allocation defaults"
> - depends on TRANSPARENT_HUGEPAGE
> default TRANSPARENT_HUGEPAGE_SHMEM_HUGE_NEVER
> help
> Selects the hugepage allocation policy defaults for
> @@ -886,7 +884,6 @@ endchoice
>
> choice
> prompt "Tmpfs hugepage allocation defaults"
> - depends on TRANSPARENT_HUGEPAGE
> default TRANSPARENT_HUGEPAGE_TMPFS_HUGE_NEVER
> help
> Selects the hugepage allocation policy defaults for
> @@ -931,7 +928,7 @@ endchoice
>
> config THP_SWAP
> def_bool y
> - depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP && 64BIT
> + depends on ARCH_WANTS_THP_SWAP && SWAP && 64BIT
> help
> Swap transparent huge pages in one piece, without splitting.
> XXX: For now, swap cluster backing transparent huge page
> @@ -941,7 +938,6 @@ config THP_SWAP
>
> config READ_ONLY_THP_FOR_FS
> bool "Read-only THP for filesystems (EXPERIMENTAL)"
> - depends on TRANSPARENT_HUGEPAGE
>
> help
> Allow khugepaged to put read-only file-backed pages in THP.
prev parent reply other threads:[~2026-04-02 2:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 7:07 Julian Braha
2026-03-31 7:22 ` Lorenzo Stoakes (Oracle)
2026-04-01 0:37 ` Andrew Morton
2026-04-05 17:18 ` Julian Braha
2026-04-05 19:27 ` Andrew Morton
2026-04-06 21:14 ` Julian Braha
2026-04-07 9:56 ` Lorenzo Stoakes (Oracle)
2026-04-01 13:38 ` David Hildenbrand (Arm)
2026-04-02 2:49 ` Anshuman Khandual [this message]
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=d7cb55d2-ea6b-4a76-be05-86ce38b7c3b0@arm.com \
--to=anshuman.khandual@arm.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=julianbraha@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/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