Message ID | 20230417205048.15870-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 1100DC7EE24 for <linux-mm@archiver.kernel.org>; Mon, 17 Apr 2023 20:53:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1DD50900007; Mon, 17 Apr 2023 16:53:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 19047900004; Mon, 17 Apr 2023 16:53:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E37D4900007; Mon, 17 Apr 2023 16:52:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id D2C7C900004 for <linux-mm@kvack.org>; Mon, 17 Apr 2023 16:52:59 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 9BB42AC3FD for <linux-mm@kvack.org>; Mon, 17 Apr 2023 20:52:59 +0000 (UTC) X-FDA: 80692082478.22.ADDE322 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by imf10.hostedemail.com (Postfix) with ESMTP id A7C02C0016 for <linux-mm@kvack.org>; Mon, 17 Apr 2023 20:52:57 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=XGW0pwJ3; spf=pass (imf10.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.170 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=1681764777; 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=I0S9vHWOxLue2VyFd3w8q0WLRZoA25NyvyllT+RcawU=; b=Jib7y9GlPixLU9MGqoXC/SLJ9Z7nrdNJ/cPBFwFKr2KBLkbrfi4v3JRq28QmK6gRG1D9iu ahLqov/HlrBhljliltIQ8NYGJRkGHMf0EU+sxmWbedIXShul22qSU9ca27I7fE3XkVaXGW uoaQvYYbBOxHusRi4iiU++0RyvfLwpc= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=XGW0pwJ3; spf=pass (imf10.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.170 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=1681764777; a=rsa-sha256; cv=none; b=DMqpv8RaGES0fST797kRKBWQCasgLtAoWqQn+t67NICoZsvcrE6q8dlIdEIe7RJtCamLYc 7lprqVB/MU9i2KglEKnvPXZ8Pft3UmFX7+hwhsMZC7yUAsMjB5HMLdFxrrUTE0g94du4ZB IIQQAZ6KKSu0sMp/LnRA5RMR+TYSFzA= Received: by mail-pl1-f170.google.com with SMTP id kh6so25752522plb.0 for <linux-mm@kvack.org>; Mon, 17 Apr 2023 13:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681764776; x=1684356776; 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=I0S9vHWOxLue2VyFd3w8q0WLRZoA25NyvyllT+RcawU=; b=XGW0pwJ3AeguS3BSEjZkQda83npB8B7RbJEymTCypauBOGiv3vWjnUTzzYfl8eoJ/G l8vpSac3iXyBMdZp/fMD6sum0gW4MOCVqLS502CXgyi0RUYYf3ntgvAGSXGBolZoNn2i V+ToiFcIdhtDlP2wctGltXpdu2C91rdsIF1S9oPOQ0O7Jf0vF/Q8QloTMvDXpKn4JpZo XwyusDwNIWazvsnj/elh4vmpM936WP8JEzePXhLQ+OdbmLb8t8oYaUiKKrqV8mjQTuNV U8/37jTeHtYYWs9KLzMjZZ9An2VnMVkd7CaDSgdHdeupgwKBIBRRGFzwxZa8/Q4lnujL ZhVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681764776; x=1684356776; 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=I0S9vHWOxLue2VyFd3w8q0WLRZoA25NyvyllT+RcawU=; b=A4HFgi9Nt2bbL8JAfWx6pdqqsUlEdC/CkfKZ97SYI5zUxtl6ByD9Ek8tPdujnS9Mxk j5NdZOIpFdN/ipFI7krmRghicHBZdQEI3Zr2ONq+aOFEcVOIkjG/ECLRmXbbwtz1rDy7 rdZ3a5xm1Lod8bz8nh5mdrTQXvM3FTgMZw3y1oujDOyktwGLb+LrQ9uobWOPA+mg/7zb Qc9kkFPhU6VV2spAie/MrR45sU08S79i+QHzhj93QICw8+JAaxBsg4J/i1S46iy6cpYj EVUSs5P8qLevdJOlmDL8IaJAu5XJB4eb8jqY/j5ma+TBVRAumPOj2hJQiid9nc1ytn3+ UwwQ== X-Gm-Message-State: AAQBX9cALeQr6Yp351B+LfaPCn9K3ZZFloSxiosv2Cy0h3HOrqKCZYcG N0sHFc0IJFLmi3ZsTYtzzto= X-Google-Smtp-Source: AKy350ZxT8mmBCzqXXqE8vhbMJvpIdAkvQhshhpl/b9NVru4kEOX264b08aZJzrt7Emcu03WoO14SQ== X-Received: by 2002:a17:90a:3fc8:b0:23d:15d8:1bc3 with SMTP id u8-20020a17090a3fc800b0023d15d81bc3mr16271900pjm.39.1681764776607; Mon, 17 Apr 2023 13:52:56 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 13:52:56 -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 08/33] mm: Convert pmd_ptlock_init() to use ptdescs Date: Mon, 17 Apr 2023 13:50:23 -0700 Message-Id: <20230417205048.15870-9-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-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: A7C02C0016 X-Rspam-User: X-Stat-Signature: mea7hc984rxfuqdwsbp8jjruugrdicwx X-HE-Tag: 1681764777-568996 X-HE-Meta: U2FsdGVkX1/sD+yaXUKKJM1oXY3SNKwkswGqF6P33D0iKr/KvXWlpeYaFukuLWhBMZutW6SrrwZHYsTcQ0Jqsza1qVexrDyNY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4zsoZOjgPdmAmJRECUsgT/vP+r8BNidNuB5TNa33dYTUfamhMeillwor5noJqgZcJgkVLcP55gqI9BEuoYDphawJMlj75GNX7evq1eZXtphKDtmfZ/lPLqFkDC44TGeGyQmhD/rRVC1rTq4fIpktrkpQWQStF7yHspapve3KAhflAnPv63MQDfEid6nzaqZiUCiGwZeJcp3vsoFzmEQsuY7pEDjTvrX2/f4suJnnjlHScq92hX0nEqCZtSfejnH7nIDAlga6f8J6NxTwb4Lpey33n0WGdJSQf81+G1sP07HWWThG3fxRDUjSvCJWeo7ZeuRbQDG9d1JAblb+mW5xfjCPzg6XsxVPJLFJrj5Ls560OgOmNtYSQPJDaoU/zTkMqQwf3X1hzSBuD7M/sqqu0Y7pawg== 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 ed8dd0464841..7eb562909b2c 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(-)