]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Saving mem access on data path
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>
Tue, 6 Mar 2012 04:03:34 +0000 (04:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Mar 2012 20:19:17 +0000 (15:19 -0500)
commit57c3792ed48125a43c182f8884799cdac2ddb914
tree821ec45a0319a6592603a66048700bac3b0f15bc
parent3e806ab89657e83eb9b34824708f90b4337e07c1
net/mlx4_en: Saving mem access on data path

Localized the pdev->dev, and using dma_map instead of pci_map
There are multiple map/unmap operations on data path,
optimizing those by saving redundant pointer access.
Those places were identified as hot-spots when running kernel profiling
during some benchmarks.
The fixes had most impact when testing packet rate with small packets,
reducing several % from CPU load, and in some case being the difference
between reaching wire speed or being CPU bound.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/en_rx.c
drivers/net/ethernet/mellanox/mlx4/en_tx.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h