On Tue, Mar 21, 2023 at 1:12 AM Coco Li lixiaoyan@google.com wrote:
From: Xiaoyan Li lixiaoyan@google.com
When compound pages are enabled, although the mm layer still returns an array of page pointers, a subset (or all) of them may have the same page head since a max 180kb skb can span 2 hugepages if it is on the boundary, be a mix of pages and 1 hugepage, or fit completely in a hugepage. Instead of referencing page head on all page pointers, use page length arithmetic to only call page head when referencing a known different page head to avoid touching a cold cacheline.
Reviewed-by: Eric Dumazet edumazet@google.com