Messages in this thread Patch in this message | | | Date | Thu, 30 Jul 1998 09:47:49 +0200 (CEST) | From | MOLNAR Ingo <> | Subject | Re: [patch] IDE problems on SMP, fixed? (fwd) |
| |
On Wed, 29 Jul 1998, Linus Torvalds wrote:
> Hanging in irq_enter() _tends_ to mean that the local CPU has done a > global interrupt disable, and then enabled interrupts locally. BOOM. That > would certainly cause lockups, although I don't see why this would be new > behaviour: that would have been a lock-up problem since fairly long ago. > > This is fairly easy to check on: you can make "__sti" check that we don't > have the global IRQ-lock enabled by doing something like
bingo. This caught the real bug, at some point we removed the 'extra' sti() from run_task_queue(). Most code was fine but raid5.c not ... So it's not an IDE problem after all. Maybe we should leave that check in there for a few patchlevels? (patch attached) (my RAID5 SMP fixes will be in the next RAID patchset)
best would be if we could somehow track this without runtime overhead ... impossible i think :(
-- mingo
--- linux/include/asm-i386/system.h.orig Thu Jul 30 08:05:21 1998 +++ linux/include/asm-i386/system.h Thu Jul 30 09:24:58 1998 @@ -175,7 +175,13 @@ #define mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory") /* interrupt control.. */ -#define __sti() __asm__ __volatile__ ("sti": : :"memory") +#define GETEIP() ({ unsigned long eip; \ + asm volatile("movl $1f,%0\n1:":"=g" (eip)); \ + eip; }) + +extern unsigned char global_irq_holder; + +#define __sti() do { if (global_irq_holder == current->processor) printk("__sti at %08lx\n", GETEIP()); __asm__ __volatile__ ("sti": : :"memory"); } while(0) #define __cli() __asm__ __volatile__ ("cli": : :"memory") #define __save_flags(x) \ __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */ :"memory")
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
| |