SUNRPC: Fix priority queue fairness
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 9 Sep 2018 02:09:48 +0000 (22:09 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:22:52 +0000 (08:22 +0100)
commit5320b434be4bd94b04b535f46087f4db140fb8e5
treed524af312f41c38f60340e40f6a5cde95df41b42
parent375d917188a104b23b41e7887cc87b837d84fcde
SUNRPC: Fix priority queue fairness

[ Upstream commit f42f7c283078ce3c1e8368b140e270755b1ae313 ]

Fix up the priority queue to not batch by owner, but by queue, so that
we allow '1 << priority' elements to be dequeued before switching to
the next priority queue.
The owner field is still used to wake up requests in round robin order
by owner to avoid single processes hogging the RPC layer by loading the
queues.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/sunrpc/sched.h
net/sunrpc/sched.c