Re: [PATCH] prevent ia64 from invoking irq handlers on offline CPUs



On Sun, Aug 31, 2008 at 7:28 PM, Paul E. McKenney
<paulmck@xxxxxxxxxxxxxxxxxx> wrote:
Make ia64 refrain from clearing a given to-be-offlined CPU's bit in the
cpu_online_mask until it has processed pending irqs. This change
prevents other CPUs from being blindsided by an apparently offline CPU
nevertheless changing globally visible state.

Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
---

smpboot.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index bcea81e..7a90f42 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -741,8 +741,6 @@ int __cpu_disable(void)
return -EBUSY;
}

- cpu_clear(cpu, cpu_online_map);
-
if (migrate_platform_irqs(cpu)) {
cpu_set(cpu, cpu_online_map);
return (-EBUSY);
@@ -751,6 +749,7 @@ int __cpu_disable(void)
remove_siblinginfo(cpu);
cpu_clear(cpu, cpu_online_map);
fixup_irqs();
+ cpu_clear(cpu, cpu_online_map);
local_flush_tlb_all();
cpu_clear(cpu, cpu_callin_map);
return 0;

Hm. Maybe my eyes are going bad. But isn't that now clearing the cpu
both before and after calling fixup_irqs()?


Vegard

--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH] fix misplaced mb() in rcu_enter/exit_nohz()
    ... On 03/17, Paul E. McKenney wrote: ... while the rcu_start_batchexecutes on some ... Suppose that this CPU reads rcp->cur out of order. ...
    (Linux-Kernel)
  • Re: Nearly 100% CPU Usage
    ... what is the model number of this laptop? ... As Paul pointed out, ... RAM seems to show over 500 MB ... Can someone tell me if 100% CPU usage is the reason why everything ...
    (microsoft.public.windowsxp.general)
  • Re: route finder
    ... cpu. ... computer science data structures course books would mention the problem. ... Paul T. ... I believe that the only solution is to build alone me the algorithm. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Universal grammar
    ... Hans> Only you can improve your computer skills. ... Paul> Which is just one of the hardware interrupts that can be ... INTERRUPT is used by peripherals to catch the attention of the CPU, ... for such so as to coordinate the power-up sequence with other hardware. ...
    (sci.lang)
  • Re: To Context switch or Spin
    ... > core, two virtual cores. ... > FSB, steals CPU execution resources, and dirties critical OS ... Then when someone upgrades their ... Paul, ...
    (comp.programming.threads)