OSDN Git Service

xsk: Eliminate the lazy update threshold
authorMagnus Karlsson <magnus.karlsson@intel.com>
Thu, 19 Dec 2019 12:39:20 +0000 (13:39 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 21 Dec 2019 00:00:08 +0000 (16:00 -0800)
commit484b165306e18fd9a0d960e6ed2d6eff31665522
treecbbe2f1c2d13b417c914c3a0725843b36cd7966a
parent99cacdc6f661f50f44a0ef006a1a3db20c0577f6
xsk: Eliminate the lazy update threshold

The lazy update threshold was introduced to keep the producer and
consumer some distance apart in the completion ring. This was
important in the beginning of the development of AF_XDP as the ring
format as that point in time was very sensitive to the producer and
consumer being on the same cache line. This is not the case
anymore as the current ring format does not degrade in any noticeable
way when this happens. Moreover, this threshold makes it impossible
to run the system with rings that have less than 128 entries.

So let us remove this threshold and just get one entry from the ring
as in all other functions. This will enable us to remove this function
in a later commit. Note that xskq_produce_addr_lazy followed by
xskq_produce_flush_addr_n are still not the same function as
xskq_produce_addr() as it operates on another cached pointer.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/1576759171-28550-2-git-send-email-magnus.karlsson@intel.com
net/xdp/xsk_queue.h