[Devel] [PATCH rh7 v2] ve/vznetstat: Don't destroy statistics until explicitly asked

Vladimir Davydov vdavydov at parallels.com
Fri Jul 24 08:50:49 PDT 2015


On Fri, Jul 24, 2015 at 06:48:52PM +0300, Cyrill Gorcunov wrote:
> On Fri, Jul 24, 2015 at 06:39:27PM +0300, Vladimir Davydov wrote:
> > > 
> > > Yes. There might be several nets.
> > 
> > Hmm, correct. Then you'd better check this explicitly:
> > 
> > 	if (ve->ve_netns == net)
> > 		...
> > 
> > Otherwise, you can omit clearing ve->stat if you race with e.g.
> > VZCTL_TC_CLEAR_STAT, which also increments/decrements ->users.
> 
> I would rather prefer take write lock @tc_lock here.

Why?

> I'll make small fix on top of currently committed series.
> 



More information about the Devel mailing list