On Mon, 04 Mar 2019 20:05:30 +0100, Toke Høiland-Jørgensen wrote: > > Hm. I think you'll still need a lock (mutex?) on the alloc path, but > > the free path should be fine as long as you load the map pointer before > > looking at the refcnt (atomic op ensuring the barrier there). > > Yeah, for the per-namespace refcnt it's pretty straight forward, the > trouble is the global count that needs to iterate over all namespaces; > probably need to put that all behind a (non-spin)lock, right?
Because net iteration is under RCU? You can switch to taking net_rwsem for that one, no? I'm probably confused again ;)