From: Nishanth Aravamudan <nacc@us.ibm.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>,
Con Kolivas <kernel@kolivas.org>,
Russell King <rmk+lkml@arm.linux.org.uk>,
linux-kernel@vger.kernel.org, akpm@osdl.org,
ck list <ck@vds.kolivas.org>,
schwidefsky@de.ibm.com
Subject: Re: [PATCH 1/3] dynticks - implement no idle hz for x86
Date: Thu, 8 Sep 2005 15:08:54 -0700 [thread overview]
Message-ID: <20050908220854.GE2997@us.ibm.com> (raw)
In-Reply-To: <20050908212213.GB2997@us.ibm.com>
On 08.09.2005 [14:22:13 -0700], Nishanth Aravamudan wrote:
> On 08.09.2005 [13:00:36 +0300], Tony Lindgren wrote:
> > * Nishanth Aravamudan <nacc@us.ibm.com> [050907 18:07]:
> > > On 07.09.2005 [10:37:43 +0300], Tony Lindgren wrote:
> > > > * Nishanth Aravamudan <nacc@us.ibm.com> [050905 20:02]:
> > > > > On 05.09.2005 [10:27:05 +0300], Tony Lindgren wrote:
> > > > > > * Srivatsa Vaddagiri <vatsa@in.ibm.com> [050905 10:03]:
> > > > > > > On Sun, Sep 04, 2005 at 01:10:54PM -0700, Nishanth Aravamudan wrote:
> > > > > > > >
> > > > > > > > Also, I am a bit confused by the use of "dynamic-tick" to describe these
> > > > > > > > changes. To me, these are all NO_IDLE_HZ implementations, as they are
> > > > > > > > only invoked from cpu_idle() (or their equivalent) routines. I know this
> > > > > > > > is true of s390 and the x86 code, and I believe it is true of the ARM
> > > > > > > > code? If it were dynamic-tick, I would think we would be adjusting the
> > > > > > > > timer interrupt frequency continuously (e.g., at the end of
> > > > > > > > __run_timers() and at every call to {add,mod,del}_timer()). I was
> > > > > > > > working on a patch which did some renaming to no_idle_hz_timer, etc.,
> > > > > > > > but it's mostly code churn :)
> > > > > > >
> > > > > > > Yes, the name 'dynamic-tick' is misleading!
<snipping much useful feedback and many constructive conversations>
So, after *all* that, I'm going back to dyntick (notice no hyphen though
:-P). Everyone ok with this doc?
Thanks,
Nish
- include/linux/dyntick.h
with definitions in kernel/dyntick.c
#define DYN_TICK_ENABLED (1 << 1)
#define DYN_TICK_SUITABLE (1 << 0)
#define DYN_TICK_MIN_SKIP 2
/* Abstraction of a dynamic tick source
* @state: current state
* @max_skip: current maximum number of jiffies to program h/w to skip
* @min_skip: current minimum number of jiffies to program h/w to skip
* @init: initialization routine
* @enable_dyn_tick: called via sysfs to enable interrupt skipping
* @disable_dyn_tick: called via sysfs to disable interrupt
* skipping
* @reprogram: actually interact with h/w, return number of ticks the
* h/w will skip
* @recover_time: handler for returning from skipped ticks and keeping
* time consistent
* @enter_all_cpus_idle: last cpu to go idle calls this, which should
* disable any timer source (e.g. PIT on x86)
* @exit_all_cpus_idle: first cpu to wake after @enter_all_cpus_idle has
* been called should use this to revert the
* effects of that function
*/
struct dyntick_timer {
unsigned int state;
unsigned long max_skip;
unsigned long min_skip;
int (*init) (void);
void (*enable_dyn_tick) (void);
void (*disable_dyn_tick) (void);
unsigned long (*reprogram) (unsigned long); /* return number of ticks skipped */
unsigned long (*recover_time) (int, void *, struct pt_regs *); /* handler in arm */
/* following empty in UP */
void (*enter_all_cpus_idle) (int);
void (*exit_all_cpus_idle) (int);
spinlock_t lock;
};
extern void dyntick_timer_register(struct dyntick_timer *new_dyntick_timer);
/* so do we need this?
Maybe it can just be static to dyntick.c and all the callable
functions will call-down to the structure members? */
extern struct dyntick_timer *current_dyntick_timer;
#ifdef CONFIG_NO_IDLE_HZ /* which means CONFIG_DYNTICK is also on */
extern void set_dyntick_max_skip(unsigned long max_skip);
extern void set_dyntick_min_skip(unsigned long min_skip);
/* return number of ticks skipped, as we can request any number
called from cpu_idle() in dyntick-enabled arch's */
extern unsigned long reprogram_dyntick(void);
extern struct tick_source * __init arch_select_tick_source(void);
/* calls select_tick_source(), then calls tick_source_register() */
extern void __init dyn_tick_init(void);
static inline int dyn_tick_enabled(void)
{
return (current_ticksource->state & DYN_TICK_ENABLED);
}
#else /* CONFIG_NO_IDLE_HZ */
static inline void set_tick_max_skip(unsigned long max_skip)
{
}
static inline void idle_reprogram_tick(void)
{
}
static inline unsigned long reprogram_tick(void)
{
return 0;
}
static inline void dyn_tick_init(void)
{
}
static inline int dyn_tick_enabled(void)
{
return 0;
}
#endif /* CONFIG_NO_IDLE_HZ */
/* Pick up arch specific header */
#include <asm/dyntick.h>
- timer.c / timer.h
/* moved from sched.c/.h */
cpumask_t no_idle_hz_cpumask;
- each arch-specific file pair needs to provide:
arch_select_tick_source();
an appropriate struct tick_source definitions, functions, etc. per
usable h/w
- include/asm-i386/dyntick.h
with defines in arch/i386/dyntick.c
/* basically already done */
- include/asm-arm/arch-omap/dyntick.h
with definitions in arch/arm/mach-omap/dyntick.c
- include/asm-s390/dyntick.h
with definitions in arch/s390/dyntick.c
next prev parent reply other threads:[~2005-09-08 22:08 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-31 16:58 Updated dynamic tick patches Srivatsa Vaddagiri
2005-08-31 17:12 ` [PATCH 1/3] Updated dynamic tick patches - Fix lost tick calculation in timer_pm.c Srivatsa Vaddagiri
2005-08-31 22:36 ` Zachary Amsden
2005-08-31 22:47 ` john stultz
2005-09-02 15:43 ` [PATCH 1/3] dynticks - implement no idle hz for x86 Con Kolivas
2005-09-02 15:45 ` [PATCH 2/3] dyntick - Fix lost tick calculation in timer pm.c Con Kolivas
2005-09-02 15:46 ` [PATCH 3/3] dyntick - Recover walltime upon wakeup Con Kolivas
2005-09-02 17:25 ` [PATCH 2/3] dyntick - Fix lost tick calculation in timer pm.c Srivatsa Vaddagiri
2005-09-02 20:18 ` Thomas Schlichter
2005-09-02 21:21 ` john stultz
2005-09-02 16:56 ` [PATCH 1/3] dynticks - implement no idle hz for x86 Russell King
2005-09-02 17:12 ` Srivatsa Vaddagiri
2005-09-03 6:13 ` Con Kolivas
2005-09-03 7:58 ` Russell King
2005-09-03 8:01 ` Con Kolivas
2005-09-03 8:06 ` Russell King
2005-09-03 8:14 ` Con Kolivas
2005-09-04 20:10 ` Nishanth Aravamudan
2005-09-04 20:26 ` Russell King
2005-09-04 20:37 ` Nishanth Aravamudan
2005-09-04 21:17 ` Russell King
2005-09-05 3:08 ` Con Kolivas
2005-09-05 16:28 ` Nishanth Aravamudan
2005-09-05 6:58 ` Tony Lindgren
2005-09-05 16:30 ` Nishanth Aravamudan
2005-09-04 20:41 ` Nishanth Aravamudan
2005-09-05 5:32 ` Srivatsa Vaddagiri
2005-09-05 5:48 ` Nishanth Aravamudan
2005-09-05 6:32 ` Srivatsa Vaddagiri
2005-09-05 6:44 ` Nishanth Aravamudan
2005-09-06 20:51 ` Nishanth Aravamudan
2005-09-07 8:13 ` Tony Lindgren
2005-09-07 15:00 ` Nishanth Aravamudan
2005-09-07 15:53 ` Nishanth Aravamudan
2005-09-07 17:07 ` Srivatsa Vaddagiri
2005-09-07 17:23 ` Nishanth Aravamudan
2005-09-07 18:14 ` Srivatsa Vaddagiri
2005-09-07 18:22 ` Nishanth Aravamudan
2005-09-07 16:14 ` Bill Davidsen
2005-09-07 16:42 ` Nish Aravamudan
2005-09-07 17:17 ` Srivatsa Vaddagiri
2005-09-07 17:27 ` Nish Aravamudan
2005-09-07 18:18 ` Srivatsa Vaddagiri
2005-09-07 18:33 ` Nish Aravamudan
2005-09-09 16:27 ` Bill Davidsen
2005-09-05 7:37 ` Russell King
2005-09-05 7:49 ` Srivatsa Vaddagiri
2005-09-05 8:00 ` Russell King
2005-09-05 16:33 ` Nishanth Aravamudan
2005-09-05 7:00 ` Srivatsa Vaddagiri
2005-09-05 7:27 ` Tony Lindgren
2005-09-05 17:02 ` Nishanth Aravamudan
2005-09-07 7:37 ` Tony Lindgren
2005-09-07 15:05 ` Nishanth Aravamudan
2005-09-08 10:00 ` Tony Lindgren
2005-09-08 21:22 ` Nishanth Aravamudan
2005-09-08 22:08 ` Nishanth Aravamudan [this message]
2005-09-09 22:30 ` Nishanth Aravamudan
2005-09-20 11:06 ` Srivatsa Vaddagiri
2005-09-20 14:58 ` Nishanth Aravamudan
2005-09-22 13:38 ` Martin Schwidefsky
2005-09-22 14:52 ` Nishanth Aravamudan
2005-09-22 18:32 ` Srivatsa Vaddagiri
2005-09-26 15:08 ` Srivatsa Vaddagiri
2005-09-23 6:55 ` Srivatsa Vaddagiri
2005-09-05 7:44 ` Russell King
2005-09-05 8:19 ` Srivatsa Vaddagiri
2005-09-05 8:32 ` Russell King
2005-09-05 9:24 ` Srivatsa Vaddagiri
2005-09-05 17:06 ` Nishanth Aravamudan
2005-09-05 17:04 ` Nishanth Aravamudan
2005-09-05 17:27 ` Srivatsa Vaddagiri
2005-09-05 18:06 ` Nishanth Aravamudan
2005-09-05 13:19 ` Srivatsa Vaddagiri
2005-09-05 16:57 ` Nishanth Aravamudan
2005-09-05 17:25 ` Srivatsa Vaddagiri
2005-09-05 18:11 ` Nishanth Aravamudan
2005-09-03 4:05 ` [PATCH 1/3] Updated dynamic tick patches - Fix lost tick calculation in timer_pm.c Lee Revell
2005-09-03 4:18 ` Peter Williams
2005-09-03 4:34 ` Lee Revell
2005-09-03 4:48 ` Peter Williams
2005-09-03 5:15 ` Parag Warudkar
2005-09-03 5:30 ` Lee Revell
2005-09-03 5:20 ` Srivatsa Vaddagiri
2005-09-06 10:32 ` Pavel Machek
2005-09-06 10:46 ` Srivatsa Vaddagiri
2005-09-06 18:04 ` john stultz
2005-08-31 17:26 ` [PATCH 2/3] Updated dynamic tick patches - Cleanup Srivatsa Vaddagiri
2005-08-31 17:27 ` [PATCH 3/3] Updated dynamic tick patches - Recover walltime upon wakeup Srivatsa Vaddagiri
2005-09-01 5:23 ` Updated dynamic tick patches Con Kolivas
2005-09-01 13:07 ` Tony Lindgren
2005-09-01 13:19 ` David Weinehall
2005-09-01 13:46 ` Tony Lindgren
2005-09-01 14:11 ` Srivatsa Vaddagiri
2005-09-02 17:34 ` Srivatsa Vaddagiri
2005-09-03 10:16 ` Tony Lindgren
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=20050908220854.GE2997@us.ibm.com \
--to=nacc@us.ibm.com \
--cc=akpm@osdl.org \
--cc=ck@vds.kolivas.org \
--cc=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=schwidefsky@de.ibm.com \
--cc=tony@atomide.com \
--cc=vatsa@in.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome