Message ID | 20230622205745.79707-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 9B645C0015E for <linux-mm@archiver.kernel.org>; Thu, 22 Jun 2023 20:58:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 32C9B8D000B; Thu, 22 Jun 2023 16:58:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2DC338D0001; Thu, 22 Jun 2023 16:58:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 154788D000B; Thu, 22 Jun 2023 16:58:16 -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 EDD258D0001 for <linux-mm@kvack.org>; Thu, 22 Jun 2023 16:58:15 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id C19E91A046B for <linux-mm@kvack.org>; Thu, 22 Jun 2023 20:58:15 +0000 (UTC) X-FDA: 80931596550.21.0A039A3 Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com [209.85.128.170]) by imf13.hostedemail.com (Postfix) with ESMTP id A22E52000E for <linux-mm@kvack.org>; Thu, 22 Jun 2023 20:58:13 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=V7iIPiXu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf13.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.128.170 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=1687467493; 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=RkbOFATbkUu0j0r7ygW/ICkvxHp6l2hY5qasz2O9rxXDInMFBKPh733+R1N9BVuMt+3SkY 5c0tm3kC7/8X7IzDHr4cIuqmBRnIsAw+Gl8VMcrSOECrAbVQqcmFYMunJyGSDyO9dlln7q ydj2H0CQUe4QU55Z6YAXysruOs2OolU= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=V7iIPiXu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf13.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.128.170 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687467493; a=rsa-sha256; cv=none; b=fIT8lASr8/Z+LKjFqTZowF7TAmN1uwCxQh1zH6CmQ1n3wKIssMxlkkhFG35MHJsLGeX7xW L3pEv/SU8U+jsLkUdtAOGSIIqScR4a9skvAFfB2lNrsJ0IPx1FVUCB7jQENSqKKW72qijw sYewPZCJ65z6pg01LHC1WA2jfynzn2U= Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-5700e993f37so16827117b3.0 for <linux-mm@kvack.org>; Thu, 22 Jun 2023 13:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687467492; x=1690059492; 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=V7iIPiXuenZc5LxLPVAYTxoBribtdhvsXYi0NcHOJsAsyDJa0lFaEv3HMhCS8nZW6D tBGbKDLUXgq6SXB+UHfoUVwA1VP1oc9uyCsQtJaaWpV0A9i7GdGsTkpa9yZ5PdH4EtVM Ni1Gr88vaVkgSSmwVNY0eyneVDMvJ4SahI/dxEEDmyh7acczYA1fdB5Q85cg9BE7TeJ5 v+qGG39VtOAMjNZakRVRxe4b5fNSSUnmW+YdbvmJDes0xjF1gJ/GuHYdLYvgYUIG6iI6 eUC4zgsXmS8SGsNdBxCv7WeYY6IHbiVQmbpLNYO57IVPmerTWPsJRHKkJEBcDrOn9Fu9 t5Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687467492; x=1690059492; 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=altd6c6lOQhuK8BXdixrcKrezVM6ZZbuunIBUv+FPpOQptugSxSVZDUqg9Ph9rx+i3 KY/fLk68XgQfPWGfkrv7RCNED4JYEqEw/HUdybyYwGxziP7t27ONXCpdzB/lD2cwxDcI 7vn+ullQeQFltidbfE3jpTcKtglFRjcIrShAXjRhwiTKVUmNi1JNr0qYcPtYmv7whFLb ENVS9oILIZupbMAm/F3irMMe9uGmnET0aa6iM0c7hUfqLM2sqqqEE48thR4SJ3hQe3/r OWan+1RtH4rrlsLhlF5TH4WdjYep7KA8Ztko+y95BdzQr/fAa/8j7cVf7AAoiYUB9CQH 8Mkg== X-Gm-Message-State: AC+VfDyJpLzO3xFHKQYLje7MWSYatWxa4xpoXYS5lmy2pYwZB+PjzRjf 9yZ1eTNJNT231LHispScGpw= X-Google-Smtp-Source: ACHHUZ6ppOE9aJqUa6Cvm3ZqXuUeTC6rF3mEFKF1yW3aWJUSdADhBmOmFOGnjJA0vfHR/02sJ+sTQw== X-Received: by 2002:a25:1406:0:b0:b9d:766d:f72b with SMTP id 6-20020a251406000000b00b9d766df72bmr17309619ybu.31.1687467492519; Thu, 22 Jun 2023 13:58:12 -0700 (PDT) Received: from unknowna0e70b2ca394.attlocal.net ([2600:1700:2f7d:1800::36]) by smtp.googlemail.com with ESMTPSA id d18-20020a5b0c52000000b00bc501a1b062sm1684937ybr.42.2023.06.22.13.58.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 13:58:12 -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 v5 08/33] mm: Convert pmd_ptlock_init() to use ptdescs Date: Thu, 22 Jun 2023 13:57:20 -0700 Message-Id: <20230622205745.79707-9-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230622205745.79707-1-vishal.moola@gmail.com> References: <20230622205745.79707-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A22E52000E X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: k8nwr5goyos8eqg544j8jbtwr3m4bant X-HE-Tag: 1687467493-737673 X-HE-Meta: U2FsdGVkX1/dw1UBbTdnTyWbKxmZqxT8GP7R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gHPwZGQYXW6Pei2KBUBLGonWFWAgGZWUO0x6YAuPGLtnmqs891HcTZcBHgMwj4ZHrfJKSCLZwVuzIQBJURkwF5n5WV5Xffio2iubKBd76XEoNT0fpCGDNRvsaKA23jQnYpmc/DbY9JZjS1TqeIV34g3vjij1EFBolT6Mvl26C0E97qRWN7judd4TNSiR4IFUNskAIDwYW4QJuTPJZUB478OCnRkLMDLMSqvZxOBUyhW7brShL8ii8Twb6sA9QQ/cGlAFRG463mRi8Klm+F3lfpilw2+95qqTO8bVuSMqoz25+Db3x2CmStMvVk8JytgKyC6HxPZTDvLVBFNTI8ZwszH7IVbOXg24XLzZRqceL8AA5gEC30sv9eTNbE1girzcl7Eer4fogT6/sVvoSKOqB3C/5L2TApdJe0zu+OmgvJUhtw2QrdoiayuZJO5Z6tusYS3+Dzct7nFJ00HhQGle1uAcwgfeo3YEogK+bDq/HOctKIugLBu+OxEkJWkNAFg= 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);