NetBSD-Bugs archive

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

re: kern/49305: deadlocks on sparc64 SMP



> >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