Re: [PATCH v2] iov_iter: optimize page_copy_sane()

From: Al Viro
Date: Tue Feb 26 2019 - 14:04:42 EST


On Tue, Feb 26, 2019 at 10:42:39AM -0800, Eric Dumazet wrote:
> Avoid cache line miss dereferencing struct page if we can.
>
> page_copy_sane() mostly deals with order-0 pages.
>
> Extra cache line miss is visible on TCP recvmsg() calls dealing
> with GRO packets (typically 45 page frags are attached to one skb).
>
> Bringing the 45 struct pages into cpu cache while copying the data
> is not free, since the freeing of the skb (and associated
> page frags put_page()) can happen after cache lines have been evicted.

Applied.