ng_ksocket on CURRENT
Gleb Smirnoff
glebius at cell.sick.ru
Mon Jul 5 11:46:44 PDT 2004
On Mon, Jul 05, 2004 at 02:19:30PM -0400, Robert Watson wrote:
R> > yes, this thread is originating from a callout. Actually, it is
R> > impossible to reproduce this as I described in previous letter. Sorry.
R> >
R> > So you suggest to lock Giant in a callout handle? Or should we somewhat
R> > tweak ng_ksocket?
R>
R> Depends on the callout, but if it's a network-specific callout, I'd
R> suggest having callout_init() use the following logic to build the flags
R> field:
R>
R> debug_mpsafenet ? CALLOUT_MPSAFE : 0
R>
R> I.e., if we're running without debug.mpsafenet turned on, then run the
R> callout with Giant. If the callout does a lot of other stuff, I'd acquire
R> Giant conditionally (as your patch does) just around the network bits.
R> That said, I'd have Giant include all the netgraph bits, not just the
R> socket bits.
Ok, I will surround with NET_LOCK_GIANT the place of code where data
is sent towards ng_ksocket. I don't want to hold Giant during all callout
(it may be long).
--
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
More information about the freebsd-current
mailing list