Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Tal Zussman <tz2294@columbia.edu>
Cc: Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] arm64: mte: drop the huge zero folio check in __access_remote_tags()
Date: Thu, 26 Nov 2026 18:28:15 +0000	[thread overview]
Message-ID: <awh6P5njoJ3eOVlI@arm.com> (raw)
In-Reply-To: <20261031-arm64-mte-folio-v1-2-a8bc2960d11e@columbia.edu>

On Sat, Oct 31, 2026 at 04:44:54PM -0400, Tal Zussman wrote:
> Commit adfb6609c680 ("mm/huge_memory: initialise the tags of the huge
> zero folio") added an is_huge_zero_folio() check to the hugetlb branch,
> but the huge zero folio is a THP, so it is never reached. It doesn't
> need to be checked in the other branch either, as its pages are tagged
> by __GFP_ZEROTAGS on allocation. Remove the check.
> 
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
> ---
>  arch/arm64/kernel/mte.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c
> index f8d39e70857e..8615732567e6 100644
> --- a/arch/arm64/kernel/mte.c
> +++ b/arch/arm64/kernel/mte.c
> @@ -483,8 +483,7 @@ static int __access_remote_tags(struct mm_struct *mm, unsigned long addr,
>  		}
>  
>  		if (folio_test_hugetlb(folio))
> -			WARN_ON_ONCE(!folio_test_hugetlb_mte_tagged(folio) &&
> -				     !is_huge_zero_folio(folio));
> +			WARN_ON_ONCE(!folio_test_hugetlb_mte_tagged(folio));
>  		else
>  			WARN_ON_ONCE(!page_mte_tagged(page) && !is_zero_folio(folio));

Hmm, I added it to the wrong branch but it wasn't needed anyway since
the huge zero folio has PG_mte_tagged set. Patch looks fine:

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>


      reply	other threads:[~2026-11-26 18:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-31 20:44 [PATCH 0/2] arm64: mte: use folios in __access_remote_tags() Tal Zussman
2026-10-31 20:44 ` [PATCH 1/2] arm64: mte: use a folio " Tal Zussman
2026-11-26 18:15   ` Catalin Marinas
2026-10-31 20:44 ` [PATCH 2/2] arm64: mte: drop the huge zero folio check " Tal Zussman
2026-11-26 18:28   ` Catalin Marinas [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=awh6P5njoJ3eOVlI@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=tz2294@columbia.edu \
    --cc=will@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