]> git.baikalelectronics.ru Git - kernel.git/commit
iov_iter: optimize page_copy_sane()
authorEric Dumazet <edumazet@google.com>
Tue, 26 Feb 2019 18:42:39 +0000 (10:42 -0800)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 26 Feb 2019 19:05:20 +0000 (14:05 -0500)
commit29973ab742a881cf99c1676c9a5af3090539e84e
tree086688168650fe491deae0da957307c337bc26c5
parent0c06331de748236f4cb3f63bb0d79252221376a7
iov_iter: optimize page_copy_sane()

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.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
lib/iov_iter.c