Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4022000ybg; Fri, 25 Oct 2019 12:12:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxP15lqW/FnWbco7TwzZ3wcVT4zz9os1WXsZYNJou1VLchTGYZyp7Xvjd1RqctRWDFVvy2H X-Received: by 2002:a17:906:b318:: with SMTP id n24mr4925558ejz.248.1572030768729; Fri, 25 Oct 2019 12:12:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572030768; cv=none; d=google.com; s=arc-20160816; b=ysWi02QtRbV7qT/hLlx9q6MzhRdrZJIMxlUpquxSbEPOGI0PXAbJwDgamUGPhm6czW nAedvu9LYBUj4X+bF0YIRB2NJ4KtR8V9F5bpMscVVi3KTQG3PkCqMfHYEkbBP+Dpthy8 uYwhXvIhrXCwQ9nIK5dyBtr9RUM2r8u6qOlJ6M5ED92v2PlVpUrLw84TOrvpoNnuw4mA IVHuOmZe8wVn/34DybGBYMZGdDuZFSz1AqzY9UwU6ajuMlZZCPnwg1/LjFpZodzfY2J8 tAUnzqXVnHZRNk7X70bqHuUJbz0VGXvuG059/waeigRv+0EeYyfy2cFfFbX0sCdOPyrx JLXQ== 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:references :message-id:in-reply-to:subject:cc:to:from:date; bh=TmtvXj61uVtrvDcgUl2XCPpZ0bHH+ZiZ5r2SqKi7bMY=; b=GdVoJCT7f0Lqr12EWorlJpS79LWYz72y6nB+8MUMwOyB4y1pkqxTXUooJb7OaFAw0a whUEjS2CHytWkDN0VdH5TIBhpy6p8tTld/OR7WJqR1ER5jqWcsjAMZ5UBufp7y/OLeh3 6kJDB+tlHwR3KXZnXGY4/NWAX+yfvyFMV5FInPEbhLvkN0F5EmPAEkdul/Lfj8SSzvtv HQUO1QwOaMjx+ChgRuME/uiHOhXDvfPnqTrW+LI40utFRB1JkPVwlfTcYX2o9qVwRPIv 43flVT0sqktSCYytKee1hpRouphIJk2T7XvoSUuYHhNwEEueOYC4pcqzyY6Bu0vUh4if L1FQ== 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 v46si1834134edc.295.2019.10.25.12.12.25; Fri, 25 Oct 2019 12:12:48 -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 S1731879AbfJXWiL (ORCPT + 99 others); Thu, 24 Oct 2019 18:38:11 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:34272 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731152AbfJXWiL (ORCPT ); Thu, 24 Oct 2019 18:38:11 -0400 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iNlk6-0002Wn-Sd; Fri, 25 Oct 2019 00:38:07 +0200 Date: Fri, 25 Oct 2019 00:38:05 +0200 (CEST) From: Thomas Gleixner To: Roman Kagan cc: Vitaly Kuznetsov , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Sasha Levin , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Michael Kelley Subject: Re: [PATCH] x86/hyper-v: micro-optimize send_ipi_one case In-Reply-To: <20191024163204.GA4673@rkaganb.sw.ru> Message-ID: References: <20191024152152.25577-1-vkuznets@redhat.com> <20191024163204.GA4673@rkaganb.sw.ru> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 24 Oct 2019, Roman Kagan wrote: > > + > > + if (cpu >= 64) > > + goto do_ex_hypercall; > > + > > + ret = hv_do_fast_hypercall16(HVCALL_SEND_IPI, vector, > > + BIT_ULL(hv_cpu_number_to_vp_number(cpu))); > > + return ((ret == 0) ? true : false); > > D'oh. Isn't "return ret == 0;" or just "return ret;" good enough? 'return ret == 0' != 'return ret' !ret perhaps :) Thanks, tglx