All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Will Deacon" <will@kernel.org>,
	"Mika Penttilä" <mika.penttila@nextfour.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Marc Zyngier <maz@kernel.org>,
	Lorenzo Colitti <lorenzo@google.com>,
	John Stultz <john.stultz@linaro.org>,
	Stephen Boyd <sboyd@kernel.org>,
	kernel-team@android.com
Subject: Re: [PATCH 3/5] tick/broadcast: Prefer per-cpu oneshot wakeup timers to broadcast
Date: Fri, 21 May 2021 15:49:39 +0200	[thread overview]
Message-ID: <87tumw9oy4.ffs@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20210521112503.GA11850@willie-the-truck>

On Fri, May 21 2021 at 12:25, 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.

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

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: "Will Deacon" <will@kernel.org>,
	"Mika Penttilä" <mika.penttila@nextfour.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Marc Zyngier <maz@kernel.org>,
	Lorenzo Colitti <lorenzo@google.com>,
	John Stultz <john.stultz@linaro.org>,
	Stephen Boyd <sboyd@kernel.org>,
	kernel-team@android.com
Subject: Re: [PATCH 3/5] tick/broadcast: Prefer per-cpu oneshot wakeup timers to broadcast
Date: Fri, 21 May 2021 15:49:39 +0200	[thread overview]
Message-ID: <87tumw9oy4.ffs@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20210521112503.GA11850@willie-the-truck>

On Fri, May 21 2021 at 12:25, 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.

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-05-21 13:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20 18:47 [PATCH 0/5] tick/broadcast: Allow per-cpu timers to be used instead of broadcast Will Deacon
2021-05-20 18:47 ` Will Deacon
2021-05-20 18:47 ` [PATCH 1/5] tick/broadcast: Drop unneeded CONFIG_GENERIC_CLOCKEVENTS_BROADCAST guard Will Deacon
2021-05-20 18:47   ` Will Deacon
2021-05-20 18:47 ` [PATCH 2/5] tick/broadcast: Split __tick_broadcast_oneshot_control() into a helper Will Deacon
2021-05-20 18:47   ` Will Deacon
2021-05-20 18:47 ` [PATCH 3/5] tick/broadcast: Prefer per-cpu oneshot wakeup timers to broadcast Will Deacon
2021-05-20 18:47   ` Will Deacon
2021-05-21  2:25   ` Mika Penttilä
2021-05-21  2:25     ` Mika Penttilä
2021-05-21 11:25     ` Will Deacon
2021-05-21 11:25       ` Will Deacon
2021-05-21 12:18       ` Will Deacon
2021-05-21 12:18         ` Will Deacon
2021-05-21 13:49       ` Thomas Gleixner [this message]
2021-05-21 13:49         ` Thomas Gleixner
2021-05-21 14:43         ` Will Deacon
2021-05-21 14:43           ` Will Deacon
2021-05-20 18:47 ` [PATCH 4/5] tick/broadcast: Program wakeup timer when entering idle if required Will Deacon
2021-05-20 18:47   ` Will Deacon
2021-05-20 18:47 ` [PATCH 5/5] timer_list: Print name of per-cpu wakeup device Will Deacon
2021-05-20 18:47   ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tumw9oy4.ffs@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=fweisbec@gmail.com \
    --cc=john.stultz@linaro.org \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo@google.com \
    --cc=maz@kernel.org \
    --cc=mika.penttila@nextfour.com \
    --cc=sboyd@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.