Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp806399ybl; Fri, 31 Jan 2020 08:17:56 -0800 (PST) X-Google-Smtp-Source: APXvYqzON42hQpIXUyzfbuTn+M5qeK7NKx5k8XZr0JSyfmebsgHbsdtCf9vViWrZtXd1XNGe2Eah X-Received: by 2002:a9d:6f85:: with SMTP id h5mr8301179otq.19.1580487476396; Fri, 31 Jan 2020 08:17:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580487476; cv=none; d=google.com; s=arc-20160816; b=mRHyP1iQQtgPFPBQgBWEbDVIqHv3jqywdnzx5HuuzQAoBb6ZgL34O9g4MRG/OGMcFT tQ/yKJDY0Oex3f26T9a5m2u3ZbsRAovg602djb6zPOMzwSEEnNG+fixyrxr9WDUgT/m9 YwIPSL9Pr8QzimRVmQjvQLBtRXGohgdkLNcq2Ex4s3Y7EDWBpCwXhEbrx0nrrNc+m8yR oNhVgSorHFr3EDP4MPzVm4p2BJaLVZghooV1Ign4pkl9OrZwewcEOpfBzPdbsjdaTMHE +gN0Cs6866ZJeqb5ciBT2bw12Ncmlp+9ifi89DOTEDhgWK1ePPMvOSS/crJ6//BbUTux 5a1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=o5yWGjXEXWXnjLbutHUQSZ+G5ebY4nbrRZo8BmI5TZc=; b=B9tvOsAAeu2MaqgCYX9jurhfCAxN2yGQMQ6cpXCh0uW47a1poJ0lEzD91cXTCaEY7E MVa8HYDSrs0RYZ43ixH61kux8MluinRicZz8cPTIerPeb//i66mBaHImptEKqZNE6zhD N2C/fOeFopoknked/+AZPRPZDJLgr/n0g6POTcrPSEg6QLECeKHCA3sdsIQwOLW3kmS1 brZMGJctJKcTTn9+w+hRz+GSZTa3nBIrJLl1+3ZJEqCLERBxEHSmR4MHox+V6wI3nx5n bqoYH+YvbnWCcaV5t1JflU7UAG0d+ZSKxNej9EMjdodi5SohueTTmb9XRt5vxkg5BwwG /Dhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=pGR3WMix; 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 9si4311375oir.71.2020.01.31.08.17.43; Fri, 31 Jan 2020 08:17:56 -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; dkim=pass header.i=@c-s.fr header.s=mail header.b=pGR3WMix; 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 S1729273AbgAaQP3 (ORCPT + 99 others); Fri, 31 Jan 2020 11:15:29 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:1820 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729162AbgAaQP3 (ORCPT ); Fri, 31 Jan 2020 11:15:29 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 488Mkw26tmz9vBmL; Fri, 31 Jan 2020 17:15:20 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=pGR3WMix; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id WdDgEsSDAfbI; Fri, 31 Jan 2020 17:15:20 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 488Mkw10dPz9vBmJ; Fri, 31 Jan 2020 17:15:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1580487320; bh=o5yWGjXEXWXnjLbutHUQSZ+G5ebY4nbrRZo8BmI5TZc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=pGR3WMixkkpS91gWzrasTrWX98G3LrXQa6v5NyT59rI0vfjifEhWnAUX/caZAB9TZ yHdYn12Fdl4/hf0LpABTzyaGcxj9QbMhaQV2kh4LKV9cqMfJOrCAyFrA0LXr/xndfS KpddG7pYFUmX5Oz937DzgbEVVnQAdbvSCNx9xyCw= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id ADB908B8B9; Fri, 31 Jan 2020 17:15:21 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id SmoWZXSwTTAa; Fri, 31 Jan 2020 17:15:21 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 30D9C8B8B4; Fri, 31 Jan 2020 17:15:21 +0100 (CET) Subject: Re: [PATCH] powerpc/32s: Don't flush all TLBs when flushing one page To: Segher Boessenkool Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20200131155150.GD22482@gate.crashing.org> From: Christophe Leroy Message-ID: <27cef66b-df5b-0baa-abac-5532e58bd055@c-s.fr> Date: Fri, 31 Jan 2020 17:15:20 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200131155150.GD22482@gate.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 31/01/2020 à 16:51, Segher Boessenkool a écrit : > 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? > > Oops, good catch. Indeed you don't get PAGE_SIZE but (PAGE_SIZE - 1) for just one page. Christophe