Message ID | 20240730072719.3715016-2-alexs@kernel.org (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 59685C3DA61 for <linux-mm@archiver.kernel.org>; Tue, 30 Jul 2024 07:22:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C4C666B008C; Tue, 30 Jul 2024 03:22:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BFCE56B0092; Tue, 30 Jul 2024 03:22:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A9C1C6B0093; Tue, 30 Jul 2024 03:22:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 8A29B6B008C for <linux-mm@kvack.org>; Tue, 30 Jul 2024 03:22:43 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 2BF711A014B for <linux-mm@kvack.org>; Tue, 30 Jul 2024 07:22:43 +0000 (UTC) X-FDA: 82395576606.14.B98EAA9 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf19.hostedemail.com (Postfix) with ESMTP id 8A04B1A002B for <linux-mm@kvack.org>; Tue, 30 Jul 2024 07:22:40 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=I93puTgZ; spf=pass (imf19.hostedemail.com: domain of alexs@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=alexs@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722324133; a=rsa-sha256; cv=none; b=hyqXUo2CxBHfYosRQc40gOSoXxoyb83fyXUNo9x05TqKnJlSugLdeOb1FRphZYO1yJTHan OV6XjMJOzIrir0KzuuJHiFeCWNiQZYjR5T1sgl1wfIv4anBCdzrmeml41Wp9m+Na6My+s9 L4zj4Q3Q8Eow6q6JlU/Asa+qd9QEGVM= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=I93puTgZ; spf=pass (imf19.hostedemail.com: domain of alexs@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=alexs@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722324133; 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=ubZOwkQjx3saxHEiiB6szGuJ/Az06+8zIbcrjBVi6og=; b=yAKMbBIE2AqSJvq8QL459fVgnwPI8olYfulnbAY4hAegec4MPdstHfSnhBTyhHNWEUnbwb 4kKRlGg+MaQeODKr7fdowUaNsvJMyfVnRFbV4RlulM65yapkARw2vDj4UXlr6btuf9mACu cnWInEi9/n87rwqYKmpLQvG5yFYPDo0= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id C3B0761DDA; Tue, 30 Jul 2024 07:22:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 684EBC4AF17; Tue, 30 Jul 2024 07:22:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722324159; bh=F4rT1yReaNgoNPAOrss44yWnUe6Elb31IIk03kOZru4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I93puTgZYyNM8LhENhjVfRqUnOmgCNGDgnG5jenN7sEcro1xD8o4LG0tV9ptaSFwY PJLaerU/r2mHKee1c2YvQSyvlJg4Wwwvxp1DBp3niYcmBM0VqGPFTQP0rUYMj+49cB SBIYzw7Mq5blsyH6UBISlMfioxXEJu7mMlQJHH4yDgrhD4CTQ9hIsmJZsmVNBl3JKi WBQjq0R3FTO/cpgH/VFebdmXxc1+QxwdDz9Jy5MJW1j7QPpkEyrb970dyzBwR9zmXp QzRAanhlQYpwwtfa6YKWEQwsDF/tgyU1IBDAE2+6tQC7zeslhLzdguUkGZ689CjSZ6 ORaa3vXAkOiLQ== From: alexs@kernel.org To: Will Deacon <will@kernel.org>, "Aneesh Kumar K . V" <aneesh.kumar@kernel.org>, Nick Piggin <npiggin@gmail.com>, Peter Zijlstra <peterz@infradead.org>, Russell King <linux@armlinux.org.uk>, Catalin Marinas <catalin.marinas@arm.com>, Brian Cain <bcain@quicinc.com>, WANG Xuerui <kernel@xen0n.name>, Geert Uytterhoeven <geert@linux-m68k.org>, Jonas Bonn <jonas@southpole.se>, Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>, Stafford Horne <shorne@gmail.com>, Michael Ellerman <mpe@ellerman.id.au>, Naveen N Rao <naveen@kernel.org>, Paul Walmsley <paul.walmsley@sifive.com>, Albert Ou <aou@eecs.berkeley.edu>, Thomas Gleixner <tglx@linutronix.de>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>, Andy Lutomirski <luto@kernel.org>, Bibo Mao <maobibo@loongson.cn>, Baolin Wang <baolin.wang@linux.alibaba.com>, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-openrisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Heiko Carstens <hca@linux.ibm.com>, Vasily Gorbik <gor@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Sven Schnelle <svens@linux.ibm.com>, Qi Zheng <zhengqi.arch@bytedance.com>, Vishal Moola <vishal.moola@gmail.com>, "Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>, Kemeng Shi <shikemeng@huaweicloud.com>, Lance Yang <ioworker0@gmail.com>, Peter Xu <peterx@redhat.com>, Barry Song <baohua@kernel.org>, linux-s390@vger.kernel.org Cc: Guo Ren <guoren@kernel.org>, Christophe Leroy <christophe.leroy@csgroup.eu>, Palmer Dabbelt <palmer@dabbelt.com>, Mike Rapoport <rppt@kernel.org>, Oscar Salvador <osalvador@suse.de>, Alexandre Ghiti <alexghiti@rivosinc.com>, Jisheng Zhang <jszhang@kernel.org>, Samuel Holland <samuel.holland@sifive.com>, Anup Patel <anup@brainfault.org>, Josh Poimboeuf <jpoimboe@kernel.org>, Breno Leitao <leitao@debian.org>, Alexander Gordeev <agordeev@linux.ibm.com>, Gerald Schaefer <gerald.schaefer@linux.ibm.com>, Hugh Dickins <hughd@google.com>, David Hildenbrand <david@redhat.com>, Ryan Roberts <ryan.roberts@arm.com>, Matthew Wilcox <willy@infradead.org>, Alex Shi <alexs@kernel.org>, "Naveen N . Rao" <naveen.n.rao@linux.ibm.com>, Andrew Morton <akpm@linux-foundation.org> Subject: [RFC PATCH 12/18] mm/thp: pass ptdesc to set_huge_zero_folio function Date: Tue, 30 Jul 2024 15:27:13 +0800 Message-ID: <20240730072719.3715016-2-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240730072719.3715016-1-alexs@kernel.org> References: <20240730064712.3714387-1-alexs@kernel.org> <20240730072719.3715016-1-alexs@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: ccspf8p94pn45u6c4yonhiryth9paiaq X-Rspamd-Queue-Id: 8A04B1A002B X-Rspam-User: X-Rspamd-Server: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bUMKVr+MNcENqYCsC98LzvFsORxys/iXXZp7NnToIvILYv/rCtK27p+79i+/pRPwP8AAxO0GdOmEirtcie72qOvVjD8BmH1npBy2/RBgvS6xJf1Dhj6HP2JRTzq8npEhGJjK5nB5O7JpfRHa9+I+KZve5fvxFwgXwfs6eleg4DhXxemGsWA96OH719QtJA2Q8cShaAPB9wMVjdW1xIvxjn3yNvUM5wB91dzGwzCIhAYTwPaw3qtSRRH/amYFrAJB9KFLKtnNAunX7kMUJ4p3l0cpdJjtn/P17Bp8K3uNL7nCppbH4B41dFGgbwGe0mYOxrP2S4XGqBrE9O/TNcP3/Az8oRIabwegg/dropM6ed5Q+kfiNIvG+eoH1XPtbjxlQ6B2NMW+IovacBqbItM4uIP+BQ== 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> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
use struct ptdesc to replace pgtable_t
|
expand
|
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index dc323453fa02..1c121ec85447 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1055,7 +1055,7 @@ gfp_t vma_thp_gfp_mask(struct vm_area_struct *vma) } /* Caller must hold page table lock. */ -static void set_huge_zero_folio(pgtable_t pgtable, struct mm_struct *mm, +static void set_huge_zero_folio(struct ptdesc *ptdesc, struct mm_struct *mm, struct vm_area_struct *vma, unsigned long haddr, pmd_t *pmd, struct folio *zero_folio) { @@ -1064,7 +1064,7 @@ static void set_huge_zero_folio(pgtable_t pgtable, struct mm_struct *mm, return; entry = mk_pmd(&zero_folio->page, vma->vm_page_prot); entry = pmd_mkhuge(entry); - pgtable_trans_huge_deposit(mm, pmd, pgtable); + pgtable_trans_huge_deposit(mm, pmd, ptdesc_page(ptdesc)); set_pmd_at(mm, haddr, pmd, entry); mm_inc_nr_ptes(mm); } @@ -1113,7 +1113,7 @@ vm_fault_t do_huge_pmd_anonymous_page(struct vm_fault *vmf) ret = handle_userfault(vmf, VM_UFFD_MISSING); VM_BUG_ON(ret & VM_FAULT_FALLBACK); } else { - set_huge_zero_folio(ptdesc_page(ptdesc), vma->vm_mm, vma, + set_huge_zero_folio(ptdesc, vma->vm_mm, vma, haddr, vmf->pmd, zero_folio); update_mmu_cache_pmd(vma, vmf->address, vmf->pmd); spin_unlock(vmf->ptl);