diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-07-04 00:21:38 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-07-04 00:21:38 +0000 |
commit | 482bfeab4715003445dbf838bbdcce673740ff7d (patch) | |
tree | 6451e086126a6c85a8ad3c6c83f9ee58188778e2 /sys/netgraph/ng_base.c | |
parent | 240825654b391ec4881cb7faaeaae4ec983bb980 (diff) | |
download | FreeBSD-src-482bfeab4715003445dbf838bbdcce673740ff7d.zip FreeBSD-src-482bfeab4715003445dbf838bbdcce673740ff7d.tar.gz |
Remove NETISR_MPSAFE, which allows specific netisr handlers to be directly
dispatched without Giant, and add NETISR_FORCEQUEUE, which allows specific
netisr handlers to always be dispatched via a queue (deferred). Mark the
usb and if_ppp netisr handlers as NETISR_FORCEQUEUE, and explicitly
acquire Giant in those handlers.
Previously, any netisr handler not marked NETISR_MPSAFE would necessarily
run deferred and with Giant acquired. This change removes Giant
scaffolding from the netisr infrastructure, but NETISR_FORCEQUEUE allows
non-MPSAFE handlers to continue to force deferred dispatch so as to avoid
lock order reversals between their acqusition of Giant and any calling
context.
It is likely we will be able to remove NETISR_FORCEQUEUE once
IFF_NEEDSGIANT is removed, as non-MPSAFE usb and if_ppp drivers will no
longer be supported.
Reviewed by: bz
MFC after: 1 month
X-MFC note: We can't remove NETISR_MPSAFE from stable/7 for KPI reasons,
but the rest can go back.
Diffstat (limited to 'sys/netgraph/ng_base.c')
-rw-r--r-- | sys/netgraph/ng_base.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index 12256b0..1213273 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -3067,8 +3067,7 @@ ngb_mod_event(module_t mod, int event, void *data) ng_qdzone = uma_zcreate("NetGraph data items", sizeof(struct ng_item), NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0); uma_zone_set_max(ng_qdzone, maxdata); - netisr_register(NETISR_NETGRAPH, (netisr_t *)ngintr, NULL, - NETISR_MPSAFE); + netisr_register(NETISR_NETGRAPH, (netisr_t *)ngintr, NULL, 0); break; case MOD_UNLOAD: /* You can't unload it because an interface may be using it. */ |