Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1399013pxj; Fri, 21 May 2021 13:17:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzycbH2L5oynJ4qB8b0k9xjXQ1AQEBh6UHoMrQ1RhSj0gPnkAPL97Qih2TTI7A6P1DQQWEI X-Received: by 2002:a6b:e50d:: with SMTP id y13mr634781ioc.204.1621628235649; Fri, 21 May 2021 13:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628235; cv=none; d=google.com; s=arc-20160816; b=BrSyXxDdjiraJTUeZspr4luDIAjqUagcmYbxkFgc2Ym7okrG9l4JhGl6FFD+ZwoKGt 5f8ODLx8sWWkmK4vRb1jBnKtGW2hQJI5u67IEdH1J8MDmQ3521g0UJ8PFrN9PVoVuWgc wwyor2x8j553SuF/dAsYTfI9fuR4YnVEoQJXeKUxevBxjeMf3lCgWi3oKC3GhnLx0oB6 qkxNePkyQfVYRWx1ahi9BBHL9MXdb30FBNjyh56Zv+Ah8gYjLcrol75eceJW/qfhvHNa N2IVg5vHKTS9cM4xs6ggcSfC+44hi4y81Rym+BgcoKHklM26ddX7RnXkNfTBm5mEoVkA y1jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=HCaRskSS01bIv3f54A3vpRo8CfM3PmECUijGdGwwaZM=; b=H3ls4l0MsylCMTcsywFHI1o8JTz18v/0LK1Q4egTRWp1zipksz3qypXZoebMKeFwX9 s64V/Pa8cNEYCzW9kqBM0/kFEbRxy8+kazLrlLnG0oBwHnfUftPogsvA+G4pLm3bL+bf Wg2qxvpzPt7sykgjyXjrkFwkntg8RgUyQhMlW/DFH/XnFD6Xn20HSCw+mLXmVE1cDrQR V/5GpETJZJ0RT7XlDgJSLhgkWCaht6uYW3Tha8cgrnpmTYdqhCVNnERicLJQ9T6Yy4k7 i4fBNz6ycepihnodLIAGK0E4MHaTSgunLN6om9NThz62IEPl1VvXa1VwzPwHPTwvgENe v+Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tsNUav2D; dkim=neutral (no key) header.i=@linutronix.de; 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 p9si6504250iov.92.2021.05.21.13.17.03; Fri, 21 May 2021 13:17:15 -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=tsNUav2D; dkim=neutral (no key) header.i=@linutronix.de; 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 S235841AbhEUNvE (ORCPT + 99 others); Fri, 21 May 2021 09:51:04 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:54146 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233028AbhEUNvD (ORCPT ); Fri, 21 May 2021 09:51:03 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1621604979; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HCaRskSS01bIv3f54A3vpRo8CfM3PmECUijGdGwwaZM=; b=tsNUav2Duagwr1OktGXOly/chOAYD2bmyTPog0/54KKIKgYWZsSj/KoA1Do9CIlOHdRrAy l8Wckg+es45UV29dbhRXSgApo2+AA7VfG6Kv4QP5t2xotRhoPFrD14s879TsrebIlT2oHp bmNW0TCc/ml3Cs7HILsyp5pOHK9OrPtqv5Y8e3lTC7X0YK987RaccdtTlPYiwjKqO4KpMq +WnGTkwEG6unkbj+4hC1rK180OyD1MXnnm3yMzvzH3FbMRvu0BIFrhKb1Y5k0eOTUagNu9 AbR2TCX062iTP9D1yquicr4ZkyTLQ/IxM5ro0kAK9v0hx2uk7VbtIo+KNQZieQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1621604979; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HCaRskSS01bIv3f54A3vpRo8CfM3PmECUijGdGwwaZM=; b=rnSbMyottTAmrHZEvgHBOGGBmuadQg48n9AQwtQ/zr3dDfwTnr15r9+PCVzal5FQ9yr1WI vVjVECQFwutUJeDg== To: Will Deacon , Mika =?utf-8?Q?Penttil=C3=A4?= Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Frederic Weisbecker , Marc Zyngier , Lorenzo Colitti , John Stultz , Stephen Boyd , kernel-team@android.com Subject: Re: [PATCH 3/5] tick/broadcast: Prefer per-cpu oneshot wakeup timers to broadcast In-Reply-To: <20210521112503.GA11850@willie-the-truck> References: <20210520184705.10845-1-will@kernel.org> <20210520184705.10845-4-will@kernel.org> <20210521112503.GA11850@willie-the-truck> Date: Fri, 21 May 2021 15:49:39 +0200 Message-ID: <87tumw9oy4.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 21 2021 at 12:25, Will Deacon wrote: > On Fri, May 21, 2021 at 05:25:41AM +0300, Mika Penttil=C3=A4 wrote: >> On 20.5.2021 21.47, Will Deacon wrote: >> > /* >> > * Conditionally install/replace broadcast device >> > */ >> > -void tick_install_broadcast_device(struct clock_event_device *dev) >> > +void tick_install_broadcast_device(struct clock_event_device *dev, in= t cpu) >> > { >> > struct clock_event_device *cur =3D tick_broadcast_device.evtdev; >> > + if (tick_set_oneshot_wakeup_device(dev, cpu)) >> > + return; >> > + >> > if (!tick_check_broadcast_device(cur, dev)) >> > return; >>=20 >> Does this disable hpet registering as a global broadcast device on x86 ?= I >> think it starts with cpumask =3D cpu0 so it qualifies for a percpu wakeup >> timer. > > Well spotted, I think you're probably right. I'll try to reproduce on my > laptop to confirm, but I hadn't noticed the tricks played with the cpumask > on x86. > > I'll probably need to rework things so that we install the broadcast timer > first, but prefer global devices. HPET has cpumask(0) but does not have CLOCK_EVT_FEAT_PERCPU set. The feature flag is a clear indicator for per cpu. Thanks, tglx