Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp779761ybl; Fri, 31 Jan 2020 07:53:18 -0800 (PST) X-Google-Smtp-Source: APXvYqyk3Asve+/iwYoTzey5QsRZGZLztwdzsInqtwTIQ3yR7HBt5qNGUuAK3jfxrECX1CVVqtOZ X-Received: by 2002:a05:6830:1d4c:: with SMTP id p12mr8350231oth.198.1580485998268; Fri, 31 Jan 2020 07:53:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580485998; cv=none; d=google.com; s=arc-20160816; b=afUynjheQdDxDP1DYfIdHQ+VpezgunD1Pbr+GHiHv9+mpIL5F68oP6J9l0GTPrjiut AAu195KfLXBS7ZWOB65F7QMw/uDDeOY5vUsBMcGhfacFq6PktHweCInPVxTpBalust/O x1MfURuVMo1HSNn/CJAPZsKd4E4odxIt0ILQQykT2wiqRNSKxRP3cxQ+bwAJEVlMMZDu r5pYk7kscn175nF2M4oLneFBC/oWGD9L0wztL2wnlRQAyCVRH/DC8DRVu6GRaWta2cCG 19sqND36iSG0X5tekQkLB2QmJv5VPwpvuloywaejNfqU1oVbSAXETXDaRFY6/+P6W/WX x6Fw== 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; bh=yClAn9Luz/GlhjqVxCSsonMLZJuYgl16JUcWvav+nPw=; b=RPz958ltgxRo2mHwHAb9mHK0cwPY9JW4SIMMYvx7y+D466sWW5+bragP1JYTnv8HdQ 2oab7I5ZvtslT/6PPcfA6D8AyiqRco2pfTM5on0SI30nsOhCIXiy34Q7M3Q8x+IBpimS 1TAn+alyMdBwJBCbkJsxwBeLBVz6xJovVi2DPbVj2keHmJ6k+GK7s4IAMVdnONpv97dP 5NHcfCa1veySajWV9z5eeiIw3rUGJfOjGIQxzJGil5Otb3+j3biqcO6CX+Y18tKYdGUV 1a+ZZeLAFnn413QM0V8xbDf9jVHI1WOhxekogzTjIdjESnsYiH5NrQFfmMO4PsJpAExy 1R2g== 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 x72si4034591oia.194.2020.01.31.07.53.06; Fri, 31 Jan 2020 07:53:18 -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 S1729162AbgAaPwP (ORCPT + 99 others); Fri, 31 Jan 2020 10:52:15 -0500 Received: from gate.crashing.org ([63.228.1.57]:37726 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729030AbgAaPwP (ORCPT ); Fri, 31 Jan 2020 10:52:15 -0500 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 00VFppLM029872; Fri, 31 Jan 2020 09:51:51 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 00VFpoc1029869; Fri, 31 Jan 2020 09:51:50 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 31 Jan 2020 09:51:50 -0600 From: Segher Boessenkool To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc/32s: Don't flush all TLBs when flushing one page Message-ID: <20200131155150.GD22482@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 31, 2020 at 03:37:34PM +0000, Christophe Leroy wrote: > When the range is a single page, do a page flush instead. > + start &= PAGE_MASK; > + end = (end - 1) | ~PAGE_MASK; > if (!Hash) { > - _tlbia(); > + if (end - start == PAGE_SIZE) > + _tlbie(start); > + else > + _tlbia(); > return; > } For just one page, you get end - start == 0 actually? Segher