Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3684483ybl; Tue, 20 Aug 2019 00:17:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqw88U1POyur8JOR01IgpeiHsVkMAJbsaQeo2Qj01sxBJ+d/ol91IRZnYaDY7SRGzNve9TIY X-Received: by 2002:a17:902:2bcb:: with SMTP id l69mr24601600plb.282.1566285455775; Tue, 20 Aug 2019 00:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566285455; cv=none; d=google.com; s=arc-20160816; b=lvcGVS2qLlpssN0gt7lkl4/rtgsRXpXWfbxHV+oO5BbBBm+5Z5Wpmmvm8GnXQcqLiV 3qbNUaU7UMLqN9R4Ch1cYHPiavTDApBaA+YlpjerHOgiX3BS/8Uk+fMgzEJCy3I5thFZ nq03h+xtDQukWztfh9GxHUZJT4hFa6Mx6o33Dm8QgPQus41Aho+t1yqZ71D7Jstf7ohJ ScxlTO4D8E5N+/qfNlNaTE/5LHleaeLY77M2Gtk8nwMw8c+gY9s0p8UmBRFeE7iDx6r0 9gPSGP7MkUtx213U2CQTKcQfya2dPLjLD5UFAsqNO7iGxyCIF+QVuM5lan7Wi3WuiWW0 xZuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=n4QZLztq3ruyAtF7S2k1qxXFr4HyX+HJFqe4DCmr/Tw=; b=R+p7xR/6bAQYRr60ovDBtImSO3r/XHZ50aCQMhae0ONYXkfxjFg5chVwgF26bS2Fyk jh4yeAuc2BJZK+/MJ0AmwxG8ZnkKsicV15FkG+P3RX3+ZZjxxuPxRHvwPya91Vn5ahKx eq1Em5f/bPAEjtsKXpDgaXvmQLAhiBlCB28DVPTzuQVVwEAEojeIvEEI5nhXXvpvrKec ocPert22Tn634iR9m4COvHEWY/Hs8AEnCK/MfyT/9Qhw5AOAgNr9AaYniMr08Di7osh/ /LLkCQv9I/Rq94Nvrr5107z1HFIJBKN3rcpVobFi9GAMlfnI3hUw4lmqWRS11vVeMSyb zLtA== 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 bg5si10780858plb.46.2019.08.20.00.17.20; Tue, 20 Aug 2019 00:17:35 -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; 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 S1729324AbfHTHPE (ORCPT + 99 others); Tue, 20 Aug 2019 03:15:04 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:33888 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726049AbfHTHPE (ORCPT ); Tue, 20 Aug 2019 03:15:04 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46CMW84G2Cz1rJh4; Tue, 20 Aug 2019 09:15:00 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46CMW83CNvz1qqkJ; Tue, 20 Aug 2019 09:15:00 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id hgek4RhEvX4I; Tue, 20 Aug 2019 09:14:59 +0200 (CEST) X-Auth-Info: cfJnge3W34ep21vK8LNYWSq+oBbl20n/Lm1XsjLjpAA2A+eyEau2plN2hZlALXyM Received: from hawking (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 20 Aug 2019 09:14:59 +0200 (CEST) From: Andreas Schwab To: "hch\@infradead.org" Cc: Atish Patra , Albert Ou , Anup Patel , Palmer Dabbelt , linux-kernel@vger.kernel.org, Paul Walmsley , linux-riscv@lists.infradead.org, Allison Randal Subject: Re: [v2 PATCH] RISC-V: Optimize tlb flush path. References: <20190820004735.18518-1-atish.patra@wdc.com> <20190820030641.GA24946@infradead.org> X-Yow: I think my CAREER is RUINED!! Date: Tue, 20 Aug 2019 09:14:58 +0200 In-Reply-To: <20190820030641.GA24946@infradead.org> (hch@infradead.org's message of "Mon, 19 Aug 2019 20:06:41 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Aug 19 2019, "hch@infradead.org" wrote: > This looks a little odd to m and assumes we never pass a size smaller > than PAGE_SIZE. Whule that is probably true, why not something like: > > if (size < PAGE_SIZE && size != -1) ITYM size <= PAGE_SIZE. And since size is unsigned it cannot be == -1 at the same time. > local_flush_tlb_page(start); > else > local_flush_tlb_all(); > > ? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."