2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 11:44:01 +08:00
linux-next/drivers/infiniband/hw
Eric Dumazet 29b4433d99 net: percpu net_device refcount
We tried very hard to remove all possible dev_hold()/dev_put() pairs in
network stack, using RCU conversions.

There is still an unavoidable device refcount change for every dst we
create/destroy, and this can slow down some workloads (routers or some
app servers, mmap af_packet)

We can switch to a percpu refcount implementation, now dynamic per_cpu
infrastructure is mature. On a 64 cpus machine, this consumes 256 bytes
per device.

On x86, dev_hold(dev) code :

before
        lock    incl 0x280(%ebx)
after:
        movl    0x260(%ebx),%eax
        incl    fs:(%eax)

Stress bench :

(Sending 160.000.000 UDP frames,
IP route cache disabled, dual E5540 @2.53GHz,
32bit kernel, FIB_TRIE)

Before:

real    1m1.662s
user    0m14.373s
sys     12m55.960s

After:

real    0m51.179s
user    0m15.329s
sys     10m15.942s

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-12 12:35:25 -07:00
..
amso1100 IB/core: Allow device-specific per-port sysfs files 2010-05-21 10:34:44 -07:00
cxgb3 RDMA/cxgb3: Turn off RX coalescing for iWARP connections 2010-09-27 09:28:55 -07:00
cxgb4 RDMA/cxgb4: Obtain RDMA QID ranges from LLD/FW 2010-08-07 23:08:47 -07:00
ehca Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 2010-08-12 09:11:31 -07:00
ipath Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2010-08-07 17:08:02 -07:00
mlx4 IB/core: Allow device-specific per-port sysfs files 2010-05-21 10:34:44 -07:00
mthca IB: Rename RAW_ETY to RAW_ETHERTYPE 2010-08-04 10:44:19 -07:00
nes net: percpu net_device refcount 2010-10-12 12:35:25 -07:00
qib IB/qib: Add missing <linux/slab.h> include 2010-08-05 14:26:58 -07:00