NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amd64/40159: can't boot with multiple cpus anymore



The following reply was made to PR port-amd64/40159; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: port-amd64/40159: can't boot with multiple cpus anymore
Date: Thu, 7 Jan 2010 11:03:16 +0100

 This turns out to be two problems.
 
 One is the last backtrace I sent, which shows a lock order violation
 due to overoptimization in the softint dispatch code. This patch fixes
 this part:
 
 Index: kern_softint.c
 ===================================================================
 RCS file: /cvsroot/src/sys/kern/kern_softint.c,v
 retrieving revision 1.29
 diff -u -p -r1.29 kern_softint.c
 --- kern_softint.c     19 Jul 2009 10:11:55 -0000      1.29
 +++ kern_softint.c     7 Jan 2010 10:01:55 -0000
 @@ -530,6 +530,9 @@ softint_execute(softint_t *si, lwp_t *l,
                if ((sh->sh_flags & SOFTINT_MPSAFE) == 0 && !havelock) {
                        KERNEL_LOCK(1, l);
                        havelock = true;
 +              } else if ((sh->sh_flags & SOFTINT_MPSAFE) != 0 && havelock) {
 +                      KERNEL_UNLOCK_ONE(l);
 +                      havelock = false;
                }
                (*sh->sh_func)(sh->sh_arg);
        
 
 
 The other part is a over-eager uhci interrupt handler, applying the patch
 from PR 35553 fixes this.
 
 With both changes applied, I can run with all CPUs multiuser again.
 
 Martin
 


Home | Main Index | Thread Index | Old Index