Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1795151rwb; Wed, 26 Jul 2023 19:42:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlHzmL4aX7ZWDA84dPCviuBIHn8YPIH5q2IQwuWUvJaIv4W0GGlQJkEzbcg0EauvWgQAl1vQ X-Received: by 2002:ac2:5624:0:b0:4fe:18be:ef47 with SMTP id b4-20020ac25624000000b004fe18beef47mr85429lff.67.1690425752882; Wed, 26 Jul 2023 19:42:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690425752; cv=none; d=google.com; s=arc-20160816; b=tTnK5zSqzFWlklkqcFAH2rTvMTReD8pkQp3P/zMUdl1PHS3U92pL7k5T0atu6R+YNy FyWhtoivauDT6VRxLKl60SI4OKO6n+8fR1llaGj+UbwxCvEsfSr8iAQM8SCFNSPEOlcn sVACqSPe3y2lZx8a+0Et6x0u1Qi0dnst2LrtAaIZuyJJ86aPRJsc7kYvVsSrz23kCOlg wVZRbvcBHocoof+mPDehVV0IbqkmTYFEZgN/DLdmmwdG4Ec5vvEQKRi6Te842PRFyiRp D/ESJWur0PnMwDqrq8DbGOmrn6EYeVPLASZLNA1A4URyRX3QjwqoG19GAxqWOoXJj2Bb px+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8+mMYSePRim9fJuojp56HwKaFw2Rt3EE2Z0pVt0WtwQ=; fh=szGyQyy9HiNN19/BgdtRG6WY0ADzbnj201Hcz9DtlpM=; b=Lv8V/XDzy9l5rkHh1k5b+4q9ljmawbbiFiYrL1VeVhZ15PzziFPGKCgGXCGkwZrGtL 3Ym4c7ceD5fnL64eTu2rUGKie1i6683R0/KPHaKZXEP5ff6vWaSI73tbl5uqWvtp/LiK AafhxD7uBi0l6gpVWDld03Yw5HeLzBoqfBwXO9P14aZ2nspGqaI9KvvsdDjCToatrz4a 3BRgHKlAqP75oe+SRd77w3K24TZX0iu0zC6y8fthY5SqoM8cz5og1UzpuATFWegAt8oM u2E2CJUFNfpo4ZFkUA9pWJgknSrBUznldNfrunbH2F7FoZ02ICpFsgOcR+MXJhIQD+4b 9a7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=aKfbDybu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k22-20020aa7d8d6000000b00521d285fd10si195941eds.385.2023.07.26.19.42.08; Wed, 26 Jul 2023 19:42:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=aKfbDybu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230453AbjG0Cf6 (ORCPT + 99 others); Wed, 26 Jul 2023 22:35:58 -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> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.