From patchwork Tue Mar 26 20:28:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13605074 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9312ECD1283 for ; Tue, 26 Mar 2024 20:28:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CAF3B6B0096; Tue, 26 Mar 2024 16:28:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A4A166B009F; Tue, 26 Mar 2024 16:28:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 84F126B009D; Tue, 26 Mar 2024 16:28:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 67D286B009B for ; Tue, 26 Mar 2024 16:28:41 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 43508C032F for ; Tue, 26 Mar 2024 20:28:41 +0000 (UTC) X-FDA: 81940328442.12.CE665DB Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf23.hostedemail.com (Postfix) with ESMTP id A3289140012 for ; Tue, 26 Mar 2024 20:28:39 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=VE5dn9fo; dmarc=none; spf=none (imf23.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711484919; a=rsa-sha256; cv=none; b=UbiqWU4/bghFTjfqJPBtymdW6Ygdbib7FaCutEq32zNTT3ALUWhAiEiU+afPHVyVdCWEMK yJzR8AF3CC8sLKzXXN0WlKusVfjLoHmoW5DYj8p5kAOQk9zSmJtj7cyYdepcXSZEk7QK95 GthehU/W+9cHLDrW+gE9cnM0BNmba6Q= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=VE5dn9fo; dmarc=none; spf=none (imf23.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1711484919; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=M3F/xDzH/g+Ev/ro5eMn/tEXDoRXLGDPOJTAfCblJyY=; b=f6nvU7h/gGhAaLH+3QF/+bd3RQW/8nZIbi0LK644CPgPeBJeJcZPbB6EQA+3CN6YDjNqMK dcXODXZ6yz0XbjSjDVpRDvxiU7asie2HGqTZb87IxCILe/ADckr2CsglUP5wIgn6TDC20c gb+CbvOc/+U/681BGjUGXlmAJ0hKe5o= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=M3F/xDzH/g+Ev/ro5eMn/tEXDoRXLGDPOJTAfCblJyY=; b=VE5dn9fos0QpPqCmTp1yoHpjGA 7Ci25tpL4uHtvTdEnhW6XmbGMd/EIbycJP7rJql/xWUugyq1i+AzqlR3YXK1C17C1o/Yen/CcZjEr BzPU3VkPwbLfOHVuhbez4BMMzBCMF5bHUYLwZWRBs3cdunpgtCEz2PQqdHdawiDD2kGkUuMAsr2ln msdHKxyMRxsAZNtITDdigTy6e29Y3b2LbV1vNTKxKpRfBh767JjZJ/Sgkm/2JlM9pu/UrPv4ZSE+h PVkTyH9d+PS7xmAXKaXsXjOK5XCUBpRi4yKN3KBN06LDbK9qevj7ln9VhCob9/Dkn9RdjDhdkmM8u pMtcDb+A==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpDPR-00000002CGx-11N3; Tue, 26 Mar 2024 20:28:37 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 8/8] mm: Rename mm_put_huge_zero_page to mm_put_huge_zero_folio Date: Tue, 26 Mar 2024 20:28:28 +0000 Message-ID: <20240326202833.523759-9-willy@infradead.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240326202833.523759-1-willy@infradead.org> References: <20240326202833.523759-1-willy@infradead.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: A3289140012 X-Stat-Signature: 85or6sggpek75ra4b11qr1qixbzy83cg X-HE-Tag: 1711484919-694818 X-HE-Meta: U2FsdGVkX1+4w+HW6w7wOLWEuQlw/mapxHJ7a/yv3mCLVGKqKFlKs2gDHPDpsHPjiNRu9FzjsH85IccS0sZ9uRG3585f18KOLaeqHu6/7s2By0iqnbq95soy/VLrrfzP2sRcW90mfe+kD2HTW7pEd8F72ytR4j4f1utr515q4XUi9oKKq0kj1++nl3Pwb7nYIN3vLRU/T1cOQpwuYOCVHGZRpNmsx7D0vjttJzahla5l60CG5vtrQK0IJ5aNJ3cUu7Mpg9UUmVaSY5uDCIO7YhhIl+FnAvn4gyev6/OSw30j/Kq4qXfKrc9mfaiUhE+hLvsykZ29sxi2Y7bCM6uvNiwYs834hf2D7bTtrx9Cf8Par/2CXDkW3fpI2pRd3kbw88QitbIpv68oWMHjLvW2tyd0MpoDnr0KzCNxPCehWnczvYoIxY/WZdHIvKWm+AVD361yZYgjMEB3Z1TpYv0qk2LR3D3IusCfMACeZS172xqk96DwLNdBObUNbBmCKylpSCU4q2xRdk2/+BRTr6guN5W/DAlYGk6FLWBdTPyjXjm53j/BEZuC2NurHxpE3sevarGfp3fuPY5KMeWasD+UhtwoiQH7ku0Pim0h9aikmAhzYrpvau4TSDaomkCBlH5aDP/zrA8vIZRgnhMDD0NqXuYWqs4jYunR3AfnMt2k2iV0BLcUS8k8hpEl8HbkSG2pYFgCAzeCMB6YY5oXF92G2a4FP4Iv26staQzVFrTYBpBxZAcrARklLtlgZwuNhw7ERvINnVA0te76aF4aA5EmxuMs0c+lQfrPivEfp6m5X3gIU4IgboMm+eCsyJYCpbHQ6y0mReWJK2DMV13f9k9fblYdEC2kU82TPMjUwrdtdx9ucst52jE7qoPqQ7KttUalR5+9OnlWLWL16fTYD/UMO9S/0xxUKXZ+VWDvb5LBmADB459AjkuRyNd7xf8hDLkRm+4gwQI/C6cqYiGEsIu bD2EdcGf ps4b5SARVWqLrc9H6eXktWWCnIBFXscL4U8aIufo/KMNCkbOVr3a5jgMXxzr3FkV5L6n0ayz+duZH0STgpFv1noO7EgckfT/jdPlnIQXtdyehkxJQ2GJOThU/mJ1l+j0vBFfU64v2Ip+EcsIRcr9vQJ/kQvsbY0uy7UfNhmnLB0XSrCxSQNbe/hwP18gCjY8bqdpY7Wc2gN7R4KeLKRzzL9k1yUJAhQ28BLMP X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Also remove mm_get_huge_zero_page() now it has no users. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/huge_mm.h | 9 ++------- kernel/fork.c | 2 +- mm/huge_memory.c | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index 7ba59ba36354..9d11e886aa9a 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h @@ -367,12 +367,7 @@ static inline bool is_huge_zero_pud(pud_t pud) } struct folio *mm_get_huge_zero_folio(struct mm_struct *mm); -void mm_put_huge_zero_page(struct mm_struct *mm); - -static inline struct page *mm_get_huge_zero_page(struct mm_struct *mm) -{ - return &mm_get_huge_zero_folio(mm)->page; -} +void mm_put_huge_zero_folio(struct mm_struct *mm); #define mk_huge_pmd(page, prot) pmd_mkhuge(mk_pmd(page, prot)) @@ -500,7 +495,7 @@ static inline bool is_huge_zero_pud(pud_t pud) return false; } -static inline void mm_put_huge_zero_page(struct mm_struct *mm) +static inline void mm_put_huge_zero_folio(struct mm_struct *mm) { return; } diff --git a/kernel/fork.c b/kernel/fork.c index 39a5046c2f0b..84de5faa8c9a 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1343,7 +1343,7 @@ static inline void __mmput(struct mm_struct *mm) ksm_exit(mm); khugepaged_exit(mm); /* must run before exit_mmap */ exit_mmap(mm); - mm_put_huge_zero_page(mm); + mm_put_huge_zero_folio(mm); set_mm_exe_file(mm, NULL); if (!list_empty(&mm->mmlist)) { spin_lock(&mmlist_lock); diff --git a/mm/huge_memory.c b/mm/huge_memory.c index ff282317e71f..b49fcb8a16cc 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -241,7 +241,7 @@ struct folio *mm_get_huge_zero_folio(struct mm_struct *mm) return READ_ONCE(huge_zero_folio); } -void mm_put_huge_zero_page(struct mm_struct *mm) +void mm_put_huge_zero_folio(struct mm_struct *mm) { if (test_bit(MMF_HUGE_ZERO_PAGE, &mm->flags)) put_huge_zero_page();