Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp854368imu; Fri, 7 Dec 2018 09:55:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/VVDmgFnvBUTVq4c6HW4yg+jvxAKbbtlsUXfpkS/6ExEaW0o+tcHA/rG3P4amTQjkULJiLk X-Received: by 2002:a65:514c:: with SMTP id g12mr2758999pgq.169.1544205341034; Fri, 07 Dec 2018 09:55:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544205341; cv=none; d=google.com; s=arc-20160816; b=OSYQ0HUZfPnWaY4o0JAU4g15or6yJZLWdlWLFx/SeQw12gaxHcAp4ILzD4I+KZy07O O1/4fnG639DBNOaPhvdIKvoWBBVY5UV0AAtpJbqtM4LXl3dI6dyaaW5CJS65EOERMFdX X1Sr4N1NNHUDYHIPfBARGHR6AwfcsHSOqUfYFWq5HkC3elwvZFmdyvkqMW3aexN9thNU 2O6rmnpAi6IN096amzT1GvZJq2vLCDMk62F1isBalsTQum5gNRx6LTFp5Qzyijx/R+MK /s7ILG7gbEIccSCos83uf4kbUhdHya7U7Vu+SKNE9cOhybX4BTNkirBF4FZSKQKf70BL HHfg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=AujGriTb9C3kbnvelZAt2DHbPIU9ZYviDMpGFgEUmN0=; b=kBsYit6wfhr6hEgDiVFK/1HFCk2ZI4PVASVDlKxbQjk4z7PVTT7Hq9w1xAaibjFp4V 3tNswDiFAH1XrjhloYIkN1Vj7Vn4Uncj9wEK5cJvMTCFGwwZoLsvzoHwDwZlTJ6IkpZA PV1JfWscG81BIm9BXFDdManI1OJphiHZl1/dnczXUVr1sidMTDtU5KlD4H+MDbOREh9X LdsmNc++RBeMpZji5YHPArS1V0QGBzFZIz3b9CBQnUe9oI/2I6ld81pl5ASYC0mGB4NN KZW2h5ObeuU8YFkyRmufioIphrI5yVdsSPCfOzNBLMzqWNCRxYvPqwDJMc8/wtMzgqDR XoxA== 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 b128si3761955pfa.283.2018.12.07.09.55.25; Fri, 07 Dec 2018 09:55:41 -0800 (PST) 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 S1726260AbeLGRxK (ORCPT + 99 others); Fri, 7 Dec 2018 12:53:10 -0500 Received: from foss.arm.com ([217.140.101.70]:50670 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726137AbeLGRxK (ORCPT ); Fri, 7 Dec 2018 12:53:10 -0500 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 CB68A165C; Fri, 7 Dec 2018 09:53:09 -0800 (PST) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9B9BE3F5AF; Fri, 7 Dec 2018 09:53:09 -0800 (PST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 21FFC1AE0BA4; Fri, 7 Dec 2018 17:53:31 +0000 (GMT) Date: Fri, 7 Dec 2018 17:53:31 +0000 From: Will Deacon To: Alexander Van Brunt Cc: Ashish Mhetre , "mark.rutland@arm.com" , "linux-tegra@vger.kernel.org" , Sachin Nikam , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH V3] arm64: Don't flush tlb while clearing the accessed bit Message-ID: <20181207175330.GC11430@edgewater-inn.cambridge.arm.com> References: <1540805158-618-1-git-send-email-amhetre@nvidia.com> <20181029105515.GD14127@arm.com> <20181206191850.GC20796@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.1+30 (d10eec459b35) () Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 06, 2018 at 08:42:03PM +0000, Alexander Van Brunt wrote: > > > >?If we roll a TLB invalidation routine without the trailing DSB, what sort of > > > >?performance does that get you? > > > > > > It is not as good. In some cases, it is really bad. Skipping the invalidate was > > > the most consistent and fast implementation. > > > My problem with that is it's not really much different to just skipping the > > page table update entirely. Skipping the DSB is closer to what is done on > > x86, where we bound the stale entry time to the next context-switch. > > Which of the three implementations is the "that" and "it" in the first sentence? that = it = skipping the whole invalidation + the DSB > > Given that I already queued the version without the DSB, we have the choice > > to either continue with that or to revert it and go back to the previous > >?behaviour. Which would you prefer? > > To me, skipping the DSB is a win over doing the invalidate and the DSB because > it is faster on average. > > DSBs have a big impact on the performance of other CPUs in the inner shareable > domain because of the ordering requirements. For example, we have observed > Cortex A57s stalling all CPUs in the cluster until Device accesses complete. > > Would you be open to a patch on top of the DSB skipping patch that skips the > whole invalidate? I don't think so; we don't have an upper bound on how long we'll have a stale TLB if remove the invalidation completely. Will