Skip to content
Commit 363dc73a authored by Paolo Abeni's avatar Paolo Abeni Committed by David S. Miller
Browse files

udp: be less conservative with sock rmem accounting

Before commit 850cbadd

 ("udp: use it's own memory accounting
schema"), the udp protocol allowed sk_rmem_alloc to grow beyond
the rcvbuf by the whole current packet's truesize. After said commit
we allow sk_rmem_alloc to exceed the rcvbuf only if the receive queue
is empty. As reported by Jesper this cause a performance regression
for some (small) values of rcvbuf.

This commit is intended to fix the regression restoring the old
handling of the rcvbuf limit.

Reported-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
Fixes: 850cbadd

 ("udp: use it's own memory accounting schema")
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 12efa1fa
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment