]> git.baikalelectronics.ru Git - kernel.git/commit
mvpp2: prefetch page
authorMatteo Croce <mcroce@microsoft.com>
Wed, 9 Jun 2021 13:47:14 +0000 (15:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Jun 2021 22:26:50 +0000 (15:26 -0700)
commit703e16982f0ae48d9dece74e687740b4958af6a0
tree6b26ad5be0c9f6b5014edeeaedcd08e7f19cf7e8
parenta04295b14d6a005b03ab0a12433750ae4fda15f1
mvpp2: prefetch page

Most of the time during the RX is caused by the compound_head() call
done at the end of the RX loop:

       │     build_skb():
       [...]
       │     static inline struct page *compound_head(struct page *page)
       │     {
       │     unsigned long head = READ_ONCE(page->compound_head);
 65.23 │       ldr  x2, [x1, #8]

Prefetch the page struct as soon as possible, to speedup the RX path
noticeabily by a ~3-4% packet rate in a drop test.

       │     build_skb():
       [...]
       │     static inline struct page *compound_head(struct page *page)
       │     {
       │     unsigned long head = READ_ONCE(page->compound_head);
 17.92 │       ldr  x2, [x1, #8]

Signed-off-by: Matteo Croce <mcroce@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c