version 1.19, 2018/02/27 14:28:01 |
version 1.19.2.5, 2019/01/26 21:58:14 |
|
|
MP-safe components |
MP-safe components |
================== |
================== |
|
|
|
They work without the big kernel lock (KERNEL_LOCK), i.e., with NET_MPSAFE |
|
kernel option. Some components scale up and some don't. |
|
|
- Device drivers |
- Device drivers |
- vioif(4) |
- vioif(4) |
- vmx(4) |
- vmx(4) |
Line 18 MP-safe components |
|
Line 21 MP-safe components |
|
- All except for items in the below section |
- All except for items in the below section |
- Interfaces |
- Interfaces |
- gif(4) |
- gif(4) |
|
- ipsecif(4) |
- l2tp(4) |
- l2tp(4) |
- pppoe(4) |
- pppoe(4) |
- if_spppsubr.c |
- if_spppsubr.c |
Line 34 MP-safe components |
|
Line 38 MP-safe components |
|
Non MP-safe components and kernel options |
Non MP-safe components and kernel options |
========================================= |
========================================= |
|
|
|
The components and options aren't MP-safe, i.e., requires the big kernel lock, |
|
yet. Some of them can be used safely even if NET_MPSAFE is enabled because |
|
they're still protected by the big kernel lock. The others aren't protected and |
|
so unsafe, e.g, they may crash the kernel. |
|
|
|
Protected ones |
|
-------------- |
|
|
- Device drivers |
- Device drivers |
- Most drivers other than ones listed in the above section |
- Most drivers other than ones listed in the above section |
|
- Layer 4 |
|
- DCCP |
|
- SCTP |
|
- TCP |
|
- UDP |
|
|
|
Unprotected ones |
|
---------------- |
|
|
- Layer 2 |
- Layer 2 |
- ARCNET (if_arcsubr.c) |
- ARCNET (if_arcsubr.c) |
- ATM (if_atmsubr.c) |
|
- BRIDGE_IPF |
- BRIDGE_IPF |
- FDDI (if_fddisubr.c) |
- FDDI (if_fddisubr.c) |
- HIPPI (if_hippisubr.c) |
- HIPPI (if_hippisubr.c) |
Line 51 Non MP-safe components and kernel option |
|
Line 71 Non MP-safe components and kernel option |
|
- PIM |
- PIM |
- MPLS (mpls(4)) |
- MPLS (mpls(4)) |
- IPv6 address selection policy |
- IPv6 address selection policy |
- Layer 4 |
|
- DCCP |
|
- SCTP |
|
- TCP |
|
- UDP |
|
- Interfaces |
- Interfaces |
- agr(4) |
- agr(4) |
- carp(4) |
- carp(4) |
- etherip(4) |
|
- faith(4) |
- faith(4) |
- gre(4) |
- gre(4) |
- ppp(4) |
- ppp(4) |
Line 73 Non MP-safe components and kernel option |
|
Line 87 Non MP-safe components and kernel option |
|
- pf(4) |
- pf(4) |
- Others |
- Others |
- AppleTalk (sys/netatalk/) |
- AppleTalk (sys/netatalk/) |
- ATM (sys/netnatm/) |
|
- Bluetooth (sys/netbt/) |
- Bluetooth (sys/netbt/) |
- altq(4) |
- altq(4) |
- CIFS (sys/netsmb/) |
- CIFS (sys/netsmb/) |
- ISDN (sys/netisbn/) |
|
- kttcp(4) |
- kttcp(4) |
- NFS |
- NFS |
|
|
Line 103 Unfortunately some bpf_mtap on Rx are st |
|
Line 115 Unfortunately some bpf_mtap on Rx are st |
|
This is the list of the functions that have such bpf_mtap: |
This is the list of the functions that have such bpf_mtap: |
|
|
- sca_frame_process() @ sys/dev/ic/hd64570.c |
- sca_frame_process() @ sys/dev/ic/hd64570.c |
- en_intr() @ sys/dev/ic/midway.c |
|
- rxintr_cleanup() and txintr_cleanup() @ sys/dev/pci/if_lmc.c |
|
- ipr_rx_data_rdy() @ sys/netisdn/i4b_ipr.c |
|
|
|
Ideally we should make the functions run in softint somehow, but we don't have |
Ideally we should make the functions run in softint somehow, but we don't have |
actual devices, no time (or interest/love) to work on the task, so instead we |
actual devices, no time (or interest/love) to work on the task, so instead we |
Line 181 for packet transmissions, resulting in s |
|
Line 190 for packet transmissions, resulting in s |
|
the queue. We should probably design and implement an alternative queuing |
the queue. We should probably design and implement an alternative queuing |
mechanism that deals with multi-core systems at the first place, not making the |
mechanism that deals with multi-core systems at the first place, not making the |
existing ALTQ MP-safe because it's just annoying. |
existing ALTQ MP-safe because it's just annoying. |
|
|
|
Using kernel modules |
|
-------------------- |
|
|
|
Please note that if you enable NET_MPSAFE in your kernel, and you use and |
|
loadable kernel modules (including compat_xx modules or individual network |
|
interface if_xxx device driver modules), you will need to build custom |
|
modules. For each module you will need to add the following line to its |
|
Makefile: |
|
|
|
CPPFLAGS+= NET_MPSAFE |
|
|
|
Failure to do this may result in unpredictable behavior. |