From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F16EC2BA83 for ; Wed, 12 Feb 2020 12:58:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C42B820659 for ; Wed, 12 Feb 2020 12:58:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZdxQ7EJb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C42B820659 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4BD696B0446; Wed, 12 Feb 2020 07:58:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 46E436B0447; Wed, 12 Feb 2020 07:58:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 35C576B0448; Wed, 12 Feb 2020 07:58:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0096.hostedemail.com [216.40.44.96]) by kanga.kvack.org (Postfix) with ESMTP id 1AB926B0446 for ; Wed, 12 Feb 2020 07:58:14 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id AEC73181AC9BF for ; Wed, 12 Feb 2020 12:58:13 +0000 (UTC) X-FDA: 76481478066.06.trail79_2aaca1c7c7328 X-HE-Tag: trail79_2aaca1c7c7328 X-Filterd-Recvd-Size: 2933 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Wed, 12 Feb 2020 12:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581512292; 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=WNE9XiYfIRFh5LYCvgVuz7J2bfIjYJxs9twoYqkH1vE=; b=ZdxQ7EJbpiWNbIWUaOYurbxF14U2pGBPxiDvTN3lFgpWNEg2d9+qAjUFNbAjKi3+o85jsD EPi10Y4eIKPhAXILx8+2couk56H9OJHM5tzee4hoAy5LPtZh7rQS1xlwVRC36XsPJ3EuQO LaqxRiizpEr43SaJujdGopd6EZ7/UVQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-416-GUBT95-nNVi27y58GnvC5Q-1; Wed, 12 Feb 2020 07:58:03 -0500 X-MC-Unique: GUBT95-nNVi27y58GnvC5Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 04ABD108F25C; Wed, 12 Feb 2020 12:58:02 +0000 (UTC) Received: from mail (ovpn-122-89.rdu2.redhat.com [10.10.122.89]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 733DC5DA7B; Wed, 12 Feb 2020 12:57:58 +0000 (UTC) Date: Wed, 12 Feb 2020 07:57:57 -0500 From: Andrea Arcangeli To: Catalin Marinas Cc: Will Deacon , Jon Masters , Rafael Aquini , Mark Salter , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/2] arm64: tlb: skip tlbi broadcast for single threaded TLB flushes Message-ID: <20200212125757.GD3699@redhat.com> References: <20200203201745.29986-1-aarcange@redhat.com> <20200203201745.29986-3-aarcange@redhat.com> <20200210175106.GA27215@arrakis.emea.arm.com> <20200210201411.GC3699@redhat.com> <20200211140025.GB153117@arrakis.emea.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200211140025.GB153117@arrakis.emea.arm.com> User-Agent: Mutt/1.13.1 (2019-12-14) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hello, On Tue, Feb 11, 2020 at 02:00:25PM +0000, Catalin Marinas wrote: > I think there is another race here. IIUC, the assumption you make is > that when mm_users <= 1 && mm_count == 1, the only active user of this > pgd/ASID is on the CPU doing the TLBI. This is not the case for > try_to_unmap() where the above condition may be true but the active > thread on a different CPU won't notice the local TLBI. The "current->mm == mm" check is what shall prevent the above. Thanks, Andrea