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 4D1BCC001DE for ; Thu, 27 Jul 2023 02:36:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230516AbjG0CgA (ORCPT ); Wed, 26 Jul 2023 22:36:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230406AbjG0Cfx (ORCPT ); Wed, 26 Jul 2023 22:35:53 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4A42FD for ; Wed, 26 Jul 2023 19:35:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=8+mMYSePRim9fJuojp56HwKaFw2Rt3EE2Z0pVt0WtwQ=; b=aKfbDybu2x46T8mL8mBiHX+XNR b03TRFMgx4k3CYXkpnBYwXtL71Lzk25bxLE0EDBKqF2tMhfzdykQf/KqIfQ2sA322eD5zCapWkr8m 2DWATcajZ6vgm5ey3DpGfKEYBHPvo0aH9LvEqYQ7Wv8/w1Z796Rvj0e665wPQTEXqumIShjM3Y93O pAKBQa2aSdvK3qhxKnFnUszJW1/2Ktfd/ri2nI9YdVHKF2DaEjFrNrrkhGTxkqMmXAI9ef6QKmKlh 9nWzbGD3M4RPU2Ui8CAKNUKG/s+DdGArr5DYXzMePjboTfktOAa2ym1VaSPiw+A9vDfGCQqb87gUo mEn6lrzg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qOqqm-00742b-Pu; Thu, 27 Jul 2023 02:35:36 +0000 Date: Thu, 27 Jul 2023 03:35:36 +0100 From: Matthew Wilcox To: "Huang, Ying" Cc: Yu Zhao , Ryan Roberts , Andrew Morton , Yin Fengwei , David Hildenbrand , Yang Shi , Zi Yan , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v3 2/3] mm: Implement folio_remove_rmap_range() Message-ID: References: <20230720112955.643283-1-ryan.roberts@arm.com> <20230720112955.643283-3-ryan.roberts@arm.com> <87r0ouw39n.fsf@yhuang6-desk2.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r0ouw39n.fsf@yhuang6-desk2.ccr.corp.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 27, 2023 at 09:29:24AM +0800, Huang, Ying wrote: > Matthew Wilcox writes: > > I think that can make sense. Because we limit to a single page table, > > specifying 'nr = 1 << PMD_ORDER' is the same as 'compound = true'. > > Just make it folio, page, nr, vma. I'd actually prefer it as (vma, > > folio, page, nr), but that isn't the convention we've had in rmap up > > until now. > > IIUC, even if 'nr = 1 << PMD_ORDER', we may remove one PMD 'compound' > mapping, or 'nr' PTE mapping. So, we will still need 'compound' (or > some better name) as parameter. Oh, this is removing ... so you're concerned with the case where we've split the PMD into PTEs, but all the PTEs are still present in a single page table? OK, I don't have a good answer to that. Maybe that torpedoes the whole idea; I'll think about it.