public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Con Kolivas <kernel@kolivas.org>
To: linux kernel mailing list <linux-kernel@vger.kernel.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>,
	Daniel Petrini <d.pensator@gmail.com>,
	Tony Lindgren <tony@atomide.com>,
	vatsa@in.ibm.com, ck list <ck@vds.kolivas.org>,
	Pavel Machek <pavel@ucw.cz>, Adam Belay <abelay@novell.com>,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>
Subject: Re: [PATCH] i386 No Idle HZ aka dynticks 051217
Date: Mon, 19 Dec 2005 09:34:47 +1100	[thread overview]
Message-ID: <200512190934.51210.kernel@kolivas.org> (raw)
In-Reply-To: <200512190222.40399.kernel@kolivas.org>

[-- Attachment #1: Type: text/plain, Size: 2012 bytes --]

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);

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2005-12-18 22:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-18 15:19 [PATCH] i386 No Idle HZ aka dynticks 051217 Con Kolivas
2005-12-18 15:22 ` Con Kolivas
2005-12-18 22:34   ` Con Kolivas [this message]
2005-12-19  0:10     ` ACPI C-States [Was: Re: [PATCH] i386 No Idle HZ aka dynticks 051217] Dominik Brodowski
  -- strict thread matches above, loose matches on Subject: below --
2005-12-17  5:22 [PATCH] i386 No Idle HZ aka dynticks 051217 Con Kolivas

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=200512190934.51210.kernel@kolivas.org \
    --to=kernel@kolivas.org \
    --cc=abelay@novell.com \
    --cc=ck@vds.kolivas.org \
    --cc=d.pensator@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=pavel@ucw.cz \
    --cc=tony@atomide.com \
    --cc=vatsa@in.ibm.com \
    --cc=zwane@arm.linux.org.uk \
    /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