Re: [RFC net-next 2/2] net: net-sysfs: Reduce netstat_show read_lock critical section

2018-04-10 Thread David Miller
From: Saeed Mahameed Date: Tue, 10 Apr 2018 10:08:12 -0700 > Instead of holding the device chain read_lock also while calling > dev_get_stats just hold it only to check dev_isalive, if the dev is alive, > hold that dev via dev_hold then release the read_lock. > > When done

[RFC net-next 2/2] net: net-sysfs: Reduce netstat_show read_lock critical section

2018-04-10 Thread Saeed Mahameed
Instead of holding the device chain read_lock also while calling dev_get_stats just hold it only to check dev_isalive, if the dev is alive, hold that dev via dev_hold then release the read_lock. When done handling the device, dev_put it. Signed-off-by: Saeed Mahameed ---