Message ID | 20230501192829.17086-10-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 DBE19C7EE21 for <linux-mm@archiver.kernel.org>; Mon, 1 May 2023 19:28:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3BE30280008; Mon, 1 May 2023 15:28:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 31FE4280001; Mon, 1 May 2023 15:28:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F0602280008; Mon, 1 May 2023 15:28:49 -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 DD89C280001 for <linux-mm@kvack.org>; Mon, 1 May 2023 15:28:49 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id A92DC1A0580 for <linux-mm@kvack.org>; Mon, 1 May 2023 19:28:49 +0000 (UTC) X-FDA: 80742673578.02.20E13B7 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by imf19.hostedemail.com (Postfix) with ESMTP id D2D6E1A001A for <linux-mm@kvack.org>; Mon, 1 May 2023 19:28:47 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=UIGt4Rxs; spf=pass (imf19.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.182 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=1682969327; a=rsa-sha256; cv=none; b=rki/y/XRDiRNYmTA0wpSzaCPpwnjmtohxB/IJKQmwzZY7xfwxdcoJaYN2z27t/jXCdSKx6 G5AgAdj7NfPeE/L6+SJA82qjlQx9TDe2Elqg79w0zfkGkKPiJEIMvMIeLjXx9AMU9MU7Fo 3O7EOjCMuRvqvy+p04VTxXRSaVoGBgE= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=UIGt4Rxs; spf=pass (imf19.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.182 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=1682969327; 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=Qr6GrFg3nf2tpOD8Orpodgx1J1bZoReYY/j4MOttH8M=; b=GX8CdIKoUuBMsyK94ab2GPGvpUDPSoJUAbC49ixv2aOM5FGDwGWRfWksztRi5Jd2QLnnLA GbNVfBVwlpM41V0xSey3R3K+XfEWZdxFGbrZdYNeKEVNNGERdPJ6z5TNTDvrk5OowTwEvX Cm9XKOAEnA3t4RWONDyAqGiH7ssOUO8= Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1aaf70676b6so9588565ad.3 for <linux-mm@kvack.org>; Mon, 01 May 2023 12:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682969327; x=1685561327; 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=Qr6GrFg3nf2tpOD8Orpodgx1J1bZoReYY/j4MOttH8M=; b=UIGt4Rxs2HkrsHutpAYaiWsjpykN6YUUd9E7lUyM0xl9pxC5slr+PivAMCf0kJWRtN +uixoPZwp4Vkl4YHEUToQjjzNjvIathQteky2ye14eE7NbHDFgUdPJKRNVXQAhEugOmA SnKo0+DWLOVbHHUZvAiFOaLnHaj2/1PYZhJmFGNiABpmjR+0nby25eJKrDAKj84VfLsp mCPKXur9uRrX02YRe2GBv91KFh4j6FQNTVZMtFBm8+b26dYihW/DQX+FZ7CAta9Gp4QP rZEIiymi83HRxeSWeuBi69l3Fo9OQWMSSxYcww0ZzqBAzl9SsUUSi153JEf/pt3dBwk3 OFrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682969327; x=1685561327; 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=Qr6GrFg3nf2tpOD8Orpodgx1J1bZoReYY/j4MOttH8M=; b=eFcErLOtJmzFtcA+DCI5n+KXtnZVI5hi3uDGkVQ6ZJY3fcVB0DRkQVP0HpHxwxOCU4 G+YWM4pmMP1sIXgrwCRS8uzGBRGl3h1y7iYV1b1/ABu6xI8gLi9ua45P3NHZ0tnpQYGx 4QsweLYDbDl17qo7qEsWcoJztzj+8RCNb0XOPgn2ARESb/+Svslt1pCrvUYOWD+xmzi5 h+4WHI02hjGgrkTSzSZMbhhs8hhJxjT0gjDKeBUijFE2LqErJ0pEqO5vIENke1HuousX SVa1WRq4TtoWKmVHvMjyfjdn7J/fvZ13ojk9xMnkwYQ/BKZ6l3XDs3MDo9r50r/Y9qbK ci5Q== X-Gm-Message-State: AC+VfDwCX5dx6VT6r7D2+vT2Fy1FuI8nVgtbDveOllKXPeyBMA/PrKPp wv10+TJJAEvxPzS8Nenipco= X-Google-Smtp-Source: ACHHUZ7U6exPykPvKxCgekHmX9KTHTAx49eIcN0vG+aTw+3qX+uTyRXMYpekTZ9RZqGTjPxZ9ZewtA== X-Received: by 2002:a17:902:ecca:b0:1a6:4127:857 with SMTP id a10-20020a170902ecca00b001a641270857mr17426348plh.5.1682969326811; Mon, 01 May 2023 12:28:46 -0700 (PDT) Received: from fedora.hsd1.ca.comcast.net ([2601:644:937f:7f20::9a2c]) by smtp.googlemail.com with ESMTPSA id u8-20020a170902bf4800b0019c13d032d8sm18175622pls.253.2023.05.01.12.28.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 12:28:46 -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 v2 09/34] mm: Convert pmd_ptlock_init() to use ptdescs Date: Mon, 1 May 2023 12:28:04 -0700 Message-Id: <20230501192829.17086-10-vishal.moola@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230501192829.17086-1-vishal.moola@gmail.com> References: <20230501192829.17086-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Queue-Id: D2D6E1A001A X-Rspamd-Server: rspam01 X-Stat-Signature: qde3wzzwf56ii7tk74su7owib7hn1hmw X-HE-Tag: 1682969327-230637 X-HE-Meta: U2FsdGVkX19Tkehvdxh7s0s4zQuUTg+LcE+LP6RfVElMUfkOLIJwY0xYqQeShAsUhFCm5un/sO83djbcAEuGTnUVuqxvV3aujw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xJBCnAsr+dQ6Ae47zsEOxhQY4FKL6OoJZwi+UO9IoKnMmJ+s9r4Jz0b50kixIifgkkueZ9b4WnqUOpNhSEONw7B0lDxJi0AtO/V/2xez9iXcTe6XXEoH9LwvU2c4mPvqu6wjbn61nTglefSPVGp0TmGeJB5N2lKQscAITn5dOXqiIf/qF9FOf21l/csH/J8JC4xgWvlqNa9FW9khpBmPDq28vhAFchw2tgScUSBViUjhPsLU+dvhhwkWXMhlgN8sU9lDJgTUZsyNcMxnfYkxn6CZDpe+049gKhSNttL+RhXxlAF+gHahurXaYr7lsMsGNss2FyEGf/ugtNYNbYJBu4C77ikRCu4CkIbFrbiVjVeuCvsQZdUPkyoebDGZ6BIJPIlVfmHlQnk= 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 49fdc1199bd4..044c9f874b47 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2903,12 +2903,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) @@ -2928,7 +2928,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) @@ -2944,7 +2944,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);
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(-)