]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
SUNRPC: remove scheduling boost for "SWAPPER" tasks.
authorNeilBrown <neilb@suse.de>
Sun, 6 Mar 2022 23:41:44 +0000 (10:41 +1100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 09:59:26 +0000 (11:59 +0200)
commit8f63c22491cc987ee00f76e46e680d30911d414f
tree90f6468b5459bcef45f27b481d9a364ba0dfd46b
parentd9c803d6dc8899b3e44a0f228334e932ca345434
SUNRPC: remove scheduling boost for "SWAPPER" tasks.

BugLink: https://bugs.launchpad.net/bugs/1969107
[ Upstream commit a80a8461868905823609be97f91776a26befe839 ]

Currently, tasks marked as "swapper" tasks get put to the front of
non-priority rpc_queues, and are sorted earlier than non-swapper tasks on
the transport's ->xmit_queue.

This is pointless as currently *all* tasks for a mount that has swap
enabled on *any* file are marked as "swapper" tasks.  So the net result
is that the non-priority rpc_queues are reverse-ordered (LIFO).

This scheduling boost is not necessary to avoid deadlocks, and hurts
fairness, so remove it.  If there were a need to expedite some requests,
the tk_priority mechanism is a more appropriate tool.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit a553864050944656c6225056d3704500fbbf6f38)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/sunrpc/sched.c
net/sunrpc/xprt.c