]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Use prefetchw when a write is to follow
authorTariq Toukan <tariqt@mellanox.com>
Wed, 15 Feb 2017 15:05:39 +0000 (17:05 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Sun, 30 Apr 2017 13:03:17 +0000 (16:03 +0300)
commitcd97d369694d00b675f23fe99d15c2aa94676d16
tree770ea9521b351d2277cea39662492d64d0be7156
parent769b55d62376462681f0cff5421d26be5e9c8404
net/mlx5e: Use prefetchw when a write is to follow

"prefetchw()" prefetches the cacheline for write. Use it for
skb->data, as soon we'll be copying the packet header there.

Performance:
Single-stream packet-rate tested with pktgen.
Packets are dropped in tc level to zoom into driver data-path.
Larger gain is expected for smaller packets, as less time
is spent on handling SKB fragments, making the path shorter
and the improvement more significant.

---------------------------------------------
packet size | before    | after     | gain  |
64B         | 4,113,306 | 4,778,720 |  16%  |
1024B       | 3,633,819 | 3,950,593 | 8.7%  |

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Cc: kernel-team@fb.com
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c