On Wed, 2017-02-15 at 11:07 +0000, Anoob Soman wrote:
> On 13/02/17 14:50, Anoob Soman wrote:
> > On 13/02/17 14:26, Eric Dumazet wrote:
> >> On Mon, 2017-02-13 at 13:28 +0000, Anoob Soman wrote:
> >>
> >>> Wouldn't it be easier to call synchronize_net(), before calling
> >>> fanout_release_data() and kfree(f).
> >>> The behavior, wrt synchronize_net, would be same as before and
> >>> fanout_release() will cleanup everything without leaving any residue.
> >> So we would require two synchronize_net() calls instead of one ?
> >>
> >> synchronize_net() is very expensive on some hosts, it is a big hammer.
> >>
> >>
> >>
> >
> > Yes, one before fanout_release_data() (will be called only if 
> > fanout->sk_ref == 0) and one after fanout_release().
> >
> > I understand synchronize_net() is expensive, but adding another 
> > synchronize_net(),  before fanout_release_data(), will be no different 
> > from what we have in the existing code.
> >
> > I can also make sure second synchronize_net() doesn't get called 
> > again, if fanout_release() calls synchronize_net(), by making 
> > fanout_release() return something to indicate it has done 
> > synchronize_net().
> 
> Hi Eric,
> 
> Did you get a chance to looks at my comments ?

You misunderstood my suggestion. 

I simply suggested to move the code, not adding another
synchronize_net()



Reply via email to