Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp4444098rwj; Tue, 20 Dec 2022 10:09:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXsJShCG8M9TWy7jiJ8XUiwcNMoF0powE1ugKQsmUiWwD7CO0xAPqk/hgmqqFvjeQQmsVW82 X-Received: by 2002:a17:903:2289:b0:191:1006:2e23 with SMTP id b9-20020a170903228900b0019110062e23mr20971963plh.29.1671559743966; Tue, 20 Dec 2022 10:09:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671559743; cv=none; d=google.com; s=arc-20160816; b=LobQPrzAuugGX4CyDBEOyKgoOGyTrId1rIp8W2nvjp1gP+wlCOzAjQcHo+o/z6S/Iw JYaspKK6mjy6aAC/sdAfjD0BTQ4BLIVebAppTmMGIcIiWiGrKlUyAhM0wMkL8x3+vXuz g/2cVqndLC4LEyTdWUMFRi6Th+z7+d91yAhJoME0trfj5fJmpZ2HkDLuXsr1c3Nj7F71 Opg+nMH2alFKNEf6OTshqbeMVMlCx3O2mAD8nKJQZbFuhyFPZcmkjrguUaeN4l8L7Ukz C6sPqtDnggIHlsxSoAc+mHolOXu63LQjsV4HN/V+xNnMlu3udaIaeH6oSoenVp4klG+M rGEQ== 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=fEfc8sJnHm7K9aruHy33BZirM4UCmBd1CuSTlZNxnWo=; b=CXIJ9mYFhM2KnpqiQGC3KapkmtON8C9tgCtmA6GWKUrK6awOkqBwhlP916nQxgiXlc bmxMqjDzapiBthXggf1kFXHlaBKtvPPNLkp/bWYEEGBA+J3HNvsmRqCKHGnbeoXJ5Fdy wBI8MDjKReH4T4wjwZeJ7ZhKtOiDdb1dGaOaEmJ2Qlh5qOCf4vvtuPMCETKOmArZgz/S Odhj4hS4ONkJnWOUU4nVV+BsXsy4a1r3JjA+JFssSTzboJZ/9Ap7YIjtHlj76mkvovD4 SjcfVqWZpF5whwEf4yOO4pKLG5S3HWOciatBZm2dPu3M0/uxkwsn/1JqIdOr75NxpHLi 3hRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=f378FLiC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z15-20020a170903018f00b001911d58c128si8404842plg.492.2022.12.20.10.08.54; Tue, 20 Dec 2022 10:09:03 -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=@redhat.com header.s=mimecast20190719 header.b=f378FLiC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232021AbiLTRjc (ORCPT + 69 others); Tue, 20 Dec 2022 12:39:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229723AbiLTRj3 (ORCPT ); Tue, 20 Dec 2022 12:39:29 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22E7862CF for ; Tue, 20 Dec 2022 09:38:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671557920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fEfc8sJnHm7K9aruHy33BZirM4UCmBd1CuSTlZNxnWo=; b=f378FLiCTEU48S5bhGhS0vPelNpWAsXVKBiOL2+Jok6qlwUrLKBwmC/e2wJhw/BIznkufV GjiCC5iCGaVAyOlZ8UD0nPkdLvY9pFmHnUPb16gQ/1VQUXjsmOZv29m0tWZwyh6+GbKJny 78bwLCFoqyG+rNkcp9/GgJwX+ktk3GE= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-102-CQWlfOA0NDajuyjkVcaysw-1; Tue, 20 Dec 2022 12:38:39 -0500 X-MC-Unique: CQWlfOA0NDajuyjkVcaysw-1 Received: by mail-qt1-f200.google.com with SMTP id o9-20020ac841c9000000b003a820e4c248so5777212qtm.2 for ; Tue, 20 Dec 2022 09:38:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fEfc8sJnHm7K9aruHy33BZirM4UCmBd1CuSTlZNxnWo=; b=xlee+szS2LdqtlkW9OXMOtGMB7jl23qa52K2cHVCLQMgwCyBshr1cmtOxotrkhwBIy zpJglqlSX4YyGbh630Wi4HNTBksydkHQJDUned63SNQCAvD3a04gpBSVoZ03qY/WOFMN i9s2/KADtiLGuF1cAyr6a4dhOsSte6+dU1EZYrTANYUnH6Ahx6886IXcsJsDS9BsW3lC xhUVSrUgC6n5UTHyWybCrhStpwNCu9OGQ6Ht9A3gld/ZERWBabkhYHWcAf1wZa5pVq3G 3HHgHWAgUgL7q+XsIZuvtRTvlSbb4Lh3U7B3YBlRuwrTTLdRUXQAnpBFRYtnqyYjP4ws t2ug== X-Gm-Message-State: AFqh2kq5sUY3AWR2XuMuI9qDvb+zN3PaHp+hp5xRwEeQs/E+yAxLqxNc +A1QFsG1/khIuVOiHYJtf6wp7Nh6X0b5R4wvtVlWZbT+1aw7sozGn8bvNTW4a0/btjmOEkIERWK HyFzBkgkuHif8sgehuwWib47u X-Received: by 2002:ac8:7404:0:b0:3a9:8610:f9af with SMTP id p4-20020ac87404000000b003a98610f9afmr4892451qtq.14.1671557918842; Tue, 20 Dec 2022 09:38:38 -0800 (PST) X-Received: by 2002:ac8:7404:0:b0:3a9:8610:f9af with SMTP id p4-20020ac87404000000b003a98610f9afmr4892421qtq.14.1671557918568; Tue, 20 Dec 2022 09:38:38 -0800 (PST) Received: from x1n (bras-base-aurron9127w-grc-45-70-31-26-132.dsl.bell.ca. [70.31.26.132]) by smtp.gmail.com with ESMTPSA id r17-20020a05620a299100b006fb8239db65sm9360534qkp.43.2022.12.20.09.38.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 09:38:37 -0800 (PST) Date: Tue, 20 Dec 2022 12:38:36 -0500 From: Peter Xu 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 , 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=utf-8 Content-Disposition: inline In-Reply-To: <20221216192012.13562-1-mike.kravetz@oracle.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 Fri, Dec 16, 2022 at 11:20:12AM -0800, Mike Kravetz wrote: > zap_page_range was originally designed to unmap pages within an address > range that could span multiple vmas. While working on [1], it was > discovered that all callers of zap_page_range pass a range entirely within > a single vma. In addition, the mmu notification call within zap_page > range does not correctly handle ranges that span multiple vmas as calls > should be vma specific. > > Instead of fixing zap_page_range, change all callers to use the new > routine zap_vma_page_range. zap_vma_page_range is just a wrapper around > zap_page_range_single passing in NULL zap details. The name is also > more in line with other exported routines that operate within a vma. > We can then remove zap_page_range. > > Also, change madvise_dontneed_single_vma to use this new routine. > > [1] https://lore.kernel.org/linux-mm/20221114235507.294320-2-mike.kravetz@oracle.com/ > Suggested-by: Peter Xu > Signed-off-by: Mike Kravetz Acked-by: Peter Xu Thanks! -- Peter Xu