From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D45B0C433B4 for ; Fri, 21 May 2021 12:18:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABA6361132 for ; Fri, 21 May 2021 12:18:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231836AbhEUMUN (ORCPT ); Fri, 21 May 2021 08:20:13 -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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29E3AC433ED for ; Fri, 21 May 2021 12:21:08 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D84806023D for ; Fri, 21 May 2021 12:21:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D84806023D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CtqSWc9e7tizv4GGhEDd1L91VaceiOWWULwhcJyk/bg=; b=jzNuKyEJk9BCX8tNHuI5pcWdx5 2p9pygwlxPxGDr8gC1perHa2HHYIZ1h3IWaGjt4Be1WJRamhfzM7LtD1xKNulAsXQY38Zy3qCnVph W7qwVM3ReExh+Q84u2hN3Hpo3M0CCYLEaKHFLZLCnfdCJ1rTLWTrQODZUNhp867/TD3HojAcExnJP Nh8N06j10yTIHGkb1dLuqWJ8h2hnBvqUqKuJ/oU8OeElrJy0TAKX1FkqULHBlppYglfUY0gW3IbOA zHPRlgnHMhkoK0DTL918yPECVr/LTozTNjINScTV/d4L51E59ZX9CwiqOtGqg49aDZj5xUoAe+gwo PkeYKUpQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lk46y-005HUw-RS; Fri, 21 May 2021 12:18:41 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lk46w-005HUo-G5 for linux-arm-kernel@desiato.infradead.org; Fri, 21 May 2021 12:18:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=KmzE1BqOHypV5hv8NfU/Qs0fzQ8pXVmIPcyCGmLfwW0=; b=lSHUMvbe33f+aqe+WFKG7KjD0u UbrzgBoMCPU31qa+NEhfTIzXUJq1umzdabYbVgTz79nNLfSodP+UFDrqO36fiM7QOjS//5ZXIlYBt tVeK9ZANYmA8cLywfWcWcLX4yflE7z+4tdZJc2l8BNQ4bspjySMSGB3kaXtb2LukRobREkD90s0WF OpMVqplcXWhtC+YnwZCQL4ChR7MMK8k1zlLFmgabiWgN/Hf3XM92uoW0u3KiUIRX5ibSaeg1Mdw8d PUjpsNL13BHT/PqoBqyc/LD0UqG0nOEs+BaslYD79KvBdcMobL+b2xJFfKu/6AVj31Mg7AkfKwecS exRncy5A==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lk46t-00H5nr-SG for linux-arm-kernel@lists.infradead.org; Fri, 21 May 2021 12:18:37 +0000 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-Disposition: inline In-Reply-To: <20210521112503.GA11850@willie-the-truck> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210521_051835_951844_AD74438A X-CRM114-Status: GOOD ( 17.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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=E4 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, i= nt 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; > > = > > 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 wake= up > > 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel