ng_ksocket on CURRENT
Robert Watson
rwatson at freebsd.org
Mon Jul 5 11:20:11 PDT 2004
On Mon, 5 Jul 2004, Gleb Smirnoff wrote:
> yes, this thread is originating from a callout. Actually, it is
> impossible to reproduce this as I described in previous letter. Sorry.
>
> So you suggest to lock Giant in a callout handle? Or should we somewhat
> tweak ng_ksocket?
Depends on the callout, but if it's a network-specific callout, I'd
suggest having callout_init() use the following logic to build the flags
field:
debug_mpsafenet ? CALLOUT_MPSAFE : 0
I.e., if we're running without debug.mpsafenet turned on, then run the
callout with Giant. If the callout does a lot of other stuff, I'd acquire
Giant conditionally (as your patch does) just around the network bits.
That said, I'd have Giant include all the netgraph bits, not just the
socket bits.
Robert N M Watson FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org Principal Research Scientist, McAfee Research
More information about the freebsd-current
mailing list