mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mingo@elte.hu
Cc: benh@kernel.crashing.org, a.p.zijlstra@chello.nl, efault@gmx.de,
	elendil@planet.nl, parag.warudkar@gmail.com,
	linux-kernel@vger.kernel.org, guichaz@yahoo.fr,
	andi@firstfloor.org
Subject: Re: 'global' rq->clock
Date: Sat, 03 May 2008 16:36:00 -0700 (PDT)	[thread overview]
Message-ID: <20080503.163600.93588714.davem@davemloft.net> (raw)
In-Reply-To: <20080503.160408.238581868.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Sat, 03 May 2008 16:04:08 -0700 (PDT)

> From: Ingo Molnar <mingo@elte.hu>
> Date: Sun, 4 May 2008 00:38:44 +0200
> 
> > the same bug existed on x86 too: that too does a few IPIs without 
> > irq_enter/irq_exit. We now removed the softlockup dependency so it 
> > should not be required to do an irq_enter()/exit anymore - unless the 
> > code that the IPI uses accesses jiffies. (but that would be unusual)
> 
> That move doesn't solve the problem, I'm strongly certain
> arch's still need to add the irq_{enter,exit}().
> 
> I'll revert the irq_{enter,exit}() changes on one of my
> sparc64 boxes to validate this later today.

False alarm, which is good news, thanks Ingo.  I can revert
the following it seems:

commit 2664ef44cf5053d2b7dff01cecac70bc601a5f68
Author: David S. Miller <davem@davemloft.net>
Date:   Fri Apr 25 03:11:37 2008 -0700

    [SPARC64]: Wrap SMP IPIs with irq_enter()/irq_exit().
    
    Otherwise all sorts of bad things can happen, including
    spurious softlockup reports.
    
    Other platforms have this same bug, in one form or
    another, just don't see the issue because they
    don't sleep as long as sparc64 can in NOHZ.
    
    Thanks to some brilliant debugging by Peter Zijlstra.
    
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 524b889..409dd71 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -866,14 +866,21 @@ void smp_call_function_client(int irq, struct pt_regs *regs)
 	void *info = call_data->info;
 
 	clear_softint(1 << irq);
+
+	irq_enter();
+
+	if (!call_data->wait) {
+		/* let initiator proceed after getting data */
+		atomic_inc(&call_data->finished);
+	}
+
+	func(info);
+
+	irq_exit();
+
 	if (call_data->wait) {
 		/* let initiator proceed only after completion */
-		func(info);
 		atomic_inc(&call_data->finished);
-	} else {
-		/* let initiator proceed after getting data */
-		atomic_inc(&call_data->finished);
-		func(info);
 	}
 }
 
@@ -1032,7 +1039,9 @@ void smp_receive_signal(int cpu)
 
 void smp_receive_signal_client(int irq, struct pt_regs *regs)
 {
+	irq_enter();
 	clear_softint(1 << irq);
+	irq_exit();
 }
 
 void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs)
@@ -1040,6 +1049,8 @@ void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs)
 	struct mm_struct *mm;
 	unsigned long flags;
 
+	irq_enter();
+
 	clear_softint(1 << irq);
 
 	/* See if we need to allocate a new TLB context because
@@ -1059,6 +1070,8 @@ void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs)
 	load_secondary_context(mm);
 	__flush_tlb_mm(CTX_HWBITS(mm->context),
 		       SECONDARY_CONTEXT);
+
+	irq_exit();
 }
 
 void smp_new_mmu_context_version(void)
@@ -1217,6 +1230,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs)
 {
 	clear_softint(1 << irq);
 
+	irq_enter();
+
 	preempt_disable();
 
 	__asm__ __volatile__("flushw");
@@ -1229,6 +1244,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs)
 	prom_world(0);
 
 	preempt_enable();
+
+	irq_exit();
 }
 
 /* /proc/profile writes can call this, don't __init it please. */

  reply	other threads:[~2008-05-03 23:36 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-02  0:14 Horrendous Audio Stutter - current git Parag Warudkar
2008-05-02  8:34 ` Peter Zijlstra
2008-05-02 10:32   ` Frans Pop
2008-05-02 10:35     ` Peter Zijlstra
2008-05-02 11:08       ` Peter Zijlstra
2008-05-02 11:37         ` Frans Pop
2008-05-02 11:39           ` Peter Zijlstra
2008-05-02 11:45             ` Frans Pop
2008-05-02 11:51               ` Peter Zijlstra
2008-05-02 12:06             ` Frans Pop
2008-05-02 12:22               ` Parag Warudkar
2008-05-02 13:21                 ` Dhaval Giani
2008-05-02 11:10   ` Parag Warudkar
2008-05-02 12:09     ` Mike Galbraith
2008-05-02 12:21       ` Parag Warudkar
2008-05-02 12:37         ` Mike Galbraith
2008-05-02 15:02           ` Mike Galbraith
2008-05-02 15:49             ` Frans Pop
2008-05-02 18:53               ` Frans Pop
2008-05-02 19:27                 ` Mike Galbraith
2008-05-02 19:56                   ` 'global' rq->clock (was Re: Horrendous Audio Stutter - current git) Peter Zijlstra
2008-05-02 20:38                     ` Guillaume Chazarain
2008-05-02 20:46                       ` Peter Zijlstra
2008-05-02 22:00                         ` 'global' rq->clock David Miller
2008-05-02 21:48                     ` David Miller
2008-05-02 10:09                       ` Arjan van de Ven
2008-05-04 12:12                         ` Peter Zijlstra
2008-05-02 22:07                       ` Peter Zijlstra
2008-05-03  8:28                         ` Ingo Molnar
2008-05-03  9:05                           ` David Miller
2008-05-03 10:10                             ` Ingo Molnar
2008-05-03 19:27                               ` David Miller
2008-05-03 19:37                                 ` Ingo Molnar
2008-05-03 22:30                                 ` Benjamin Herrenschmidt
2008-05-03 22:38                                   ` Ingo Molnar
2008-05-03 23:04                                     ` David Miller
2008-05-03 23:36                                       ` David Miller [this message]
2008-05-03 23:38                                         ` Ingo Molnar
2008-05-03 23:40                                           ` David Miller
2008-05-03 23:47                                             ` Ingo Molnar
2008-05-04  2:22                                     ` Benjamin Herrenschmidt
2008-05-03 19:28                               ` David Miller
2008-05-03 19:39                                 ` Ingo Molnar
2008-05-03  6:20                     ` 'global' rq->clock (was Re: Horrendous Audio Stutter - current git) Mike Galbraith
2008-05-02 19:38               ` Horrendous Audio Stutter - current git Mike Galbraith
2008-05-03  7:13           ` Frans Pop
2008-05-03  7:39             ` Mike Galbraith
2008-05-07  8:26   ` Frans Pop
2008-05-07  8:32     ` Ingo Molnar

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=20080503.163600.93588714.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=andi@firstfloor.org \
    --cc=benh@kernel.crashing.org \
    --cc=efault@gmx.de \
    --cc=elendil@planet.nl \
    --cc=guichaz@yahoo.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=parag.warudkar@gmail.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

all inboxes | Powered by JetHome®