From: Con Kolivas <kernel@kolivas.org>
To: ck@vds.kolivas.org, vatsa@in.ibm.com
Cc: tony@atomide.com, tuukka.tikkanen@elektrobit.com, akpm@osdl.org,
johnstul@us.ibm.com, linux-kernel@vger.kernel.org, ak@muc.de,
schwidefsky@de.ibm.com, george@mvista.com
Subject: Re: [ck] [PATCH] dynamic-tick patch modified for SMP
Date: Sat, 13 Aug 2005 11:35:45 +1000 [thread overview]
Message-ID: <200508131135.46558.kernel@kolivas.org> (raw)
In-Reply-To: <20050812201946.GA5327@in.ibm.com>
On Sat, 13 Aug 2005 06:19, Srivatsa Vaddagiri wrote:
> Hi,
> Here's finally the SMP changes that I had promised. The patch
> breaks the earlier restriction that all CPUs have to be idle before
> cutting of timers and now allows each idle CPU to skip ticks independent
> of others. The patch is against 2.6.13-rc6 and applies on top of Con's
> patch maintained here:
Great! Thanks.
> @@ -431,6 +425,7 @@ static void mark_offset_tsc(void)
> if (lost >= 2) {
> jiffies_64 += lost-1;
>
> +#ifndef CONFIG_NO_IDLE_HZ
> /* sanity check to ensure we're not always losing ticks */
> if (lost_count++ > 100) {
> printk(KERN_WARNING "Losing too many ticks!\n");
> @@ -446,6 +441,7 @@ static void mark_offset_tsc(void)
> /* ... but give the TSC a fair chance */
> if (lost_count > 25)
> cpufreq_delayed_get();
> +#endif
Is this sanity check also required when !dynticks_enabled() ? If so it would
be better to be just if (!dynticks_enabled())
> 21:43:36.000000000 +0530 @@ -1157,6 +1157,7 @@ next:
>
> static struct hw_interrupt_type ioapic_level_type;
> static struct hw_interrupt_type ioapic_edge_type;
> +static struct hw_interrupt_type ioapic_edge_type_irq0;
This handler is redundant in !CONFIG_NO_IDLE_HZ ? If it is, as it appears to
be, this is unnecessary extra code below in !CONFIG_NO_IDLE_HZ adding unused
branches.
> @@ -1168,15 +1169,19 @@ static inline void ioapic_register_intr(
> if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
> trigger == IOAPIC_LEVEL)
> irq_desc[vector].handler = &ioapic_level_type;
> - else
> + else if (vector)
> irq_desc[vector].handler = &ioapic_edge_type;
> + else
> + irq_desc[vector].handler = &ioapic_edge_type_irq0;
> set_intr_gate(vector, interrupt[vector]);
> } else {
> if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
> trigger == IOAPIC_LEVEL)
> irq_desc[irq].handler = &ioapic_level_type;
> - else
> + else if (irq)
> irq_desc[irq].handler = &ioapic_edge_type;
> + else
> + irq_desc[irq].handler = &ioapic_edge_type_irq0;
> set_intr_gate(vector, interrupt[irq]);
> }
> }
> @@ -1288,7 +1293,7 @@ static void __init setup_ExtINT_IRQ0_pin
> * The timer IRQ doesn't have to know that behind the
> * scene we have a 8259A-master in AEOI mode ...
> */
> - irq_desc[0].handler = &ioapic_edge_type;
> + irq_desc[0].handler = &ioapic_edge_type_irq0;
>
> /*
> * Add it to the IO-APIC irq-routing table:
> @@ -2014,6 +2019,18 @@ static struct hw_interrupt_type ioapic_l
> .set_affinity = set_ioapic_affinity,
> };
>
> +/* Needed to disable PIT interrupts when all CPUs sleep */
> +static struct hw_interrupt_type ioapic_edge_type_irq0 = {
> + .typename = "IO-APIC-edge-irq0",
> + .startup = startup_edge_ioapic,
> + .shutdown = shutdown_edge_ioapic,
> + .enable = unmask_IO_APIC_irq,
> + .disable = mask_IO_APIC_irq,
> + .ack = ack_edge_ioapic,
> + .end = end_edge_ioapic,
> + .set_affinity = set_ioapic_affinity,
> +};
Otherwise, looks good!
Cheers,
Con
next prev parent reply other threads:[~2005-08-13 1:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-12 20:19 [PATCH] dynamic-tick patch modified for SMP Srivatsa Vaddagiri
2005-08-13 1:35 ` Con Kolivas [this message]
2005-08-13 6:51 ` [ck] " Con Kolivas
2005-08-13 11:37 ` Srivatsa Vaddagiri
2005-08-13 14:53 ` Con Kolivas
2005-08-13 16:46 ` Srivatsa Vaddagiri
2005-08-14 0:18 ` Con Kolivas
2005-08-14 4:15 ` Kyle Moffett
2005-08-15 15:47 ` Srivatsa Vaddagiri
2005-08-15 16:39 ` john stultz
2005-08-16 2:11 ` Srivatsa Vaddagiri
2005-08-15 15:35 ` Srivatsa Vaddagiri
2005-08-15 16:30 ` Con Kolivas
2005-08-16 13:19 ` Srivatsa Vaddagiri
2005-08-16 13:23 ` Con Kolivas
2005-08-17 7:53 ` 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=200508131135.46558.kernel@kolivas.org \
--to=kernel@kolivas.org \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=ck@vds.kolivas.org \
--cc=george@mvista.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=tony@atomide.com \
--cc=tuukka.tikkanen@elektrobit.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