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)
commit2f128eb3308a74ef478286b75e26aa6d0ed3c6a6
tree6b26ad5be0c9f6b5014edeeaedcd08e7f19cf7e8
parentd8ea89fe8a49bfa18b009b16b66c137dba263f87
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