]> git.ipfire.org Git - network.git/commit
Disable copybreak
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 7 May 2020 19:30:03 +0000 (20:30 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 7 May 2020 19:30:03 +0000 (20:30 +0100)
commitea4abb82bc6e613ddebd6235f792dd5bbbc469c9
tree21ea68a426ba54c4ac0ccb35e9da01e67d67f3a5
parent27208caa363cad7c2250bdff5b99a9bc16a5ca91
Disable copybreak

Some network interface drivers employ a scheme known as "copybreak"
in which they make a copy of a received skb if the size of the
buffer is below a particular threshold, then return the original
receive skb back to the pool.  Since these drivers initially
allocate a buffer size that is larger than the largest possible
packet, this scheme returns that large buffer to the pool quickly,
and uses a smaller one.

The primary benefit of copybreak is better memory utilization.  On
systems where the data is ultimately going to be copied out to user
space, the copybreak scheme is "low cost" because it has the side
benefit of priming the cache for that later copy.  But on a router
that only touches the header fields of a received packet, the cost
can be relatively higher.  And on modern systems the memory savings
is rarely an important consideration.

Some of the drivers that employ copybreak make the feature
configurable via a module parameter.  This file disables copybreak
in some of those drivers.  Generally this results in an improvement
in forwarding performance for traffic using these drivers.

Fixes: #11930
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Makefile.am
src/modprobe.d/no-copybreak.conf [new file with mode: 0644]