.kernel.org List-Id: List-Subscribe: List-Unsubscribe: X-DKIM: signer='linux-foundation.org' status='pass' reason='' DKIMCheck: Server passes DKIM test, 0 Spam score X-Spam-Score: 25.4 (+++++++++++++++++++++++++) X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has performed the tests listed below against this email. Information: https://mxroutedocs.com/directadmin/spamfilters/ --- Content analysis details: (25.4 points) --- pts rule name description ---- ---------------------- ----------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: linux-foundation.org] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [142.0.200.124 listed in sa-trusted.bondedsender.org] 0.0 RCVD_IN_DNSWL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to DNSWL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block for more information. [142.0.200.124 listed in list.dnswl.org] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [142.0.200.124 listed in bl.score.senderscore.com] 1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 25 PP_MIME_FAKE_ASCII_TEXT BODY: MIME text/plain claims to be ASCII but isn't 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager X-Old-Subject:[merged mm-hotfixes-stable] mm-hugetlb-avoid-soft-lockup-when-mprotect-to-large-memory-area.patch removed from -mm tree Subject:*****SPAM***** [merged mm-hotfixes-stable] mm-hugetlb-avoid-soft-lockup-when-mprotect-to-large-memory-area.patch removed from -mm tree X-Spam-Status: Yes, score=25.4, +20 total spam score SpamTally: Final spam score: 274 The quilt patch titled Subject: mm: hugetlb: avoid soft lockup when mprotect to large memory area has been removed from the -mm tree. Its filename was mm-hugetlb-avoid-soft-lockup-when-mprotect-to-large-memory-area.patch This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Yang Shi Subject: mm: hugetlb: avoid soft lockup when mprotect to large memory area Date: Mon, 29 Sep 2025 13:24:02 -0700 When calling mprotect() to a large hugetlb memory area in our customer's workload (~300GB hugetlb memory), soft lockup was observed: watchdog: BUG: soft lockup - CPU#98 stuck for 23s! [t2_new_sysv:126916] CPU: 98 PID: 126916 Comm: t2_new_sysv Kdump: loaded Not tainted 6.17-rc7 Hardware name: GIGACOMPUTING R2A3-T40-AAV1/Jefferson CIO, BIOS 5.4.4.1 07/15/2025 pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : mte_clear_page_tags+0x14/0x24 lr : mte_sync_tags+0x1c0/0x240 sp : ffff80003150bb80 x29: ffff80003150bb80 x28: ffff00739e9705a8 x27: 0000ffd2d6a00000 x26: 0000ff8e4bc00000 x25: 00e80046cde00f45 x24: 0000000000022458 x23: 0000000000000000 x22: 0000000000000004 x21: 000000011b380000 x20: ffff000000000000 x19: 000000011b379f40 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : ffffc875e0aa5e2c x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000 x5 : fffffc01ce7a5c00 x4 : 00000000046cde00 x3 : fffffc0000000000 x2 : 0000000000000004 x1 : 0000000000000040 x0 : ffff0046cde7c000 Call trace:   mte_clear_page_tags+0x14/0x24   set_huge_pte_at+0x25c/0x280   hugetlb_change_protection+0x220/0x430   change_protection+0x5c/0x8c   mprotect_fixup+0x10c/0x294   do_mprotect_pkey.constprop.0+0x2e0/0x3d4   __arm64_sys_mprotect+0x24/0x44   invoke_syscall+0x50/0x160   el0_svc_common+0x48/0x144   do_el0_svc+0x30/0xe0   el0_svc+0x30/0xf0   el0t_64_sync_handler+0xc4/0x148   el0t_64_sync+0x1a4/0x1a8 Soft lockup is not triggered with THP or base page because there is cond_resched() called for each PMD size. Although the soft lockup was triggered by MTE, it should be not MTE specific. The other processing which takes long time in the loop may trigger soft lockup too. So add cond_resched() for hugetlb to avoid soft lockup. Link: https://lkml.kernel.org/r/20250929202402.1663290-1-yang@os.amperecomputing.com Fixes: 8f860591ffb2 ("[PATCH] Enable mprotect on huge pages") Signed-off-by: Yang Shi Tested-by: Carl Worth Reviewed-by: Christoph Lameter (Ampere) Reviewed-by: Catalin Marinas Acked-by: David Hildenbrand Acked-by: Oscar Salvador Reviewed-by: Anshuman Khandual Reviewed-by: Dev Jain Cc: Muchun Song Cc: Will Deacon Cc: Signed-off-by: Andrew Morton --- mm/hugetlb.c | 2 ++ 1 file changed, 2 insertions(+) --- a/mm/hugetlb.c~mm-hugetlb-avoid-soft-lockup-when-mprotect-to-large-memory-area +++ a/mm/hugetlb.c @@ -7222,6 +7222,8 @@ long hugetlb_change_protection(struct vm psize); } spin_unlock(ptl); + + cond_resched(); } /* * Must flush TLB before releasing i_mmap_rwsem: x86's huge_pmd_unshare _ Patches currently in -mm which might be from yang@os.amperecomputing.com are From - Sat Oct 11 10:07:01 2025 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 >From 01000199cb01dd34-33bd3dc1-4c60-4dcb-8134-30a120b08555-000000@send.serverless.com Thu Oct 09 22:05:22 2025 Return-path: <01000199cb01dd34-33bd3dc1-4c60-4dcb-8134-30a120b08555-000000@send.serverless.com> Envelope-to: pfeifferj@archlinux.ch Delivery-date: Thu, 09 Oct 2025 22:05:22 +0000 Received: from a9-34.smtp-out.amazonses.com ([54.240.9.34]) by witcher.mxrouting.net with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from <01000199cb01dd34-33bd3dc1-4c60-4dcb-8134-30a120b08555-000000@send.serverless.com>) id 1v6ylF-00000005MLg-2DOq for pfeifferj@archlinux.ch; Thu, 09 Oct 2025 22:05:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=resend; d=serverless.com; t=1760047521; h=List-Unsubscribe:List-Unsubscribe-Post:From:To:Reply-To:Subject:Message-ID:Date:MIME-Version:Content-Type; bh=j0uDx2nalJ+mykiIvBxClVSiIzUqSx1S0O2k9dJKwY8=; b=RgIDVsjCi2pDo1+b98guNIWaOVnmmqA11W3fKrPfm/ouP6dN4mgXzkWcrCFAoUNR 2pPcJjPxoi4yUm5PoG2rYY/Y9tqzNe1fpUum4StCmI2xdhzSGdSNBrNubP3TV1S4ufc zmhq5xn0gqSnZB7RwsaVZ0Gk9iMOt5bJd1gO+duw= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=rela