Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp5046892rwj; Tue, 20 Dec 2022 19:38:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf7wrYa3irmhW3Ma2xnlAF5Sy3Av3Xd2F4Q70a1h2OqN8T3GdFnuff+4hh+wm5Yal6r040Px X-Received: by 2002:a17:906:26c6:b0:7c5:fd:4352 with SMTP id u6-20020a17090626c600b007c500fd4352mr33010061ejc.49.1671593923781; Tue, 20 Dec 2022 19:38:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671593923; cv=none; d=google.com; s=arc-20160816; b=wCCuLBPQiK2j1fOcEF0Imo4sw50+K9ZYmgRXGNdZd93q2s7tAqf4HSpxoE1f7sWODx l7VcNzSSrCF8b1LyCdJlLVavE7pbVyt6RprRWbcLX8OG6hv3MbP0KxWs5gYSXN1j2bDm /01QA03CnLQEetbf/iXvJqTakKxQ493mLAvOqN//YzVvYykWq2O8g0ShfAP3Y4YmqfW6 JlALeWEYUBVsZ4BMvbCM1ZfiEjABJ5WPe48I1/nSVrITWsfV2lsOyedaK53/xkK6X9su rY3DebLrjFjsMRd6LcCP4ky3byCtnCMHiZNAOuIYvQSeY/JlbHj7vEg/90nwSJJ/JYLp aN+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=eqAIBLUmcICy3LgEU8+CzGPHy97CiqYlcBozr88VRgM=; b=rCF/xfeJMWZBzk5lJpVHKKfCsFoyH9SWhQX6pcKHw00Tg/u+Ppb81g5y6u3RQY0Dld /aWKNgcMsH4ZKsobmhdu/6n1BakWDOlItILBX/Nr2+QrdxTmzoV55OzYillpi3gDg+Qq xQEtrkXPNfwZ15e3WMdh7kb2lIOkktPGGS+tQ3W6Za8/gZWGIlH9WeC2jRWKGYwvz52K ZybrQQt5itCM9aqhHd5RbgiDS6B8v5A2j+PKX+RwqS2s0md9bEn+gLgXEdexYue28Yom y7lHNv5QaaN+TyL4XOTAl2c0wDu8/7UNrnyYzapWeXqcFyILN6xAeiWIs91od0mfFWZX SULQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=nEnpH5yK; 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 hu10-20020a170907a08a00b007c0dcc62e49si14308454ejc.56.2022.12.20.19.38.24; Tue, 20 Dec 2022 19:38:43 -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=@ellerman.id.au header.s=201909 header.b=nEnpH5yK; 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 S234360AbiLUDPP (ORCPT + 70 others); Tue, 20 Dec 2022 22:15:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbiLUDPN (ORCPT ); Tue, 20 Dec 2022 22:15:13 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9B6612629; Tue, 20 Dec 2022 19:15:11 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4NcJTg0Mtbz4x3w; Wed, 21 Dec 2022 14:15:02 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1671592506; bh=eqAIBLUmcICy3LgEU8+CzGPHy97CiqYlcBozr88VRgM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nEnpH5yKCXg49RR2P2OgASyKUTK1v/Cpt25ZodcDuYQhuzTY4bfmiopmNdXaSJcxG aT2giTer1CXp4QrKyb0L3iEMExYYi45d6YNdHP/hsCuZ0ooVSZAHVP+TaH2VeP+mV0 m7KqD7FQGyuOV2IM8pdQBoAydfWwg9TXYyD/1MwjCHXsflSyAQ9fUUg4pbm6i1ouBK SZjj31OHTFa/rSnU4LNO/R3FzH6Cmo/n1VbDuQf7YV3yJoyt+M/z7P9wZUe0G0LDmb GVN8E+MF/N6Cs5RWhwq5KdcguwthwmMBOOWoIsEsuVPmDTrbRkQpUSO0ShmLK7R0zK zzORrsjT0jX2g== From: Michael Ellerman To: Mike Kravetz , 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 Cc: David Hildenbrand , Michal Hocko , Peter Xu , Nadav Amit , Matthew Wilcox , Vlastimil Babka , Rik van Riel , Will Deacon , Palmer Dabbelt , Christian Borntraeger , Dave Hansen , Christian Brauner , Eric Dumazet , Andrew Morton , Mike Kravetz Subject: Re: [RFC PATCH] mm: remove zap_page_range and change callers to use zap_vma_page_range In-Reply-To: <20221216192012.13562-1-mike.kravetz@oracle.com> References: <20221216192012.13562-1-mike.kravetz@oracle.com> Date: Wed, 21 Dec 2022 14:15:02 +1100 Message-ID: <87tu1pih1l.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain 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_PASS, SPF_PASS 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 Mike Kravetz writes: > 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 > --- > arch/arm64/kernel/vdso.c | 4 ++-- > arch/powerpc/kernel/vdso.c | 2 +- > arch/powerpc/platforms/book3s/vas-api.c | 2 +- > arch/powerpc/platforms/pseries/vas.c | 2 +- Acked-by: Michael Ellerman (powerpc) cheers