linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Christoph Lameter (Ampere)" <cl@gentwo.org>
To: Yang Shi <yang@os.amperecomputing.com>
Cc: muchun.song@linux.dev, osalvador@suse.de, david@redhat.com,
	 akpm@linux-foundation.org, catalin.marinas@arm.com,
	will@kernel.org,  carl@os.amperecomputing.com,
	linux-mm@kvack.org,  linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: hugetlb: avoid soft lockup when mprotect with PROT_MTE
Date: Fri, 26 Sep 2025 09:29:54 -0700 (PDT)	[thread overview]
Message-ID: <1038c7c7-81d6-f273-6fa1-93eb7206d5ed@gentwo.org> (raw)
In-Reply-To: <20250926162034.1785899-1-yang@os.amperecomputing.com>

On Fri, 26 Sep 2025, Yang Shi wrote:

> When calling mprotect() with PROT_MTE, kernel will initialize MTE tags
> for every single page in the affected area. Soft lockup was observed
> when doing this for large HugeTLB memory area in our customer's workload
> (~300GB memory):

AFAICT this is a bug fix. The hugetlb path should be doing a
cond_resched() like the base page code does.

It is not MTE specific. If other processing takes a long time in the loop
(setting up terabyte size mappings for hugetlb for example) then the
softlockup could also be triggered on non MTE workloads.

Reviewed-by: Christoph Lameter (Ampere) <cl@gentwo.org>



  reply	other threads:[~2025-09-26 16:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26 16:20 Yang Shi
2025-09-26 16:29 ` Christoph Lameter (Ampere) [this message]
2025-09-26 16:56   ` Catalin Marinas
2025-09-26 17:51     ` Yang Shi
2025-09-29  8:29 ` David Hildenbrand
2025-09-29 16:15   ` Yang Shi
2025-09-29  9:27 ` Oscar Salvador
2025-09-29  9:55 ` Anshuman Khandual

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=1038c7c7-81d6-f273-6fa1-93eb7206d5ed@gentwo.org \
    --to=cl@gentwo.org \
    --cc=akpm@linux-foundation.org \
    --cc=carl@os.amperecomputing.com \
    --cc=catalin.marinas@arm.com \
    --cc=david@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --cc=osalvador@suse.de \
    --cc=will@kernel.org \
    --cc=yang@os.amperecomputing.com \
    /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