Message ID | 20230906150309.114360-3-zi.yan@sent.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 4AF85EE14A3 for <linux-mm@archiver.kernel.org>; Wed, 6 Sep 2023 15:03:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5F84D28001D; Wed, 6 Sep 2023 11:03:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 580B2280017; Wed, 6 Sep 2023 11:03:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3FA4C28001D; Wed, 6 Sep 2023 11:03:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 2DAB1280017 for <linux-mm@kvack.org>; Wed, 6 Sep 2023 11:03:32 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id EE8B7A0C18 for <linux-mm@kvack.org>; Wed, 6 Sep 2023 15:03:31 +0000 (UTC) X-FDA: 81206491422.21.8A1113E Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by imf08.hostedemail.com (Postfix) with ESMTP id 322DA160065 for <linux-mm@kvack.org>; Wed, 6 Sep 2023 15:03:28 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=sent.com header.s=fm1 header.b=ylb72mJg; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=RyFkVW0v; dmarc=pass (policy=none) header.from=sent.com; spf=pass (imf08.hostedemail.com: domain of zi.yan@sent.com designates 64.147.123.19 as permitted sender) smtp.mailfrom=zi.yan@sent.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694012609; h=from:from:sender:reply-to: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=FRhlzq8UvIObngBkM6dyssvnlfJTeG6TGLo3e9CVZKk=; b=tErnjG/yIIb/DbX8j+JFaIo41W8UBHUbIDfuQzwhpBwii25JorR5KOjiQBxCnrw0y6yRER WkgngmQeJL1Mehm3T16NwZEddgglFP/snwz8txxXnlG2vApUsRn+mbdbiUogXOJqow3Og/ KNfoKS/rwjd261zXIZib6RV051lGe7M= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=sent.com header.s=fm1 header.b=ylb72mJg; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=RyFkVW0v; dmarc=pass (policy=none) header.from=sent.com; spf=pass (imf08.hostedemail.com: domain of zi.yan@sent.com designates 64.147.123.19 as permitted sender) smtp.mailfrom=zi.yan@sent.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694012609; a=rsa-sha256; cv=none; b=JFeWJWcdiPp7gSdVPkywdnH3y/VSwRxPjRxrGe4G+8bHNXzyfCtnkP6Y2wzqWwyvyjhGO9 5epSiLqgcWPrqOD0215p7fuQBF+TgtZkA1BZfd7SuIoz1Rup8cMZDvxZ6OqcoN0UdFyWZP nFiOaSFiy3nZNUKrwfXSlCLtDjaVZAU= Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id BE0B5320093F; Wed, 6 Sep 2023 11:03:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 06 Sep 2023 11:03:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sent.com; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:reply-to:sender:subject:subject:to:to; s=fm1; t= 1694012606; x=1694099006; bh=FRhlzq8UvIObngBkM6dyssvnlfJTeG6TGLo 3e9CVZKk=; b=ylb72mJgqmxN2pfmztXzBSYqUI0fCUryU9RZLnqhKRV6cdzQHPw WewNuJTadJnzAvfVVRxf5nAh2kQ+qRzYNJU3xPo/eWU0FHQRlpmtm8ojnyFRLaNG WAAE7vy0TSD4FClXqKHbrNYxYMUzHOS3nt39qBZiB3Qid8X8WaCpfF5YffMtZ4E0 lo5G79gkH6vB2HP52Yknle1/Zxz+TzayRAtcmBZ0BKaom8BxvQKURAx1sBOg4uiV JKOqVGNrlOm0oqAIjUJAaE/yULsfmxGRO6MzcRQz3qdCryUT6kvioH0ytebE8pU9 fpgKt1Czpg95KCYtQOcPxdYK1O325Bx10Nw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1694012606; x=1694099006; bh=FRhlzq8UvIObngBkM6dyssvnlfJTeG6TGLo 3e9CVZKk=; b=RyFkVW0vu58VoPxEjNCtMjVVEPg2uyGQhsVQI8c4UW2TuZZo30I EwigMAAynz1rFI8G1RAqCKG7OC9YZ1wSQpcVQArDwmmDwwpXuq3STKkmTk+63ahu MvDcewe93JMI10bkI7o4l93bEDVgSCzcpClVOo6B6Su9Z5DpPcaDRbedPbDjahDB gyA+QzhEGSNCPgAuf9j1bQhFetOMKdqadlqHqiEahWQ6NvMOzboJa4SGCixqvuRV 4p0uedH/D/LWU2laHLcu423rHmnFEcg15LhSbgv5lb3VGacOGcARjQ35xVchFTYL RsDzarygujS44z4Wynen1EJMc/3e5ZYKbmA== X-ME-Sender: <xms:vZT4ZLxoDmisrBQ_9XauWHwj-1N5nEJ9h-0r0xRkxtiNcoBrm3ZYww> <xme:vZT4ZDScgR27o5197JFp7egegCMTbhSlThalO4RzQdM07WSoRrYpU04kOBNGglOUk RajLiHtCC9hsZxJ5Q> X-ME-Received: <xmr:vZT4ZFWS1hHbGCPtICPdKU1lRaKu5DzWvf9-Q5erekg_A0bQ7Ol7_bPqJsuPMsJD7U-pylP7tt30Ha3kDyUZOU4IivGUbRq0GVVEdp2ZMSlltoqck7LZeYx-> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehfedgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne goufhorhhtvggutfgvtghiphdvucdlgedtmdenucfjughrpefhvfevufffkffojghfrhgg gfestdhqredtredttdenucfhrhhomhepkghiucgjrghnuceoiihirdihrghnsehsvghnth drtghomheqnecuggftrfgrthhtvghrnhepgeeghedugfduuddvleehheetgeeltdetieev uefhffevkefhveeufeeiieejgedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepiihirdihrghnsehsvghnthdrtghomh X-ME-Proxy: <xmx:vZT4ZFgYFEGOAI0RNgFLn_TatZhM53DWGqERX3OIB4fS4Fauu-J_4A> <xmx:vZT4ZNAx0cDpXYbPDSCzndUnnPMj-Y8gW7QyX6aSWKfVndJUmatjDA> <xmx:vZT4ZOKxediCBe8AuCv53w95AU1jqRl0mzPymUxapA9sXyBWPkMdFA> <xmx:vpT4ZCIBSIMA5F0E4Mqy_a86xhmP6l5vh2dCyCc-puicVU-Vz0vEKA> Feedback-ID: iccd040f4:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Sep 2023 11:03:24 -0400 (EDT) From: Zi Yan <zi.yan@sent.com> To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Cc: Zi Yan <ziy@nvidia.com>, Andrew Morton <akpm@linux-foundation.org>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, "Matthew Wilcox (Oracle)" <willy@infradead.org>, David Hildenbrand <david@redhat.com>, Mike Kravetz <mike.kravetz@oracle.com>, Muchun Song <muchun.song@linux.dev>, "Mike Rapoport (IBM)" <rppt@kernel.org>, stable@vger.kernel.org, Muchun Song <songmuchun@bytedance.com> Subject: [PATCH v2 2/5] mm/hugetlb: use nth_page() in place of direct struct page manipulation. Date: Wed, 6 Sep 2023 11:03:06 -0400 Message-Id: <20230906150309.114360-3-zi.yan@sent.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230906150309.114360-1-zi.yan@sent.com> References: <20230906150309.114360-1-zi.yan@sent.com> Reply-To: Zi Yan <ziy@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 322DA160065 X-Stat-Signature: emjpw3szri9n9rseuyedncmcmidepyk9 X-Rspam-User: X-HE-Tag: 1694012608-768488 X-HE-Meta: U2FsdGVkX1+HrZDzJCN4yrZS2/z94hmG37xYvN1nrzF/jnmnxSWVpF97N8VL7VCXQeOnXKa8tiaofZDShkdMpkyBN8oL4pzD08QJo5agCx0lPSzbXWYG+ldM0apzGYCPloTBBebj0ilgWl6MLgsmpRZi6jIjnaVqoGMLA0vwIh47Fsd+Uz5yOagcEOWPjG9HcGnpk0iBFTn5Fk0RwXivnaN1oCI2iYBbI9NBquTvraDpL+pea+3wXay4T2IJDyV1H6xZ2LQu+q1JBUqe5u77UsI9L+21eSNELHmHUm1Y/GjNG3b4nTXhc+wYkFKgaZAV810zb0uf1a/bBOMUo7CYSlKxmvgVb7kMXyRcZRPFIdd6QqAzEgHkxdbty9l6MAdFg+J88Us+NdtGilPQGQFOynhLQD1m8DhGvzM08shGJteMocifPpYzR5nTiSGIOtzCW6mgKp63NRbwy+mKPNk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f00LPEStEkMaPrNPr7HlE 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: <linux-mm.kvack.org> |
Series |
Use nth_page() in place of direct struct page manipulation
|
expand
|
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 2e7188876672..2521cc694fd4 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -6489,7 +6489,7 @@ struct page *hugetlb_follow_page_mask(struct vm_area_struct *vma, } } - page += ((address & ~huge_page_mask(h)) >> PAGE_SHIFT); + page = nth_page(page, ((address & ~huge_page_mask(h)) >> PAGE_SHIFT)); /* * Note that page may be a sub-page, and with vmemmap