Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2838634ybl; Mon, 19 Aug 2019 08:12:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAILK4hr9fi4K0EFczEHKXt8FZL/c+RohiHh5qQpvSO4d1hWRWnG65QextCqjxOIAyl9Da X-Received: by 2002:a65:64c5:: with SMTP id t5mr21007975pgv.168.1566227577030; Mon, 19 Aug 2019 08:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566227577; cv=none; d=google.com; s=arc-20160816; b=Z+iwX5fqFIA+OLrH3cyoLjYMY3u0H08HLfWB7Ci0yr1Uz6MCFpBjvq379CUOarNmwU WJ/6FPe7Txq+YkkuYmYIEL8Qgh8SdW4OW0vmklRUAkHPsywZI61XPFid8yEr2rl5Hqql TEjnOJJbIan5shSpxSKuKUwQqZnKVkM/0GuPCmQ7RlP4DZtXn/EWQHFCLCtHAFE+S01/ O00x+GJBIyIwu1NUXC9OPsZ5RDC5BARMK/rSVzymG+pWKZtQVotRQyC0oVGl97dWLW4m GjbIBTlqEWFEQm02UZmjpLV6kA2Fk33/OKi6RxiXyqLvYC+m7XGLkvt0rAk1VQuD+Hjb UtVg== 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=HW4M4KPv5HQ10o8xRB6hJNV7XirtWCleyl6Tt9Hy3MY=; b=td/Bcd3hRtQ5YswcaQAr9clP7UtTQgnLzXjgiYX4Ec0IX9ZKnN4bsnkZH5fpLimnEB 1t0LwJXQeuSMSnzqBjrYj0vYCXLMht18DY1WPXkc4GKtkB5NlRkvxjw73LgzTAb3mCQl m2gGwCvIBK77YD7fmFCvG+TVI/4zQUOL+0V7mELt/ObwR4YgKWjSY/wY62PprvdE/fhe XIq8rnRrqlQB1d/T1XcEZQ0fIbo5Dplp3ipvvKlymqkZxpRprUSd/+Ohk2PJhtN9OyXk NgB6qfx74oSH1cTcU3WpprkiXMfDPLonoZDTUviYLzABE5MbTwmQPckTbfcrozFt7zIx WyQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=B6usA2+b; 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 v11si9826306plp.304.2019.08.19.08.12.39; Mon, 19 Aug 2019 08:12:57 -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=bombadil.20170209 header.b=B6usA2+b; 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 S1727497AbfHSPKZ (ORCPT + 99 others); Mon, 19 Aug 2019 11:10:25 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:56406 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726343AbfHSPKY (ORCPT ); Mon, 19 Aug 2019 11:10:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=HW4M4KPv5HQ10o8xRB6hJNV7XirtWCleyl6Tt9Hy3MY=; b=B6usA2+bsksWzZiQgDWvkY2Fo 0ZSVtHgqyF8TfbpsZnYbJh4iBJNbJ6q3TLsu4tEEvQxXppCdFQrrdGn1dkOolmL9KnBZ/5d0kiI5h yyBqgN7KAeOJzFv8c+lHJfwtA/YWPgo7QcMQ1PuWbwTTW5lySkm6/QuozuiXMiHXo0jYURlCj3BEL fpE3z0sU1wRzxnoJ6o1BzGeN1TYDU3tk03IsiqnX7KZy/20ZGhmdGdTvC6ICkwlB3jFQ+SO9NxWJl /J5MUZkXbOS8K9eDSFL8zLrd2H4lxVHpCxuVWN59FZ7mOY6ehW22yB1qyplkjQ0gPS7h228/AFhwy TqWpWuGzw==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hzjIX-0002Hg-IY; Mon, 19 Aug 2019 15:10:17 +0000 Date: Mon, 19 Aug 2019 08:10:17 -0700 From: "hch@infradead.org" To: Anup Patel Cc: "hch@infradead.org" , Atish Patra , "aou@eecs.berkeley.edu" , "gregkh@linuxfoundation.org" , Anup Patel , "linux-kernel@vger.kernel.org" , "alexios.zavras@intel.com" , "palmer@sifive.com" , "paul.walmsley@sifive.com" , "linux-riscv@lists.infradead.org" , "allison@lohutok.net" Subject: Re: [PATCH] RISC-V: Issue a local tlb flush if possible. Message-ID: <20190819151015.GA3316@infradead.org> References: <20190810014309.20838-1-atish.patra@wdc.com> <20190812145631.GC26897@infradead.org> <20190813143027.GA31668@infradead.org> <3f55d5878044129a3cbb72b13b712e9a1c218dc7.camel@wdc.com> <20190819144627.GA27061@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 19, 2019 at 08:39:02PM +0530, Anup Patel wrote: > If we were using ASID then yes we don't need to flush anything > but currently we don't use ASID due to lack of HW support and > HW can certainly do speculatively page table walks so flushing > local TLB when MM mask is empty might help. > > This just my theory and we need to stress test more. Well, when we context switch away from a mm we always flush the local tlb. So either the mm_struct has never been scheduled in, or we alrady did a local_tlb_flush and we context switched it up.