Message ID | 20230627031431.29653-9-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 92475C001B1 for <linux-mm@archiver.kernel.org>; Tue, 27 Jun 2023 03:15:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B6F148D0003; Mon, 26 Jun 2023 23:15:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ACD7C8E0002; Mon, 26 Jun 2023 23:15:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 96E658D000A; Mon, 26 Jun 2023 23:15:27 -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 89EDF8D0003 for <linux-mm@kvack.org>; Mon, 26 Jun 2023 23:15:27 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 6705B1C82CB for <linux-mm@kvack.org>; Tue, 27 Jun 2023 03:15:27 +0000 (UTC) X-FDA: 80947062294.30.55764FB Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) by imf01.hostedemail.com (Postfix) with ESMTP id 9FD3A40012 for <linux-mm@kvack.org>; Tue, 27 Jun 2023 03:15:25 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=bw9pNUcu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf01.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.128.181 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1687835725; 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=QwvXTPG+SvX1bm+f7lh9ddV99LBkA8HMSnaL5DvtP/w=; b=4GBm/KiPAdp1d9ogH+8yyaejZBZn1jAzw5QmxO1DItPRgEEGjhblSGbfkn9Kb4CZkYj9l5 72HTdfZLAN0NGt0FjA6BN/k6ult6jPGCY20/79uE2AQj5njml48JSXWgxvGildhVJHLHJW 1yNis7K/kUfnKDjpbQpkqI0kp9UQ7VQ= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=bw9pNUcu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf01.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.128.181 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687835725; a=rsa-sha256; cv=none; b=Dzza8MwBZhJsavBchpcNp0ld6QtVcoH1KUu4+eMl96X0DfOe1ziNLL+vGd0LGfKmjIz2w0 VQNvgUe63Eph4VKd6NWJdvHxf/+KjKdds2Go07hofIM6jdK53wxKlMfk0LmUj/76kjyJYE IHO+BIbF4pDFHQCotLuOF4c4/hTM82Y= Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-576a9507a9bso36780337b3.1 for <linux-mm@kvack.org>; Mon, 26 Jun 2023 20:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687835724; x=1690427724; 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=QwvXTPG+SvX1bm+f7lh9ddV99LBkA8HMSnaL5DvtP/w=; b=bw9pNUcuMxpubm9pq3maPyXbc62B+bsuNNloL1m8ijygS8iq7WYtlX4XdEVQIeg/Zh Ngyg1Az+rnDUxxJdpkw2Xv9RrFezRnlEtGz+ikp5CpgXDK/wyBh05TsohR9gIqLikIrz XQJZpHLygL22WsyZKTUtr35hO5G+O3BbEJWU1trW1sFmIRDgY2iyZUpnQW0acaV8lKSP bClQykA4VjSGm4LzvwTtemLaGQIugu/qzT0WXVHTnnvGtI1PeGca+HTzzD6jettWBhDo 8pn250bIB0NJGxFmMTfFNawkBicAYzNWGl1omwNwRWLI+9cdDNXLQFqbUAr8KIK7W1AA kzkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687835724; x=1690427724; 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=QwvXTPG+SvX1bm+f7lh9ddV99LBkA8HMSnaL5DvtP/w=; b=AI9hUHRyKyEidaTX1Zxrk27bHiAUAl9p9mqy1UF6HGfhGIMlF332a78LoCPfJlK+29 FDVafB+jP8+BX1c9rm098YZypr9lOQlmOfOoXNsw1QhZz0Fp1upmt2f9B8bUtvkFXFZx ZZbHSjPzlfQwQ1CkNHje4qp2jPP9lopAwKSFpsi3906QQ7kNEkOQhOHRSgOibYqR3KQK TB/WJUQYc+4EfQ2BkGv+JOrfPc4OWzd/2LqsLB2Tw/aMym5z/5s9DdYQudrkA+gPB4kZ uy6SskNBfxmHOND00V5hiSBnprcpUi01QwBGf94h7UXNq3Lml5wLhDN46SDTesevHjR8 oxMA== X-Gm-Message-State: AC+VfDy4Yg0MFuKRj5nu4t4JWoxp2f+GcPUzrEX5t2Y3sLC94JeJU7dd XkoUoXgf3th2SJTRaq3b/Xs= X-Google-Smtp-Source: ACHHUZ4U3kYwykXpP1FzDZUmgCkvLtNAT31XIQI7+ns8f+sP4iaCy71EJqjX8aE3VjJuNDesXn/JrA== X-Received: by 2002:a81:48d0:0:b0:56d:6dd:c1e0 with SMTP id v199-20020a8148d0000000b0056d06ddc1e0mr35914739ywa.21.1687835724632; Mon, 26 Jun 2023 20:15:24 -0700 (PDT) Received: from unknowna0e70b2ca394.attlocal.net ([2600:1700:2f7d:1800::16]) by smtp.googlemail.com with ESMTPSA id s4-20020a0dd004000000b0057399b3bd26sm1614798ywd.33.2023.06.26.20.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 20:15:24 -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, Hugh Dickins <hughd@google.com>, "Vishal Moola (Oracle)" <vishal.moola@gmail.com>, Mike Rapoport <rppt@kernel.org> Subject: [PATCH v6 08/33] mm: Convert pmd_ptlock_init() to use ptdescs Date: Mon, 26 Jun 2023 20:14:06 -0700 Message-Id: <20230627031431.29653-9-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230627031431.29653-1-vishal.moola@gmail.com> References: <20230627031431.29653-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9FD3A40012 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: yqtptswhs7okx85w9b1tiumods1aksxg X-HE-Tag: 1687835725-465330 X-HE-Meta: U2FsdGVkX1+0A2TS3dA+T0Gnhegabo7t6NmNanQx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ZOEhxE0UrXrO4usoStdZ5K6xS5tBhD++LRiimGKVZuhnH3ZTFm9IpBlzN8iYMC/TzZQ/jqkiKNmdQfM7Td5j9ownDKY7dMdFLao6JrD7JodKqZsssWbkuYkgyVUdpUwtuxsIwL49aVen9DUtB799E+MoEwtJpq4CLg0KpWm/KHq+nO/o/p3T4bS9Npt1PiwvWTn7B1KR5WEuZj7Mshe5uINX5bc0ydzQeQIPT49eKBatfMjp/ogNUHipqZd4VT7GpWdF1hSuWNDJ6pdfrVdhlw7GAjhNy4pbyYS5uZDiF2S7WuR3rC2k87qqB2je3AHk7gXuEUlcH5iJ1dJJ7iyvWG9nfmp5BDFgqX4HmC++e6Adwq4i5MJOsW16FNMf6wcpdXV75gcqXaoI3f3pYaE46gmhiHcqQmhaprkQxGZ+pWkEM0ANhxLoJmtG99miBHtijkXxPZy9RBa/TiNYxIR0XiXHUvGvi0DymYaNFtnMsB8VN+HrLwO/I9OgemS7l4QItfDzlU0TWFMHDg2wEPnr1qKS8ev++50wuZNsCFbBdETA8lF4SZvfOBpNf7bRPOuKdIT050PBiVfRRCyvsafA== 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 0b230d5d229a..1c4c6a7b69b3 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2926,12 +2926,12 @@ static inline spinlock_t *pmd_lockptr(struct mm_struct *mm, pmd_t *pmd) return ptlock_ptr(pmd_ptdesc(pmd)); } -static inline bool pmd_ptlock_init(struct page *page) +static inline bool pmd_ptlock_init(struct ptdesc *ptdesc) { #ifdef CONFIG_TRANSPARENT_HUGEPAGE - page->pmd_huge_pte = NULL; + ptdesc->pmd_huge_pte = NULL; #endif - return ptlock_init(page); + return ptlock_init(ptdesc_page(ptdesc)); } static inline void pmd_ptlock_free(struct page *page) @@ -2951,7 +2951,7 @@ static inline spinlock_t *pmd_lockptr(struct mm_struct *mm, pmd_t *pmd) return &mm->page_table_lock; } -static inline bool pmd_ptlock_init(struct page *page) { return true; } +static inline bool pmd_ptlock_init(struct ptdesc *ptdesc) { return true; } static inline void pmd_ptlock_free(struct page *page) {} #define pmd_huge_pte(mm, pmd) ((mm)->pmd_huge_pte) @@ -2967,7 +2967,7 @@ static inline spinlock_t *pmd_lock(struct mm_struct *mm, pmd_t *pmd) static inline bool pgtable_pmd_page_ctor(struct page *page) { - if (!pmd_ptlock_init(page)) + if (!pmd_ptlock_init(page_ptdesc(page))) return false; __SetPageTable(page); inc_lruvec_page_state(page, NR_PAGETABLE);