Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1068518pxj; Fri, 21 May 2021 05:52:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSug4GRBITJLaHdwpwVsnLmyGR6HwpqXuZ7CShbEoiZbIuAK/xLaTemhAHkHOGbd2zE4dM X-Received: by 2002:a17:907:76b8:: with SMTP id jw24mr10128695ejc.359.1621601550682; Fri, 21 May 2021 05:52:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621601550; cv=none; d=google.com; s=arc-20160816; b=PiEADYRyjlrdcxCWB1897Mg23wVxX3LUq6vvrRa9rC+cyutoslnYuluiOSDRtN0vbg CVENZjS2AgeGALHXEgkhrWvuqgGawoKJUO9guIxQ90xxR2ctiEl2D4KSl3o2Du0/dOmc h7HaR7sppadfOfeEYU+SeIyhRIlAXP9sRQwWbey0V6xUAIWLO/BBRBqsUfG6501jifE8 3RHYU+AhcMkMM715lQ1Bb1yyuhHHo4Oe2CYD85eccg77mROe0BdFZjDqlpx0CwkLgqjY E3oEe9DAwJ5fWN/KviZljVgurEQPdL00G/GtQNs5/jTQtP4/Slg0iWCnAr2F+dUgX8hq Y+3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KmzE1BqOHypV5hv8NfU/Qs0fzQ8pXVmIPcyCGmLfwW0=; b=CId9s1254hFcwtbxdXHKZmSShS39OfVTFjSxK+QRfGSVkpGFT7TTDzYiGMxdncsLLJ Q7w7TYjad8op8LkOu98Tal8rfrbIXRgFPPVYbodsL7qn/8ZBtd0O5iZReVHWv24CLjRm qBL2qGPBqA86nFkUIUKcit0iyixgqeKQsPe70dVlD0r2BBhspRY0tvbCZZA+1Y5o6SvP zmsvm8LuLJ8CUlD8/hZDkFp0moBkgGzFkCciy3q9IxZptRFsiA+x3GoTwC89G1bH8wFa fieDK0ZRcSRiLqXpKrfFJOAwmlPl+8FnB8IXqd+McxqicQFMHtxL5w2jHasqFkWtLjpX QTnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZTsE2E1F; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l15si4939503edv.507.2021.05.21.05.52.06; Fri, 21 May 2021 05:52:30 -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=@kernel.org header.s=k20201202 header.b=ZTsE2E1F; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233231AbhEUMUL (ORCPT + 99 others); Fri, 21 May 2021 08:20:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:52738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231239AbhEUMT6 (ORCPT ); Fri, 21 May 2021 08:19:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E4CCB61132; Fri, 21 May 2021 12:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621599515; bh=KcngFT+HqIF4LaiGZA/Ukas74tflbqcyPQFr4P9o3DI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZTsE2E1FlxuGoEIdZFQfK6nFZ09pMXsK1+lDqeC+YKjS3QxSVu8zHOhjQwy5XALKm uYhvv3QRoriXJrMbbEOj6XcNYVSjA7qk5bc2dyCvCxMgm6BqV1/anpdctYb0I+ErPS buW0pfdo6MLWKDG+zt1lFUy1OFxgGMk1LV/BvhfxemJ7geDXhPv9fdKi45JH3NMvJ+ 0v6xUIoevnrpMJPMyFn5LPYKizUGGyhmZCjFAMb8/3K0KgpdXDPf74EHgXzLjQtwis o4xb7v4PCcVMcmRD+HBwwO2EDGBPCpXalFQTrNllwz/GiL7JAt8VcXH7eXjrbkCJtd 3qFc1BkCIEFXA== Date: Fri, 21 May 2021 13:18:30 +0100 From: Will Deacon To: Mika =?iso-8859-1?Q?Penttil=E4?= Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Frederic Weisbecker , Thomas Gleixner , 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 Message-ID: <20210521121830.GA11937@willie-the-truck> References: <20210520184705.10845-1-will@kernel.org> <20210520184705.10845-4-will@kernel.org> <20210521112503.GA11850@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210521112503.GA11850@willie-the-truck> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 21, 2021 at 12:25:03PM +0100, Will Deacon wrote: > On Fri, May 21, 2021 at 05:25:41AM +0300, Mika Penttil? 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, int cpu) > > > { > > > struct clock_event_device *cur = tick_broadcast_device.evtdev; > > > + if (tick_set_oneshot_wakeup_device(dev, cpu)) > > > + return; > > > + > > > if (!tick_check_broadcast_device(cur, dev)) > > > return; > > > > Does this disable hpet registering as a global broadcast device on x86 ? I > > think it starts with cpumask = 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. ... and in doing that, I noticed my module refcounting is off as well so I'll definitely be spinning a v2. Will