selftests: net: tcp_mmap: Use huge pages in receive path
authorEric Dumazet <edumazet@google.com>
Thu, 20 Aug 2020 17:11:18 +0000 (10:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Aug 2020 23:14:53 +0000 (16:14 -0700)
commit59c0d31988fb366189502a8ac66b7fe1486b7e40
tree3f43cd2e8b31e71ea928e603bf87a27c0da90797
parent72653ae5303c626ca29fcbcbb8165a894a104adf
selftests: net: tcp_mmap: Use huge pages in receive path

One down side of using TCP rx zerocopy is one extra TLB miss
per page after the mapping operation.

While if the application is using hugepages, the non zerocopy
recvmsg() will not have to pay these TLB costs.

This patch allows server side to use huge pages for
the non zero copy case, to allow fair comparisons when
both solutions use optimal conditions.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Arjun Roy <arjunroy@google.com>
Cc: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/tcp_mmap.c