OSDN Git Service

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>
Fri, 22 Nov 2019 13:44:08 +0000 (14:44 +0100)
commit3b26f7909d1fcd8ef4c87244cb54c89127fbcfc2
treebea8ba93d5cf81314b66229d1f249caf856a60e3
parentc1206fcd2befe85d3ce0fb06295b509c267c6bd5
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