Re: merge bouyer-xenpvh to HEAD
Manuel Bouyer <[email protected]> Wed, 22 Apr 2020 23:11:15 +0200
| Newsgroups | gmane.os.netbsd.ports.x86-64,gmane.os.netbsd.ports.xen,gmane.os.netbsd.ports.i386 |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Apr 22, 2020 at 11:08:27PM +0200, JaromÃr Dole?ek wrote: > Le mer. 22 avr. 2020 à 22:26, Manuel Bouyer <[email protected]> a écrit : > > Maybe the backend block and network drivers too; I think they are protected > > by KERNEL_LOCK but I'm not completely sure (especially xbdback). > > xenneback processing is protected by KERNEL_LOCK, both the event > handler and the softint. So should be fine. If we get MULTIPROCESSOR > for Dom0 it's also relatively straightforward to adjust to not rely on > KERNEL_LOCK. > > xbdback is actually not MPSAFE. It runs request processing in a kernel > thread with held spinlock. The thread is created with KTHREAD_MPSAFE > and thus doesn't take KERNEL_LOCK() implicitly. Amusingly enough the > only MP-unsafe part is xbdback_iodone(), which takes KERNEL_LOCK() > explicitely, but this doesn't prevent the xbdback thread from > modifying internal state on other cpu. A quickest fix would be just to > remove the KTHREAD_MPSAFE from the thread. I'll fix this up, I'm > familiar with the area having recendly done some changes there. Good, thanks ! -- Manuel Bouyer <[email protected]> NetBSD: 26 ans d'experience feront toujours la difference --