Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp693055ybi; Sat, 29 Jun 2019 21:30:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3T75Kkdhrk8t/o6XMhujNy9H4Li1Oj01ggv/V4wGoHamhRiE8p3DYJdz0j9GMVfHTWuz2 X-Received: by 2002:a17:90a:e397:: with SMTP id b23mr22791323pjz.140.1561869044786; Sat, 29 Jun 2019 21:30:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561869044; cv=none; d=google.com; s=arc-20160816; b=DB/6XnOmgqnVj2BQxUpCp/gKwwDJwVhe4IcEwnCXxEHb9QrMUvv1kz6rVEpv9Tq6oJ HwtnKDXFUgLEkDEVxWlka35fvlzqOpo4sJpF7+m/R3hK61QjvML//viQeOHZr62TxpTV qeYNp0jzNfsDVd4WyK2ucZ8+7jhXSBnmCHxpudFSEXj3C7b3km+sp0eCzgh1FmBRoQZP DT+sl684ki8tjclZUenVsane7/LESiGc6SZ65sbRX8itjAVw6H0//VOOLFqzrlUzkgUO VLTNpPXxDtt9OZeEadxBajXa1cU/GOyPGP7YmMGxi9IxafIw542l40nbGoYnaXLDO5eX qS4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cQSFOfkpKMob0CUu8153N6DUVyC3npdxm62i1j4VpIw=; b=Tcb6xBD8rnlIDTLjLoGpVthaRxxWWAxBPKLZWZYAZKusIyzflokOyl2ltvSuQRn9Wc kwrJI/10Sx3WnbdKPljArMz52HzafQIwM7QzcHtVpVRm4z9ynsskAlKSBbd1HlJzEc5x iwGNU1bLrcRw3B6DbMbuGSUdOPxHXgsUYPADs+AhPxOo8iltSPlBQpUaZc+9gt8VjqTE VQ36kXkDqxjU9Lik14pck+WV7Hws+j8k02UrC2uA7LWLOsUwo1IdY/JATYEGaBDmJsou Inlqr8HMkpfSb06sHLW7Px6xXBXIs1ax50ingZ/W4e3PTIRrFL7Z2lXcolOPL/j+f3Bp YzlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=j72oOEAi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h5si6628137pgs.486.2019.06.29.21.30.04; Sat, 29 Jun 2019 21:30:44 -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=pass header.i=@kernel.org header.s=default header.b=j72oOEAi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726208AbfF3EaB (ORCPT + 99 others); Sun, 30 Jun 2019 00:30:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:34542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725771AbfF3EaB (ORCPT ); Sun, 30 Jun 2019 00:30:01 -0400 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6E81F2089C for ; Sun, 30 Jun 2019 04:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561868999; bh=cQSFOfkpKMob0CUu8153N6DUVyC3npdxm62i1j4VpIw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=j72oOEAif2V94f0mwKfr5J/PRx+YFli4yICxddcq/LIiS7JQ+YKk1YGF4PSgQDKL7 IMJd+IOSbwJSo6k5b1N04qP590P8btcmtnruiRG/EpAmzvilpIrTFErZtfqeXBnnsi 04dlqRLB1LypljThQz/jstMx1/Gu9frEnC0Vy7yo= Received: by mail-wm1-f47.google.com with SMTP id n9so727523wmi.0 for ; Sat, 29 Jun 2019 21:29:59 -0700 (PDT) X-Gm-Message-State: APjAAAU/Qs/LYBXjGZdXLOqVa/fkwm+vsg9nqnOdr3UIh3ajMZkQIcH1 kgp3qsUv0KppIkqTIQn0e0sSp/43gkoFZtdIhC4= X-Received: by 2002:a1c:6545:: with SMTP id z66mr12063849wmb.77.1561868998022; Sat, 29 Jun 2019 21:29:58 -0700 (PDT) MIME-Version: 1.0 References: <20190321163623.20219-1-julien.grall@arm.com> <20190321163623.20219-12-julien.grall@arm.com> <0dfe120b-066a-2ac8-13bc-3f5a29e2caa3@arm.com> <20190621141606.GF18954@arrakis.emea.arm.com> <20190624153820.GH29120@arrakis.emea.arm.com> In-Reply-To: <20190624153820.GH29120@arrakis.emea.arm.com> From: Guo Ren Date: Sun, 30 Jun 2019 12:29:46 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC 11/14] arm64: Move the ASID allocator code in a separate file To: Catalin Marinas Cc: Julien Grall , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, aou@eecs.berkeley.edu, gary@garyguo.net, Atish Patra , hch@infradead.org, paul.walmsley@sifive.com, rppt@linux.ibm.com, linux-riscv@lists.infradead.org, Anup Patel , Palmer Dabbelt , suzuki.poulose@arm.com, Marc Zyngier , julien.thierry@arm.com, Will Deacon , christoffer.dall@arm.com, james.morse@arm.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marinas, Thx for the reply On Mon, Jun 24, 2019 at 11:38 PM Catalin Marinas wrote: > > On Mon, Jun 24, 2019 at 12:35:35AM +0800, Guo Ren wrote: > > On Fri, Jun 21, 2019 at 10:16 PM Catalin Marinas > > wrote: > > > BTW, if you find the algorithm fairly straightforward ;), see this > > > bug-fix which took a formal model to identify: a8ffaaa060b8 ("arm64: > > > asid: Do not replace active_asids if already 0"). > [...] > > Btw, Is this detected by arm's aisd allocator TLA+ model ? Or a real > > bug report ? > > This specific bug was found by the TLA+ model checker (at the time we > were actually tracking down another bug with multi-threaded CPU sharing > the TLB, bug also confirmed by the formal model). Could you tell me the ref-link about "another bug with multi-threaded CPU sharing the TLB" ? In my concept, the multi-core asid mechanism is also applicable to multi-thread shared TLB, but it will generate redundant tlbflush. From the software design logic, multi-threaded is treated as multi-cores without error, but performance is not optimized. So in my RFC PATCH: [1], I try to reduce multi-threads' tlbflush in one CPU core with the fixed cpu ID bitmap hypothesis. 1: https://lore.kernel.org/linux-csky/CAJF2gTQ0xQtQY1t-g9FgWaxfDXppMkFooCQzTFy7+ouwUfyA6w@mail.gmail.com/T/#m2ed464d2dfb45ac6f5547fb3936adf2da456cb65 -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/