lkml.org 
[lkml]   [2005]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] i386 No Idle HZ aka dynticks 051217
Date
On Monday 19 December 2005 02:22, Con Kolivas wrote:
> On Monday 19 December 2005 02:19, Con Kolivas wrote:
> > Here is yet another updated version of the dynticks code.
> >
> > Changes:
> >
> > Numerous cleanups, microoptimisations and locking improvements.
> >
> > One bugfix for the next tick accounting used in early_dyn_reprogram
> >
> > I've yet to find the cause for grossly high cpu accounting on SMP. I'd
> > appreciate any help in this area as it's the last showstopper for this
> > code.
> >
> > Obvious power savings are evident on uniprocessor now in on/off
> > comparisons using pmstats.
>
> That would be dynticks-051218 I mean, sorry.

Oops, wrong locking order may cause a livelock so this patch will be needed.

Uploaded a 051218-1 patch to website with this bug fix.

http://ck.kolivas.org/patches/dyn-ticks/

Cheers,
Con

---
arch/i386/kernel/dyn-tick.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)

Index: linux-2.6.15-rc5-dt/arch/i386/kernel/dyn-tick.c
===================================================================
--- linux-2.6.15-rc5-dt.orig/arch/i386/kernel/dyn-tick.c
+++ linux-2.6.15-rc5-dt/arch/i386/kernel/dyn-tick.c
@@ -126,16 +126,14 @@ static void do_dyn_tick_interrupt(struct
{
int cpu = smp_processor_id();

+ write_seqlock(&xtime_lock);
spin_lock(&dyn_tick->lock);
if (cpus_equal(nohz_cpu_mask, cpu_online_map)) {
/* All were sleeping, recover jiffies */
int lost = cur_timer->mark_offset();

- if (lost && in_irq()) {
- write_seqlock(&xtime_lock);
+ if (lost && in_irq())
do_timer(regs);
- write_sequnlock(&xtime_lock);
- }
if (dyntick_using_lapic()) {
enable_pit_timer();
if (unlikely(lost > DYN_TICK_MAX_SKIP + 1))
@@ -145,6 +143,7 @@ static void do_dyn_tick_interrupt(struct
}
clear_nohz_cpu(cpu);
spin_unlock(&dyn_tick->lock);
+ write_sequnlock(&xtime_lock);

/* Make sure we don't miss the next timer tick */
dyn_early_reprogram(1);[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-12-18 23:38    [W:0.034 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site