lkml.org 
[lkml]   [2000]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] 2.4.0-testX and system utilization 99%

On Mon, 28 Aug 2000, Petr Vandrovec wrote:

> few weeks ago I reported here that SMP kernel running on UP ia32
> machine says that there is zero idle and all idle time is accounted as
> system.

> I fixed problem by adding 'from_apic' argument to
> smp_local_timer_interrupt.

thanks for tracking this down. Your patch works, but the attached solution
is i think cleaner. (it's against test7)

Ingo
--- linux/arch/i386/kernel/apic.c.orig Mon Aug 28 18:12:48 2000
+++ linux/arch/i386/kernel/apic.c Mon Aug 28 18:14:41 2000
@@ -671,14 +671,7 @@
}

#ifdef CONFIG_SMP
- /*
- * update_process_times() expects us to have done irq_enter().
- * Besides, if we don't timer interrupts ignore the global
- * interrupt lock, which is the WrongThing (tm) to do.
- */
- irq_enter(cpu, 0);
update_process_times(user);
- irq_exit(cpu, 0);
#endif
}

@@ -706,17 +699,26 @@

void smp_apic_timer_interrupt(struct pt_regs * regs)
{
+ int cpu = smp_processor_id();
+
/*
* the NMI deadlock-detector uses this.
*/
- apic_timer_irqs[smp_processor_id()]++;
+ apic_timer_irqs[cpu]++;

/*
* NOTE! We'd better ACK the irq immediately,
* because timer handling can be slow.
*/
ack_APIC_irq();
+ /*
+ * update_process_times() expects us to have done irq_enter().
+ * Besides, if we don't timer interrupts ignore the global
+ * interrupt lock, which is the WrongThing (tm) to do.
+ */
+ irq_enter(cpu, 0);
smp_local_timer_interrupt(regs);
+ irq_exit(cpu, 0);
}

/*
\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.066 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site