[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <64b9aba2-71c7-6e69-630e-aba995306dbf@citrix.com>
Date: Mon, 13 Feb 2017 14:50:30 +0000
From: Anoob Soman <anoob.soman@...rix.com>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: <netdev@...r.kernel.org>, <davem@...emloft.net>
Subject: Re: [PATCH net] packet: Do not call fanout_release from atomic
contexts
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().
Thanks,
Anoob.
Powered by blists - more mailing lists