aboutsummaryrefslogtreecommitdiffstats
path: root/tools/cgroup
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2020-08-20 10:11:16 -0700
committerDavid S. Miller <davem@davemloft.net>2020-08-20 16:14:53 -0700
commit0d89419319ef68f8acc1b78377ad3e7523fead4a (patch)
treef08c02e3cce3b6a2e536374fb12886651c72833d /tools/cgroup
parentnet: zerocopy: combine pages in zerocopy_sg_from_iter() (diff)
downloadlinux-dev-0d89419319ef68f8acc1b78377ad3e7523fead4a.tar.xz
linux-dev-0d89419319ef68f8acc1b78377ad3e7523fead4a.zip
selftests: net: tcp_mmap: use madvise(MADV_DONTNEED)
When TCP_ZEROCOPY_RECEIVE operation has been added, I made the mistake of automatically un-mapping prior content before mapping new pages. This has the unfortunate effect of adding potentially long MMU operations (like TLB flushes) while socket lock is held. Using madvise(MADV_DONTNEED) right after pages has been used has two benefits : 1) This releases pages sooner, allowing pages to be recycled if they were part of a page pool in a NIC driver. 2) No more long unmap operations while preventing immediate processing of incoming packets. The cost of the added system call is small enough. Arjun will submit a kernel patch allowing to opt out from the unmap attempt in tcp_zerocopy_receive() 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>
Diffstat (limited to 'tools/cgroup')
0 files changed, 0 insertions, 0 deletions