[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1487166383.1311.3.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Wed, 15 Feb 2017 05:46:23 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Anoob Soman <anoob.soman@...rix.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH net] packet: Do not call fanout_release from atomic
contexts
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()
Powered by blists - more mailing lists