On 04/10/2018 10:16 AM, David Miller wrote:
> 
> The tradeoff here is that now you are doing two unnecessary atomic
> operations per stats dump.
> 
> That is what the RCU lock allows us to avoid.
> 

dev_hold() and dev_put() are actually per cpu increment and decrements,
pretty cheap these days.

Problem here is that any preemption of the process holding device reference
might trigger warnings in device unregister.

Reply via email to