{"id":2175082,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2175082/?format=json","project":{"id":60,"url":"http://patchwork.ozlabs.org/api/1.0/projects/60/?format=json","name":"User-mode Linux Development","link_name":"linux-um","list_id":"linux-um.lists.infradead.org","list_email":"linux-um@lists.infradead.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<1c14fe4de18e7bc71b98eb58dbd4edb13d3391cd.1765963770.git.zhengqi.arch@bytedance.com>","date":"2025-12-17T09:45:45","name":"[v3,4/7] mips: mm: enable MMU_GATHER_RCU_TABLE_FREE","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":false,"hash":"4d61e3a64c3344a367c8b9d04150b9005bfb821c","submitter":{"id":86678,"url":"http://patchwork.ozlabs.org/api/1.0/people/86678/?format=json","name":"Qi Zheng","email":"qi.zheng@linux.dev"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-um/patch/1c14fe4de18e7bc71b98eb58dbd4edb13d3391cd.1765963770.git.zhengqi.arch@bytedance.com/mbox/","series":[{"id":485652,"url":"http://patchwork.ozlabs.org/api/1.0/series/485652/?format=json","date":"2025-12-17T09:45:42","name":"enable PT_RECLAIM on all 64-bit architectures","version":3,"mbox":"http://patchwork.ozlabs.org/series/485652/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2175082/checks/","tags":{},"headers":{"Return-Path":"\n <linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=OPWYLd1F;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256\n header.s=key1 header.b=XNsRb5JY;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dWTVH3FkKz1y0P\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 17 Dec 2025 20:47:19 +1100 (AEDT)","from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vVo7p-00000006Stz-2w9E;\n\tWed, 17 Dec 2025 09:47:17 +0000","from out-188.mta1.migadu.com ([95.215.58.188])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vVo7n-00000006Ss2-2J3k\n\tfor linux-um@lists.infradead.org;\n\tWed, 17 Dec 2025 09:47:16 +0000"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help\n\t:List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding:\n\tMIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:\n\tReply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=fkW1q5oTlkchrLBj7uhW1/fyT/NJTp0qrNRVsGoiJYg=; b=OPWYLd1Fed+3BhN1sj6dLEhPAX\n\tU5yf9aA3Lr7Njg96IVHhKTAcjsmGcbwQjYEylocyuW+Db1wr7qTxeWg8AXWZQV4SQGUGzpUsurxtz\n\tx9Ix/0QgLvQF8JUomdTYaVnvW9QWXlucJYzmmSW5pT3nJNJRKqKMgIcH7qWNsDz39vzR0yKAmzt2H\n\tlqknDHmgW0xgBz3saYZkmCXKfeeus6VpGMMfSf/u2MB2VbPABA/K+v8YxHhtQTw7ZBBnmaZiAZ3da\n\tUSQ3g48TTsBr84LacOXem7NlkQiE/fW7QTysF8drd/ApYqHXDl9cCPgOjkTMWJp5765DVZxDYsNlW\n\too2w6ABQ==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1;\n\tt=1765964833;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=fkW1q5oTlkchrLBj7uhW1/fyT/NJTp0qrNRVsGoiJYg=;\n\tb=XNsRb5JY0NarSUDlxllpefgnMRlLZpW8qzQc9ZHNREId6Fq61bYkF9z2/CqnDHghDcClS6\n\tJSWQbuaoMZEDzyNrP0E+UpEKY+0lMWWkYwX8tos3g2d3TeSlYHmAkMIa+8GNC7vJ+Ulmkt\n\t1rnXZCKBiJgsfxRzh6s1Opl85Us62zE="],"X-Report-Abuse":"Please report any abuse attempt to abuse@migadu.com and\n include these headers.","From":"Qi Zheng <qi.zheng@linux.dev>","To":"will@kernel.org,\n\taneesh.kumar@kernel.org,\n\tnpiggin@gmail.com,\n\tpeterz@infradead.org,\n\tdev.jain@arm.com,\n\takpm@linux-foundation.org,\n\tdavid@kernel.org,\n\tioworker0@gmail.com,\n\tlinmag7@gmail.com","Cc":"linux-arch@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tlinux-mm@kvack.org,\n\tlinux-alpha@vger.kernel.org,\n\tloongarch@lists.linux.dev,\n\tlinux-mips@vger.kernel.org,\n\tlinux-parisc@vger.kernel.org,\n\tlinux-um@lists.infradead.org,\n\tQi Zheng <zhengqi.arch@bytedance.com>,\n\tThomas Bogendoerfer <tsbogend@alpha.franken.de>","Subject":"[PATCH v3 4/7] mips: mm: enable MMU_GATHER_RCU_TABLE_FREE","Date":"Wed, 17 Dec 2025 17:45:45 +0800","Message-ID":"\n <1c14fe4de18e7bc71b98eb58dbd4edb13d3391cd.1765963770.git.zhengqi.arch@bytedance.com>","In-Reply-To":"<cover.1765963770.git.zhengqi.arch@bytedance.com>","References":"<cover.1765963770.git.zhengqi.arch@bytedance.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Migadu-Flow":"FLOW_OUT","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20251217_014715_734790_5B7A637C ","X-CRM114-Status":"UNSURE (   8.21  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-2.8 (--)","X-Spam-Report":"Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  From: Qi Zheng <zhengqi.arch@bytedance.com> On a 64-bit\n system,\n    madvise(MADV_DONTNEED) may cause a large number of empty PTE page table\n pages\n    (such as 100GB+). To resolve this problem,\n first enable MMU_GATHER_RCU_TABLE_FREE\n    to prepare for enabl [...]\n Content analysis details:   (-2.8 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                             [95.215.58.188 listed in\n bl.score.senderscore.com]\n -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/, low\n                             trust\n                             [95.215.58.188 listed in list.dnswl.org]\n -0.0 SPF_PASS               SPF: sender matches SPF record\n -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n  0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                             [95.215.58.188 listed in sa-accredit.habeas.com]\n  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The\n                             query to Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                          [95.215.58.188 listed in\n sa-trusted.bondedsender.org]","X-BeenThere":"linux-um@lists.infradead.org","X-Mailman-Version":"2.1.34","Precedence":"list","List-Id":"<linux-um.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-um/>","List-Post":"<mailto:linux-um@lists.infradead.org>","List-Help":"<mailto:linux-um-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=subscribe>","Sender":"\"linux-um\" <linux-um-bounces@lists.infradead.org>","Errors-To":"linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"},"content":"From: Qi Zheng <zhengqi.arch@bytedance.com>\n\nOn a 64-bit system, madvise(MADV_DONTNEED) may cause a large number of\nempty PTE page table pages (such as 100GB+). To resolve this problem,\nfirst enable MMU_GATHER_RCU_TABLE_FREE to prepare for enabling the\nPT_RECLAIM feature, which resolves this problem.\n\nSigned-off-by: Qi Zheng <zhengqi.arch@bytedance.com>\nCc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>\n---\n arch/mips/Kconfig               | 1 +\n arch/mips/include/asm/pgalloc.h | 7 +++----\n 2 files changed, 4 insertions(+), 4 deletions(-)","diff":"diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig\nindex b88b97139fa8e..c0c94e26ce396 100644\n--- a/arch/mips/Kconfig\n+++ b/arch/mips/Kconfig\n@@ -99,6 +99,7 @@ config MIPS\n \tselect IRQ_FORCED_THREADING\n \tselect ISA if EISA\n \tselect LOCK_MM_AND_FIND_VMA\n+\tselect MMU_GATHER_RCU_TABLE_FREE\n \tselect MODULES_USE_ELF_REL if MODULES\n \tselect MODULES_USE_ELF_RELA if MODULES && 64BIT\n \tselect PERF_USE_VMALLOC\ndiff --git a/arch/mips/include/asm/pgalloc.h b/arch/mips/include/asm/pgalloc.h\nindex 7a04381efa0b5..895bf79e76762 100644\n--- a/arch/mips/include/asm/pgalloc.h\n+++ b/arch/mips/include/asm/pgalloc.h\n@@ -48,8 +48,7 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)\n extern void pgd_init(void *addr);\n extern pgd_t *pgd_alloc(struct mm_struct *mm);\n \n-#define __pte_free_tlb(tlb, pte, address)\t\\\n-\ttlb_remove_ptdesc((tlb), page_ptdesc(pte))\n+#define __pte_free_tlb(tlb, pte, address)\ttlb_remove_ptdesc((tlb), page_ptdesc(pte))\n \n #ifndef __PAGETABLE_PMD_FOLDED\n \n@@ -72,7 +71,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)\n \treturn pmd;\n }\n \n-#define __pmd_free_tlb(tlb, x, addr)\tpmd_free((tlb)->mm, x)\n+#define __pmd_free_tlb(tlb, x, addr)\ttlb_remove_ptdesc((tlb), virt_to_ptdesc(x))\n \n #endif\n \n@@ -97,7 +96,7 @@ static inline void p4d_populate(struct mm_struct *mm, p4d_t *p4d, pud_t *pud)\n \tset_p4d(p4d, __p4d((unsigned long)pud));\n }\n \n-#define __pud_free_tlb(tlb, x, addr)\tpud_free((tlb)->mm, x)\n+#define __pud_free_tlb(tlb, x, addr)\ttlb_remove_ptdesc((tlb), virt_to_ptdesc(x))\n \n #endif /* __PAGETABLE_PUD_FOLDED */\n \n","prefixes":["v3","4/7"]}