From patchwork Sat Aug 17 09:51:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13767122 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 93C18C52D7D for ; Sat, 17 Aug 2024 09:55:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D59DB8D00D1; Sat, 17 Aug 2024 05:55:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D0A5F8D00CF; Sat, 17 Aug 2024 05:55:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B5C4F8D00D1; Sat, 17 Aug 2024 05:55:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 984048D00CF for ; Sat, 17 Aug 2024 05:55:39 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4A863160585 for ; Sat, 17 Aug 2024 09:55:39 +0000 (UTC) X-FDA: 82461280398.10.7633B73 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf04.hostedemail.com (Postfix) with ESMTP id E306F40003 for ; Sat, 17 Aug 2024 09:55:36 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=none; spf=pass (imf04.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723888437; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yqMYThzwFYwMorLsY+ky31EpeoOH95q0aHPXdErN6nc=; b=Z4RysW0dMq/shjJorWXuaPsXiOI48kr+EcBtBohZpHqeAvTp4VlJUBvR/YatRv1jiRjccm CczcpHW3gpxPxejVFF0adj8ieeLqTZgBiISlNMTm6bBmXodBkN5GSdMCqMt5cpP1Ls8P7f 51LkeoiY1ogtQ/Qwoa173/mwLEm9Y9E= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=none; spf=pass (imf04.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723888437; a=rsa-sha256; cv=none; b=ROwjX5w+yra0GxHrY5kw8S59wQKSRi84FKUVT7V/EHe+X+ZSKHd/1h1RFJ3myMUzwS3fUW EUWw1ajQPwvmSPJPdFuh+sKWRLMMbTUjI9Q4e7olAHSLlaOqaEjQ220QR/8Q0h8SWvu0+k PEgw6KDwYl0cS8et9fxihIgyeLnmy8w= Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4WmDht1MnFzpStk; Sat, 17 Aug 2024 17:54:06 +0800 (CST) Received: from dggpemf100008.china.huawei.com (unknown [7.185.36.138]) by mail.maildlp.com (Postfix) with ESMTPS id 70A651400D1; Sat, 17 Aug 2024 17:55:31 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemf100008.china.huawei.com (7.185.36.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Sat, 17 Aug 2024 17:55:30 +0800 From: Kefeng Wang To: Andrew Morton CC: Matthew Wilcox , Alexander Viro , David Hildenbrand , Sidhartha Kumar , , Kefeng Wang Subject: [PATCH 5/5] mm: remove PageTransHuge() Date: Sat, 17 Aug 2024 17:51:22 +0800 Message-ID: <20240817095122.2460977-6-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20240817095122.2460977-1-wangkefeng.wang@huawei.com> References: <20240817095122.2460977-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemf100008.china.huawei.com (7.185.36.138) X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: E306F40003 X-Stat-Signature: 4zpx5n5rdjc4mjcsyurkx3kutczjt9di X-Rspam-User: X-HE-Tag: 1723888536-698988 X-HE-Meta: U2FsdGVkX1+GEncdFn2dc2rqhFi2hYIQc7xsm/4iDGfvpF9xyUzOj8NNHnb5v/NlSx/uTRRlvwemKds44ghsh7TvxArCdU+ESqdewToAhke8MUiuhy3GM6mp+Go8eYRJnEWMnSvrNGkJn6f2QBCBO6RI67W/YwObplJL1ChFTrNSEjNearLecEzI0SFPfCllZmfpqYNCBZO1+ozSXQwEs8rtS3tnXQrZWZ/VxLEp9ASDtJFyrTFBq6NfcGaJy3+Jilh6ePoE44welmiMC/ygyamQyN04h9XGiWsr+nz7E9ceBoMYx9jZoaYEsZ4ItyBn7D3j9kR/9dS4zQK9ZSjSCbQX+MoLbwcn6sK5glgL/sHVX2huuowptTBh6i/Zsdy/LSN2pnEwI2wtsuc9ISGiRg8/b8ZhshRQDDUkzn/Cr1o+m+KVENiwkTVvNfqNE+JdGAb2X6FxnICyjXLYz5JYNnYwWw4htyu01NdOqXOAF9gf4HOWozK+vDBPYJ5SM8DqnVBStSsdRZoGtk+RIkD6DBmuNorvy30DliWEL3AAoz03lu49+kT/1oxvkCZBrj47gZplqEEl4grs0pyrJFB57pudBlbGfIhhEFqHcQ564NQ5pnulfywFPUxBPqRRa4GZJRRGqPTOdwP+zHu0p9MjJU803mKUWly63Z7/6WarCGV6DZiZ9/CdoG/Agy3hwBxkFuyEKgRimXMaEO5c3qDw7G9iq9cUqrHUCdeVFWpDU5kiTOKoStGlyjKkOuG2JIIfEd1DcvYQ71Yl70Rfku657QPFGe2/jpCcUnhBhENj0K+01zJ/pMnuDPY44CM5O0bGR8++5wKxaA73egbJMpwm165EG5qwQJ/0E89ctBXwyW/9GL0UxyxHTl7smybmDI6MFbeRO0A1/5ckrzHfyofwSxBXGO7+FRNZCB1ZIob8c1LdTvMkzZQz4xRo+OFC9bp00by4VMwNcGniFmGk/ZJ W3Ym7+MH 4ASGNHzwo4LjFI35PczK/9s+8acb/52CFJhwW6b6MEDnYiKUlAUNYCd+UEaCG2Mvyv7VNOG5k4qArEOVfrP/XWB84qx/WEKW4KDrwlpl7vDKesIPwY1EJLqEJ2XfnfYRJzXK4r6YNqdOnTXSr9/FSOhmwnQ== 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: There are no users of PageTransHuge(), remove it. Signed-off-by: Kefeng Wang --- include/linux/page-flags.h | 13 ------------- include/linux/pgtable.h | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index b753d158762f..71e972ba489e 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -871,19 +871,6 @@ FOLIO_FLAG_FALSE(partially_mapped) #define PG_head_mask ((1UL << PG_head)) #ifdef CONFIG_TRANSPARENT_HUGEPAGE -/* - * PageHuge() only returns true for hugetlbfs pages, but not for - * normal or transparent huge pages. - * - * PageTransHuge() returns true for both transparent huge and - * hugetlbfs pages, but not normal pages. PageTransHuge() can only be - * called only in the core VM paths where hugetlbfs pages can't exist. - */ -static inline int PageTransHuge(const struct page *page) -{ - VM_BUG_ON_PAGE(PageTail(page), page); - return PageHead(page); -} /* * PageTransCompound returns true for both transparent huge pages diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index 780f3b439d98..36fc336782e8 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -398,7 +398,7 @@ extern int pmdp_clear_flush_young(struct vm_area_struct *vma, #else /* * Despite relevant to THP only, this API is called from generic rmap code - * under PageTransHuge(), hence needs a dummy implementation for !THP + * under THP, hence needs a dummy implementation for !THP */ static inline int pmdp_clear_flush_young(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp)