]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ibmveth: Optimize poll rescheduling process
authorNick Child <nnac123@linux.ibm.com>
Thu, 1 Aug 2024 21:12:14 +0000 (16:12 -0500)
committerJakub Kicinski <kuba@kernel.org>
Fri, 2 Aug 2024 23:39:43 +0000 (16:39 -0700)
commitf128c7cf0530cd104d1370648c29eff0b582700f
tree52c061a5291977212631aee3c9346fa6d851cd97
parent7e1d512dab5042aa1c2224ed362be79e3f22a15e
ibmveth: Optimize poll rescheduling process

When the ibmveth driver processes less than the budget, it must call
napi_complete_done() to release the instance. This function will
return false if the driver should avoid rearming interrupts.
Previously, the driver was ignoring the return code of
napi_complete_done(). As a result, there were unnecessary calls to
enable the veth irq.
Therefore, use the return code napi_complete_done() to determine if
irq rearm is necessary.

Additionally, in the event that new data is received immediately after
rearming interrupts, rather than just rescheduling napi, also jump
back to the poll processing loop since we are already in the poll
function (and know that we did not expense all of budget).

This slight tweak results in a 15% increase in TCP_RR transaction rate
(320k to 370k txns). We can see the ftrace data supports this:
PREV: ibmveth_poll = 8818014.0 us / 182802.0 hits = AVG 48.24
NEW:  ibmveth_poll = 8082398.0 us / 191413.0 hits = AVG 42.22

Signed-off-by: Nick Child <nnac123@linux.ibm.com>
Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
Link: https://patch.msgid.link/20240801211215.128101-2-nnac123@linux.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/ibm/ibmveth.c