Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp3683453pxy; Mon, 26 Apr 2021 07:28:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzgfQhfri7jzkj7n/HuRioUWTG1HtUHYT/qdYzc8efXWcEhVQFXOsjRQoqumupPVM4Opoi X-Received: by 2002:a17:907:1183:: with SMTP id uz3mr1151742ejb.264.1619447323627; Mon, 26 Apr 2021 07:28:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619447323; cv=none; d=google.com; s=arc-20160816; b=Z9IqvhJ1Ib1MTlh3HFP3QbHTA3fTygBZfNCefiCV6xQfBbCqzV2tYuQChXjKU/ev/x yTKJfggpUUuLv4uf/g+m+t22VkG5o/LpagmTUFPpU5gUufPFsyaI40lsD5/n3OXsh2Jl QFeOrT2o1QD/nCygJcf2OqCaW3boAg8/drNLiji99Vq5BXfVVOA1KNP99VOjKRXyrmpM kpyOD0++J0hrYRbHkkgsh3xGxBlG8gCa9X9f82i6TEACoe/O+9aVWSt5TobA7BnTH2hM HN6YRR7Vn/EMW67x1rnjrWo/4FoAo3MGigZd16B0M5OSAQdhCWjPUlgyh8ieHG6OF42U f0uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=H/+k3N8n6/WIVCQu+lly6Hn9RW/dNcFcUW7Skdd63yY=; b=C3T5WvOfXKWizFstygYn5GZZPfZcuMKIcduqSH73zt70Mui15dvYeefq4jy4FfuF+9 npCCxLjwC6oebQuyDR5dPtj+O3MfcAvZCFSaxSSDzZfje4kgUKhqpqEDy66ktJiHCLom 0twd3JIj6zXUifl3gL65hx9hn+ShYqCQCvDkycTj8KSQkGr+kMMq0LEoJxfRd4IL9ki3 cqolczvnqIr0dC4VqLzvnVMUfnnVS2TLg/smd+mW0VW1brzq2LPkz+11AffCbp0ItYpp 7AVdoDL6wSdO8MODzSzJNy8C1BW/uSrTvLbCmCJeeiXSjnaN9Dz82tfCLG/4+tNrme2F Fw2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=3oFSsIXb; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v13si1331915edl.152.2021.04.26.07.28.19; Mon, 26 Apr 2021 07:28:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=3oFSsIXb; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233829AbhDZO1v (ORCPT + 99 others); Mon, 26 Apr 2021 10:27:51 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:34468 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231862AbhDZO1u (ORCPT ); Mon, 26 Apr 2021 10:27:50 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1619447228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=H/+k3N8n6/WIVCQu+lly6Hn9RW/dNcFcUW7Skdd63yY=; b=3oFSsIXbq7VNt/K6ZtQ5HZEiJUl9D+BNR34FO4CbOzC8p2hpIeNQ4CxoUygWuLruM2+MBd kAu85LRaj/bmHD6O0PObm973VNWEgwfIZM/fz9BqTBftgXHsqCJx8nQ2QTJT0EauDEXTbD +Y0gcOz6UytzkmJWZOHCdwwFmbpWipOAb8U34N7RjSnmtKQAOBXA85C3cNlrEJRJhjXgnb eJnbrNV/qJcJsWhZYs1JgdEsCu/vePkP5Xd2njipxxaviQpq0+Ty0fXgHVh5oVBMlXTog8 1WOdJgi4glg7ZdBNtRJhW2KuW2t4dD1zcI28Brr/jwfKfQnZwiV2Hv408JIytQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1619447228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=H/+k3N8n6/WIVCQu+lly6Hn9RW/dNcFcUW7Skdd63yY=; b=bta4INy9h/vbbhRmuKW/y9z6XYWf6g1F1/3c6MCvGGxQmML75ocG2dIa867/Fr3+YtAmZi PQrLtrUlLPf46MDA== To: Peter Zijlstra Cc: Lorenzo Colitti , Greg KH , Maciej =?utf-8?Q?=C5=BBenczykowski?= , Ingo Molnar , Anna-Maria Behnsen , lkml , mikael.beckius@windriver.com, Maciej =?utf-8?Q?=C5=BBenczykowski?= , Will Deacon Subject: Re: [PATCH] hrtimer: Avoid double reprogramming in __hrtimer_start_range_ns() In-Reply-To: References: <87r1jbv6jc.ffs@nanos.tec.linutronix.de> <87eef5qbrx.ffs@nanos.tec.linutronix.de> <87v989topu.ffs@nanos.tec.linutronix.de> <87sg3dtedf.ffs@nanos.tec.linutronix.de> Date: Mon, 26 Apr 2021 16:27:08 +0200 Message-ID: <87k0opt937.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 26 2021 at 14:40, Peter Zijlstra wrote: > On Mon, Apr 26, 2021 at 02:33:00PM +0200, Thomas Gleixner wrote: > >> >> + force_local = base->cpu_base == this_cpu_ptr(&hrtimer_bases); >> >> + force_local &= base->cpu_base->next_timer == timer; >> > >> > Using bitwise ops on a bool is cute and all, but isn't that more >> > readable when written like: >> > >> > force_local = base->cpu_base == this_cpu_ptr(&hrtimer_bases) && >> > base->cpu_base->next_timer == timer; >> > >> >> Which results in an extra conditional branch. > > Srlsy, compiler not smart enough? gcc 8.3 is definitely not ...