From: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
linux-pm@lists.linux-foundation.org, a.p.zijlstra@chello.nl,
ego@in.ibm.com, mingo@elte.hu, andi@firstfloor.org,
venkatesh.pallipadi@intel.com, vatsa@linux.vnet.ibm.com,
arjan@infradead.org, svaidy@linux.vnet.ibm.com
Subject: Re: [v3 PATCH 4/4] timers: logic to move non pinned timers
Date: Mon, 30 Mar 2009 10:30:50 +0530 [thread overview]
Message-ID: <20090330050050.GA7494@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0903171350020.29264@localhost.localdomain>
* Thomas Gleixner <tglx@linutronix.de> [2009-03-17 14:01:00]:
> On Tue, 17 Mar 2009, Arun R Bharadwaj wrote:
> > * Thomas Gleixner <tglx@linutronix.de> [2009-03-17 11:22:24]:
> > > Let's assume we are on CPU0 and try to enqueue the timer on CPU1,
> > > where the next timer expiry is 5ms away. The timer which we enqueue
> > > is due in 500us. So you introduce 4.5ms latency.
> > >
> > We are moving timers to the ilb which wakes up every jiffy.
> > So we can move the timer to the ilb only if it's expiry
> > time is greater than 1 jiffy. Else we can fire on the same CPU.
>
> Please do not start to add some obscure jiffies magic. The correct
> check is whether the new timers expiry time is before the first timers
> expiry time on the target CPU.
>
Hi Thomas,
Currently, there is a function get_next_timer_interrupt() which
returns the next timer's expiry on the CPU. This is used by
tick_nohz_stop_sched_tick() in order to reprogram the timer device
before stopping the tick.
get_next_timer_interrupt() returns the earliest between the
next timer expiry and the next hrtimer expiry.
In case of the hrtimer expiry, the ktime is rounded off to the next
jiffie and returned.
So using the current infrastructure, there is no benefit in finding
out when the next timer is going to fire on the target cpu over just
checking if the current hrtimer which we are migrating is firing
before the next jiffie or not. If it is firing after 1 jiffie, it can
be migrated and the target cpu (idle load balancer) will reprogram
its timer device accordingly.
--arun
> Thanks,
>
> tglx
next prev parent reply other threads:[~2009-03-30 5:01 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-16 11:10 [v3 PATCH 0/4] timers: Framework for migration of timers Arun R Bharadwaj
2009-03-16 11:12 ` [v3 PATCH 1/4] timers: Framework for identifying pinned timers Arun R Bharadwaj
2009-03-16 11:12 ` Arun R Bharadwaj
2009-03-16 11:13 ` [v3 PATCH 2/4] timers: Identifying the existing " Arun R Bharadwaj
2009-03-17 13:07 ` Thomas Gleixner
2009-03-18 4:36 ` Arun R Bharadwaj
2009-03-18 4:36 ` Arun R Bharadwaj
2009-03-17 13:07 ` Thomas Gleixner
2009-03-16 11:13 ` Arun R Bharadwaj
2009-03-16 11:14 ` [v3 PATCH 3/4] timers: /proc/sys sysctl hook to enable timer migration Arun R Bharadwaj
2009-03-16 11:14 ` Arun R Bharadwaj
2009-03-16 15:29 ` Alexey Dobriyan
2009-03-17 10:13 ` Ingo Molnar
2009-03-17 10:13 ` Ingo Molnar
2009-03-16 15:29 ` Alexey Dobriyan
2009-03-16 11:15 ` [v3 PATCH 4/4] timers: logic to move non pinned timers Arun R Bharadwaj
2009-03-17 10:22 ` Thomas Gleixner
2009-03-17 10:22 ` Thomas Gleixner
2009-03-17 11:45 ` Arun R Bharadwaj
2009-03-17 13:01 ` Thomas Gleixner
2009-03-30 5:00 ` Arun R Bharadwaj [this message]
2009-03-30 5:00 ` Arun R Bharadwaj
2009-03-17 13:01 ` Thomas Gleixner
2009-03-17 11:45 ` Arun R Bharadwaj
2009-03-16 11:15 ` Arun R Bharadwaj
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=20090330050050.GA7494@linux.vnet.ibm.com \
--to=arun@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=andi@firstfloor.org \
--cc=arjan@infradead.org \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mingo@elte.hu \
--cc=svaidy@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=vatsa@linux.vnet.ibm.com \
--cc=venkatesh.pallipadi@intel.com \
/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.