Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6266181yba; Tue, 14 May 2019 04:52:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFF9F1PKYVgR3CQcpqYWY1b7OaXgJwK+w4aoAGogyOXouuVgb+RqEcFE3XrhAInrHgQbwn X-Received: by 2002:aa7:998d:: with SMTP id k13mr26967514pfh.217.1557834723257; Tue, 14 May 2019 04:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557834723; cv=none; d=google.com; s=arc-20160816; b=zooNpfhqWxZ5Ao1l/t47MxIXB4aWmYHJ2oNTWkqYbP8hiBZ/xOY0PgN91fXEwNEtU2 t0E+DUYEz9o1seddttCsB0gdrEQ6RjS1Y9TN7NdtIrIriq25wUuJKVWmFD37aErpDhUC 2/gmYGYULygQ/JzgaYGxjxH6kUkmJFH+kGPJpUxuKaGFXA2OkDYWN51JL/b5yTy+xN1/ gYDND1GmLHIxW2YIcmFU3Nv46on07J3gkn/PpkREKj6SkdiZmtwqHOu/u9DaM2mKE4OC UeyntCJQvkTulmSPfGk6/8WEd7KkpXjazX7Q+Np5sFMfXSPlIPyHtqNSiWhXha8FZ5xk eLdQ== 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:dkim-signature; bh=3byTOZ1Myj651NO5kaGAKud48ExIes5ZKoTARDnqAyo=; b=tvbWYe5CSJr7kvLWWoLqKMPl5EuU3y70FEZ7agJW9Py81g6nr49cKdQNdyR+/Al89y hyiNjUMlPpw9GN6Zh9Tq4e8K6/a/y72DJYlP8+S20Kmt5ZqG/2lYB6f7qHfJZ/92EQ7q 6rmzBSf5M33n8AhRzFx4xsOxmKpVKimvweBhbdflJ+8eFyoshWlI+GaxCmAA0P3PkimH DNuxnGLPbhd+eTIEPBLnUcj1VU2XWUDLKvuwbjj72ywSEq9oM3Cv4hXuuEw79i89Do/D KmOWw72xekuIizheVsHJKwiaqfL0ukGh5V8iV3RkUDUWUGUOS3KO/8wZojVdXFuv8wim RmnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=TIFvPOXm; 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 g3si17512484pfq.30.2019.05.14.04.51.48; Tue, 14 May 2019 04:52:03 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=TIFvPOXm; 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 S1726286AbfENLtc (ORCPT + 99 others); Tue, 14 May 2019 07:49:32 -0400 Received: from merlin.infradead.org ([205.233.59.134]:36228 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725893AbfENLtb (ORCPT ); Tue, 14 May 2019 07:49:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3byTOZ1Myj651NO5kaGAKud48ExIes5ZKoTARDnqAyo=; b=TIFvPOXmwezpA+bbGIElqbOPS 66JUG+655NExwAETL/RzqvHaEYb3sfEKCH39v0eO2yBmUTwYhhKH/0qL2WXRI5bXdAScd2g51vxcW j+x5oGqRAo10u1XTDs7HX1CnF5hZQV5X1VTev28CWBcT9QTCeaOuYHYwKqr3HKXig1DGDS6VFgy42 RH/v87y5MT3GWzAE7LaMPmD9eIFEkoMxeWIxz42MzdhwF9Yssn9pmMDRWrYEdskVe+PLq6DpHyUHV e4J0yibV60gN14RFX4NVqZp2TchwE2LNQZo3HGwTZbX7QiOEstYFh4hSbDe1/RAkI+LDyDilLes/f YS2aaM9pQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQVvs-0007hN-GB; Tue, 14 May 2019 11:49:20 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 441122029F877; Tue, 14 May 2019 13:49:19 +0200 (CEST) Date: Tue, 14 May 2019 13:49:19 +0200 From: Peter Zijlstra To: Nadav Amit Cc: Jan Stancek , Yang Shi , Will Deacon , "minchan@kernel.org" , "mgorman@suse.de" , "stable@vger.kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: Re: [v2 PATCH] mm: mmu_gather: remove __tlb_reset_range() for force flush Message-ID: <20190514114919.GO2589@hirez.programming.kicks-ass.net> References: <45c6096e-c3e0-4058-8669-75fbba415e07@email.android.com> <914836977.22577826.1557818139522.JavaMail.zimbra@redhat.com> <9E536319-815D-4425-B4B6-8786D415442C@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9E536319-815D-4425-B4B6-8786D415442C@vmware.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 14, 2019 at 07:21:33AM +0000, Nadav Amit wrote: > > On May 14, 2019, at 12:15 AM, Jan Stancek wrote: > > Replacing fullmm with need_flush_all, brings the problem back / reproducer hangs. > > Maybe setting need_flush_all does not have the right effect, but setting > fullmm and then calling __tlb_reset_range() when the PTEs were already > zapped seems strange. > > fullmm is described as: > > /* > * we are in the middle of an operation to clear > * a full mm and can make some optimizations > */ > > And this not the case. Correct; starting with fullmm would be wrong. For instance tlb_start_vma() would do the wrong thing because it assumes the whole mm is going away. But we're at tlb_finish_mmu() time and there the difference doesn't matter anymore. But yes, that's a wee abuse.