NetBSD-Bugs archive

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

re: kern/49305: deadlocks on sparc64 SMP



The following reply was made to PR kern/49305; it has been noted by GNATS.

From: matthew green <mrg%eterna.com.au@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
    netbsd-bugs%netbsd.org@localhost
Subject: re: kern/49305: deadlocks on sparc64 SMP
Date: Wed, 22 Oct 2014 23:12:04 +1100

 > >Description:
 > Under load my Sun Blade 2500 will sooner or later deadlock.
 > I tracked this down to one specific commit - net/pktqueue.c -r1.7. A -current kernel with just this reversed is stable.
 > I have not seen any deadlocks on non-SMP hardware or on slower machines, like my Ultra 60.
 > >How-To-Repeat:
 > build.sh -j4 distribution with sources over nfs. Usually deadlocks within an hour, may take significantly longer.
 > >Fix:
 > downgrade net/pktqueue.c to -r1.6
 
 interesting.
 
  bool
  pktq_enqueue(pktqueue_t *pq, struct mbuf *m, const u_int hash __unused)
  {
 -       const unsigned cpuid = curcpu()->ci_index /* hash % ncpu */;
 +#ifdef _RUMPKERNEL
 +       const unsigned cpuid = curcpu()->ci_index;
 +#else
 +       const unsigned cpuid = hash % ncpu;
 +#endif
  
         KASSERT(kpreempt_disabled());
  
 i wonder if the #ifdef polarity is wrong, and we want to keep
 the prior code for the real kernel.
 
 
 .mrg.
 


Home | Main Index | Thread Index | Old Index