[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20141001.162431.2179338820333183894.davem@davemloft.net>
Date: Wed, 01 Oct 2014 16:24:31 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: sowmini.varadhan@...cle.com
Cc: eric.dumazet@...il.com, raghuram.kothakota@...cle.com,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] sunvnet: vnet_start_xmit() must hold a
refcnt on port.
From: Sowmini Varadhan <sowmini.varadhan@...cle.com>
Date: Wed, 01 Oct 2014 16:19:41 -0400
> On 10/01/2014 04:15 PM, Eric Dumazet wrote:
>> On Wed, 2014-10-01 at 15:44 -0400, Sowmini Varadhan wrote:
>>> On (10/01/14 12:05), Eric Dumazet wrote:
>>>>
>>>> Hmpff... This calls for rcu protection here !
>>>>
>>>
>>> I did consider that, but given that the lists containing the ports are
>>> accessed in multiple contexts, some of which can sleep, and given that
>>> the vnet port is similar in spirit to the net_device, I followed the
>>> net_device model of dev_put etc.
>>
>> dev_put() uses per cpu variables, an order of magnitude faster than a
>> atomic put/get :(
>
> I could make this a per-cpu variable, it would not be too hard to
> change
> vnet_put/hold etc. That's not a problem.
If you went with NAPI you could use RCU.
All of the negative and complicated aspects of your changes strictly
have to do with not going with that implementation route.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists