Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp924073rwj; Fri, 23 Dec 2022 09:51:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXuhZq0dFI9YON+tSR6loogBA0aCsa3Se3NvZmD/RV62jDDTJ7Hx0gjmImRYInn7ssQ1eHS/ X-Received: by 2002:a05:6402:375:b0:46d:ea1e:fed0 with SMTP id s21-20020a056402037500b0046dea1efed0mr10300945edw.40.1671817876114; Fri, 23 Dec 2022 09:51:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671817876; cv=none; d=google.com; s=arc-20160816; b=p1GrEAFcB1r2OMOqhsrhvxa7Jt+wXEPMRMrB6Dh63mWLb8usMO3msLAkH2BPP49I+J 7fKlguMO0a/ngIfUyOYfau7iKmhO4aPAiGvJi7zLtxDBOxB1eqtRBGSHP9f4YNYbsINK i8CwVzML88CGSgsqT1mNWA16ziEBd2p/tnD8K7vZpDgME1YPTtjCr6+LmJQXfZDMlLLU ZRAU+14KND+WWrp5rDtjO/QN/pMzBO2hGzt/nFZdruWtn/L4/j63m3hPsUue/FeiNhBl Kxt2cdQbA2lihmW+kiPEctx/JyUT4k5Elopai7w2CpdZTDzUmDBlYeI4Q4OHmd07OIUp WPzA== 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=tvgYFs2FAZdH+/felJr+94xqrzl/poYnFOMsR5Dg6fA=; b=azJtwu2ePtv496C41OvPfo7IVGP+vuR2GHaaqUfx8hNrpTF1uP1+SEiiIdKdBGgOsF v2IaSaoaQFdU9Ynf9JOrGeaQsV7AyHGvcGfNsXxsAbGXelwl3+3CKmnrHwwuuXS6UO9L 3zwOD3ha3/j4U1vETVzMT/yz7Jxy3+i5NGsZyjSvPWiPSCWeLkhHp6PxiMJ4I0J1qi7x 9X5mTAGjtUx9kpGugKTrEquO3Nj02cfLwanxuqvQNWMYshHeJiHCygjwFbKEeKdUafJb qxXSljn7VE0RgRHcEZelISLvgsx+y9ehZWaIZEkfs6czhvzpngBbMIrQmzCR0vXtdALW W+xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=n7lcCdiE; 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 j8-20020a05640211c800b0047fde638461si3399610edw.83.2022.12.23.09.51.01; Fri, 23 Dec 2022 09:51:16 -0800 (PST) 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=bombadil.20210309 header.b=n7lcCdiE; 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 S231681AbiLWQ1V (ORCPT + 65 others); Fri, 23 Dec 2022 11:27:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230390AbiLWQ1T (ORCPT ); Fri, 23 Dec 2022 11:27:19 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B67265F6D; Fri, 23 Dec 2022 08:27:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=tvgYFs2FAZdH+/felJr+94xqrzl/poYnFOMsR5Dg6fA=; b=n7lcCdiEfcq8NCgXEDNF/0Z4ci tIOpRAdjDXVUvE+5DzvrJ/9KcCMujjvsihTERwfIZtXtW7cfaSsL8gKUqzMyoqVPAuofBgFa35SaB eQ1a1u6TOi/d/R7Vm5HFe4N9BX10usAzaGFrUU15vE/Rp65o4AsfVdY7lDi7fEDOqTAv29Gk+rfsP x0FQmjE4t+01NANuuhbsYP+Q46PaNZUvkjZbeCs5rLNn0M9gxprited5koJ9kFvTzc2h7pRCrgsrh rRT4+62twBnE/keGANDiY5jPmax6kiPnXxTrwnrL02TafuDXWZfPgmANs4Q8lAfIEfRfYyeh0pO/9 m+4fvEuw==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8kt4-009yDY-Rs; Fri, 23 Dec 2022 16:27:10 +0000 Date: Fri, 23 Dec 2022 08:27:10 -0800 From: Christoph Hellwig To: Mike Kravetz Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, netdev@vger.kernel.org, David Hildenbrand , Michal Hocko , Peter Xu , Nadav Amit , Matthew Wilcox , Vlastimil Babka , Rik van Riel , Will Deacon , Michael Ellerman , Palmer Dabbelt , Christian Borntraeger , Dave Hansen , Christian Brauner , Eric Dumazet , Andrew Morton Subject: Re: [RFC PATCH] mm: remove zap_page_range and change callers to use zap_vma_page_range Message-ID: References: <20221216192012.13562-1-mike.kravetz@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221216192012.13562-1-mike.kravetz@oracle.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 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 > unsigned long size = vma->vm_end - vma->vm_start; > > if (vma_is_special_mapping(vma, vdso_info[VDSO_ABI_AA64].dm)) > - zap_page_range(vma, vma->vm_start, size); > + zap_vma_page_range(vma, vma->vm_start, size); > #ifdef CONFIG_COMPAT_VDSO > if (vma_is_special_mapping(vma, vdso_info[VDSO_ABI_AA32].dm)) > - zap_page_range(vma, vma->vm_start, size); > + zap_vma_page_range(vma, vma->vm_start, size); > #endif So for something called zap_vma_page_range I'd expect to just pass the vma and zap all of it, which this and many other callers want anyway. > +++ b/arch/s390/mm/gmap.c > @@ -722,7 +722,7 @@ void gmap_discard(struct gmap *gmap, unsigned long from, unsigned long to) > if (is_vm_hugetlb_page(vma)) > continue; > size = min(to - gaddr, PMD_SIZE - (gaddr & ~PMD_MASK)); > - zap_page_range(vma, vmaddr, size); > + zap_vma_page_range(vma, vmaddr, size); And then just call zap_page_range_single directly for those that don't want to zap the entire vma.