Message ID | 20230417205048.15870-11-vishal.moola@gmail.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 529BCC77B72 for <linux-mm@archiver.kernel.org>; Mon, 17 Apr 2023 20:53:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8E360900009; Mon, 17 Apr 2023 16:53:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8929F900004; Mon, 17 Apr 2023 16:53:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E57D900009; Mon, 17 Apr 2023 16:53:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 5F725900004 for <linux-mm@kvack.org>; Mon, 17 Apr 2023 16:53:02 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2FFB7406A3 for <linux-mm@kvack.org>; Mon, 17 Apr 2023 20:53:02 +0000 (UTC) X-FDA: 80692082604.05.533F156 Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by imf03.hostedemail.com (Postfix) with ESMTP id 57E282000C for <linux-mm@kvack.org>; Mon, 17 Apr 2023 20:53:00 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=sICUrUNh; spf=pass (imf03.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.46 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681764780; 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=X3zVXX/N6SOzga9RDJq+tPAqPrrx50X9RMNZ27hRgPo=; b=OmGAblXUlqBjfxmKH+tsVGyCLtkgThY5/FmCCKAnVUPJ8aPNpERxLSDJTyERh01+4/Xs5s ioBTck7i8GUT/OlzyqfYMc8hcAwhy5L1EO5/6VsRhjAWMrvZJxU9Pgp0tAaGPOSEyDGyot cxda3p1uo1PgnXGbRC/EaBJiMK9zWKo= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=sICUrUNh; spf=pass (imf03.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.46 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681764780; a=rsa-sha256; cv=none; b=y0PBdhalLna/ovM5bSb+69aDWP70R8wkEKZ0iJ5YGrO7SLmhkdPGCgNNQDtt9YLHIfwPvU papKiRBsqGafwY4zi4bsXMvUu08tN9CP5SL/Z96KZXaqzei9KoSklnHwScQhVmGY7TgfEw uq08fMcw1EaZopK820MlLFULABZ/5FE= Received: by mail-pj1-f46.google.com with SMTP id hg12so12713016pjb.2 for <linux-mm@kvack.org>; Mon, 17 Apr 2023 13:53:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681764779; x=1684356779; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=X3zVXX/N6SOzga9RDJq+tPAqPrrx50X9RMNZ27hRgPo=; b=sICUrUNhKpAOA4VRjrqbzI2X/H4tUjO6T2SdOnpuj4Iy+PajhE1DrUSbcJznfffRrX L+wg0APu+UnJsiMWo07D8eesoEiJoCPkIf7iFkO3frlAWKtnOneztwNYCGmhOQpiZeuy AXohiTFVSZ6j/QYK9dyhVhIaufaLIPexDAAJXmf6qW3dNeCDEUq++V0vxfiKc0g0e7Ab Ewxv8L1qYPD4uyzx9cQ6CGY815b+pAM3zpWc0XUF8sLnRhkHRA/O3qjcuWg0cKvRpE4M YyoU6OpnuIHEQ4e7n1BxpYaP+3T9kR2hf6Oim0PIubi0gprGsuCOvZCKtVwS9TGYF6kY TvEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681764779; x=1684356779; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X3zVXX/N6SOzga9RDJq+tPAqPrrx50X9RMNZ27hRgPo=; b=Tb6bpYbM/UUZwh25AE42jUTuNr8JnUobbaaSBmeTL1DNZ6BCxercVu3IZpyt1oHsIp b3YP58xoOjXRwmHmPesyg3osmXgGnTUx/uKnxaQRjJvTT+fV2Fx8kNb7T2xO7yclXUKX G8nxVHTPukKMioo1nuCZD2RmB2c5pdR163aXKEF+/AwFtBxM+C0+a2wGlVFmSFVB+kwj zB/Nw1j99PLITygKk5oRisOXlSPHVcEetHhF5M0Z5F0lVhy1EnC/p751YCSY/qB5BMk2 KdOz1mIwvWq8A8lBf1khbRlgZzQB0f0+HCB5+gvz1IKyDjFRHyCbqKzs5sPoqgGw/KIV 5/cg== X-Gm-Message-State: AAQBX9cgJqISPJraGfnl0uzgx5Z3QTqKGeey139+5N8/Dz62tsDMwUx8 zo635KUYil0SPkBlMLIfafE= X-Google-Smtp-Source: AKy350aL1Q/BuQU4b/coHWha7jodau934g5ZfPpWwX1i7O384OcXkkUs5sEaNrPzHDYpgrYCEKrWgg== X-Received: by 2002:a17:90a:cb8c:b0:233:f393:f6cd with SMTP id a12-20020a17090acb8c00b00233f393f6cdmr15121483pju.5.1681764779380; Mon, 17 Apr 2023 13:52:59 -0700 (PDT) Received: from fedora.hsd1.ca.comcast.net ([2601:644:937f:7f20::c139]) by smtp.googlemail.com with ESMTPSA id h7-20020a17090ac38700b0022335f1dae2sm7609707pjt.22.2023.04.17.13.52.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 13:52:59 -0700 (PDT) From: "Vishal Moola (Oracle)" <vishal.moola@gmail.com> To: Andrew Morton <akpm@linux-foundation.org>, Matthew Wilcox <willy@infradead.org> Cc: linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, xen-devel@lists.xenproject.org, kvm@vger.kernel.org, "Vishal Moola (Oracle)" <vishal.moola@gmail.com> Subject: [PATCH 10/33] mm: Convert pmd_ptlock_free() to use ptdescs Date: Mon, 17 Apr 2023 13:50:25 -0700 Message-Id: <20230417205048.15870-11-vishal.moola@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417205048.15870-1-vishal.moola@gmail.com> References: <20230417205048.15870-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: q7eszfsk3ahxob51hf3mw6sgdfjp1fp3 X-Rspamd-Queue-Id: 57E282000C X-HE-Tag: 1681764780-360476 X-HE-Meta: U2FsdGVkX18J7C7i6G6sUnLP8ObuicC90+ByCSXITZENPvrjfRx0TSy30vpR3LJlQDvIpLcpShDk5dyvKpPpKwABI6vjTqZnsT28kmgEDa+lfQcFQPTg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LzZWWkbFX+fxo7eJCLAYwLGyTUM22HzhY23aHGSrXPgaqVP4X9VHEiuPE81OHYvQFtjT5eg4ZAxgPQrDVurhE+KmmF/nc1LgoeCsBDsT3EXEVY9mvjLm29sdMeGKBnPahN7YkzHS2RSnalKSXyWDMOhQW8rmWFQdO7YPTSo2xB3kJSQxNMvfbOHRr9lYyckbiAdpKb2qCDTWr0EItE8rCTmw6YeJWcEWJO1hFFIKcP60qkqTw/yBYGlzUoD2CnhnZrf5ZHJE4bLUWV6WIUrtt3UFAknWJ1ETCMk2xS7XT8Xc+kEtl/3MgP/oubKHbvOYSPyeDTK0Ke5ipVjfZp0nKJdPlnArTF/NbDHzo4jI9B0oHecDeKCiJg7NSgsCmJLQDRfxzz3VLw== 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 |
Split ptdesc from struct page
|
expand
|
diff --git a/include/linux/mm.h b/include/linux/mm.h index d2485a110936..2390fc2542aa 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2911,12 +2911,12 @@ static inline bool pmd_ptlock_init(struct ptdesc *ptdesc) return ptlock_init(ptdesc); } -static inline void pmd_ptlock_free(struct page *page) +static inline void pmd_ptlock_free(struct ptdesc *ptdesc) { #ifdef CONFIG_TRANSPARENT_HUGEPAGE - VM_BUG_ON_PAGE(page->pmd_huge_pte, page); + VM_BUG_ON_PAGE(ptdesc->pmd_huge_pte, ptdesc_page(ptdesc)); #endif - ptlock_free(page); + ptlock_free(ptdesc_page(ptdesc)); } #define pmd_huge_pte(mm, pmd) (pmd_ptdesc(pmd)->pmd_huge_pte) @@ -2929,7 +2929,7 @@ static inline spinlock_t *pmd_lockptr(struct mm_struct *mm, pmd_t *pmd) } static inline bool pmd_ptlock_init(struct ptdesc *ptdesc) { return true; } -static inline void pmd_ptlock_free(struct page *page) {} +static inline void pmd_ptlock_free(struct ptdesc *ptdesc) {} #define pmd_huge_pte(mm, pmd) ((mm)->pmd_huge_pte) @@ -2953,7 +2953,7 @@ static inline bool pgtable_pmd_page_ctor(struct page *page) static inline void pgtable_pmd_page_dtor(struct page *page) { - pmd_ptlock_free(page); + pmd_ptlock_free(page_ptdesc(page)); __ClearPageTable(page); dec_lruvec_page_state(page, NR_PAGETABLE); }
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com> --- include/linux/mm.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)