[ewg] Re: [PATCH 3/14] nes: connection manager routines

Roland Dreier rdreier at cisco.com
Thu Aug 9 10:37:10 PDT 2007


 > > +atomic_t cm_connects;
 > > +atomic_t cm_accepts;
 > > +atomic_t cm_disconnects;
 > > +atomic_t cm_closes;
 > > +atomic_t cm_connecteds;
 > > +atomic_t cm_connect_reqs;
 > > +atomic_t cm_rejects;
 > 
 > do you really want to take the hit of a LOCK prefix each time you
 > increment a stat???

I think these are once-per-connection things, so the overhead is not
that bad.  On the other hand there's probably another lock you have to
take anyway so maybe you can just define that these are protected by
some lock you take anyway.

Also, these names seem kind of generic to be global -- a nes_ prefix
is probably appropriate.

 - R.



More information about the ewg mailing list