Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1825089imm; Thu, 23 Aug 2018 09:20:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbcE+tosAI4qLxsIPr0ywYC491preYIalXzxGXVkAkpvKKlPSjXCq/OVSR87pb+hcNvtdVR X-Received: by 2002:a62:808c:: with SMTP id j134-v6mr12213659pfd.120.1535041207768; Thu, 23 Aug 2018 09:20:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535041207; cv=none; d=google.com; s=arc-20160816; b=xmkDNhC7lNYHJzWry6R53HgU5nEsYhmjL/TpzqT9NIpm9RwVE0avSwXc2/usqRf9Fh rZr8JwvmSKwXfm7ZzkEObZleD+UnRuXUQv5IDMCu0o+wxM8iI0xBK8QasgwR4lHPxuoN BSOZ43OrsiQJjycHp6Z/4lan9L27zxdmrkocqrp5312mVKrlIsFFB8Y40zjcpCa5Ilj7 jF5wnistWAPzc0rf0f9UPkanDChwjImEZMA1L5B+Z9/jG515m/sJOYI7iaTDsprLsFNE 4QoeO2TZXdJi5KVMBpzRSOt821tt2H0c3thAy+0U4FKtrqmwt4vyzXkuoNUy0G58oxM9 J+mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=8WDHspsa745ggbH8qaaLgnS9naxoOvpidgpH74VdpI0=; b=du6kBTcW1GT7ynxMq0fHUbjCIJyA+ky47x4Xx1KGZRz7aRY7FD/QCqqMoytkOL4HgF UDTf9JSr/ltdw7OhvvCIdFRZPr1xNLL8VVQpS17r9uCZCxQCW7Qwi2/TEYCEE+5+n3Hj JBzT8EUWvEDedkq+/ea+CaxTzAkvfX/TCf2HXqGE/FUDSERYe8r5WhLpd3jAtPgUez4t sOsamz7ZEAErxMaAIwmtbpVFR2BT+TigKVdTt8jYTQpqYX8ZQ+Xcf7CkwjqkAlVi6eBZ KW7I7p3oSf894Z3JdHkD3pyYj6bmNx7kKDfWXGErMaR/LVkc9xp079DgODiEL2Tk5Ntm T0dw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l17-v6si4643138pgu.79.2018.08.23.09.19.52; Thu, 23 Aug 2018 09:20:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731008AbeHWQQ3 (ORCPT + 99 others); Thu, 23 Aug 2018 12:16:29 -0400 Received: from foss.arm.com ([217.140.101.70]:46004 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729628AbeHWQQ3 (ORCPT ); Thu, 23 Aug 2018 12:16:29 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 60E69ED1; Thu, 23 Aug 2018 05:46:55 -0700 (PDT) Received: from armageddon.cambridge.arm.com (armageddon.emea.arm.com [10.4.13.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 91E1C3F5BC; Thu, 23 Aug 2018 05:46:52 -0700 (PDT) Date: Thu, 23 Aug 2018 13:46:50 +0100 From: Catalin Marinas To: Nicholas Piggin Cc: Peter Zijlstra , torvalds@linux-foundation.org, luto@kernel.org, x86@kernel.org, bp@alien8.de, will.deacon@arm.com, riel@surriel.com, jannh@google.com, ascannell@google.com, dave.hansen@intel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, David Miller , Martin Schwidefsky , Michael Ellerman , linux-arch@vger.kernel.org Subject: Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma Message-ID: <20180823124649.sopnukdu4mfz6e46@armageddon.cambridge.arm.com> References: <20180823084709.19717-1-npiggin@gmail.com> <20180823084709.19717-3-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180823084709.19717-3-npiggin@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 23, 2018 at 06:47:09PM +1000, Nicholas Piggin wrote: > The generic tlb_end_vma does not call invalidate_range mmu notifier, > and it resets resets the mmu_gather range, which means the notifier > won't be called on part of the range in case of an unmap that spans > multiple vmas. > > ARM64 seems to be the only arch I could see that has notifiers and > uses the generic tlb_end_vma. I have not actually tested it. We only care about notifiers for KVM but I think it only makes use of mmu_notifier_invalidate_range_(start|end) which are not affected by the range reset in mmu_gather. Your patch looks ok from an arm64 perspective (it would be good if Will has a look as well since he was the last to touch this part for arm64). -- Catalin