]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Partial revert of commit de993dd80f3f
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 12 Jul 2021 13:52:59 +0000 (09:52 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 4 Oct 2021 00:49:05 +0000 (20:49 -0400)
commit640fc7b603d8fbc2ad4917bb0af31684f34bedb5
tree510a00c01d7b8e77dbcd93baf90256fcba09126f
parentaa3543d9f89d3fd1f52b767d1c48fb5a14cdea29
SUNRPC: Partial revert of commit de993dd80f3f

The premise of commit de993dd80f3f ("SUNRPC: Mitigate cond_resched() in
xprt_transmit()") was that cond_resched() is expensive and unnecessary
when there has been just a single send.
The point of cond_resched() is to ensure that tasks that should pre-empt
this one get a chance to do so when it is safe to do so. The code prior
to commit de993dd80f3f failed to take into account that it was keeping a
rpc_task pinned for longer than it needed to, and so rather than doing a
full revert, let's just move the cond_resched.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/xprt.c