]> git.baikalelectronics.ru Git - kernel.git/commit
nfs: fix high load average due to callback thread sleeping
authorJeff Layton <jlayton@poochiereds.net>
Fri, 20 Mar 2015 19:15:14 +0000 (15:15 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 23 Apr 2015 18:38:07 +0000 (14:38 -0400)
commitc5395433f0db0f0299bff31658380350ea9fd097
treef67bf3bdb8ad1fd4cc61ec8d0e23dfafdcbd3f8b
parentd415a1df3f897d29c776e70fd5669f309d515ffb
nfs: fix high load average due to callback thread sleeping

Chuck pointed out a problem that crept in with commit b1b75b96bd9c (nfs:
don't call blocking operations while !TASK_RUNNING). Linux counts tasks
in uninterruptible sleep against the load average, so this caused the
system's load average to be pinned at at least 1 when there was a
NFSv4.1+ mount active.

Not a huge problem, but it's probably worth fixing before we get too
many complaints about it. This patch converts the code back to use
TASK_INTERRUPTIBLE sleep, simply has it flush any signals on each loop
iteration. In practice no one should really be signalling this thread at
all, so I think this is reasonably safe.

With this change, there's also no need to game the hung task watchdog so
we can also convert the schedule_timeout call back to a normal schedule.

Cc: <stable@vger.kernel.org>
Reported-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Tested-by: Chuck Lever <chuck.lever@oracle.com>
Fixes: commit b1b75b96bd9c (“nfs: don't call blocking . . .”)
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/callback.c