From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D810C001DC for ; Wed, 14 Jun 2023 13:59:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245299AbjFNN74 (ORCPT ); Wed, 14 Jun 2023 09:59:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245329AbjFNN7u (ORCPT ); Wed, 14 Jun 2023 09:59:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DFB811B; Wed, 14 Jun 2023 06:59:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D650D60E65; Wed, 14 Jun 2023 13:59:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75DD0C433C8; Wed, 14 Jun 2023 13:59:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686751188; bh=bczNeLQKsA4Jn/cyv5Zpe2oQqQ9DoTlx1RmcfxuzAiw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rB5cuxD7f+pVV/2kNGOgyZm/CMnI+FrUzScbpb3WvoAusSUJT4mgiOW93EX9McJH2 FhTySbUNTBv9MPhFHuVa5nuJ1XZTkWt5yRSSUAhZSNmRhZbJ31odisGjIKfu1++lsZ CH2YOx06YFt56y6ifO55IZUoGHHh/jigUaNtJtYKTg86qZrpU96rQcXjsvJGzQn/kn YLwGgJim4snk8fpaILSaD4wUTac4kDSaDw7wbBi0N7ZYhBsLDqm0a86c4hplOXMBZK gjGoFTFEI0ysZIaZZuOB0qrBTQ+cGwB5XLuAStdydY6oCdalsx3dIZVfFXIzN0yL0V 8u2LU4VeWNaSQ== Date: Wed, 14 Jun 2023 16:59:11 +0300 From: Mike Rapoport To: "Vishal Moola (Oracle)" Cc: Andrew Morton , Matthew Wilcox , 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 Subject: Re: [PATCH v4 11/34] mm: Convert pmd_ptlock_free() to use ptdescs Message-ID: <20230614135911.GJ52412@kernel.org> References: <20230612210423.18611-1-vishal.moola@gmail.com> <20230612210423.18611-12-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230612210423.18611-12-vishal.moola@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-csky@vger.kernel.org On Mon, Jun 12, 2023 at 02:04:00PM -0700, Vishal Moola (Oracle) wrote: > This removes some direct accesses to struct page, working towards > splitting out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > include/linux/mm.h | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/include/linux/mm.h b/include/linux/mm.h > index f48e626d9c98..3b54bb4c9753 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -2950,12 +2950,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) > @@ -2968,7 +2968,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) > > @@ -2992,7 +2992,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); > } > -- > 2.40.1 > > -- Sincerely yours, Mike.