]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: Only set PF_LESS_THROTTLE when really needed.
authorNeilBrown <neilb@suse.de>
Mon, 12 May 2014 01:22:47 +0000 (11:22 +1000)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 22 May 2014 19:59:19 +0000 (15:59 -0400)
commitc5ac205b8766d7e50b3b034c9fdbd85d5776250c
tree5f2bdfa67fa8eb23d24958f541a1b8698185bc0b
parent82fad0d2b55fc63de5524764d15dc9f8314f3990
nfsd: Only set PF_LESS_THROTTLE when really needed.

PF_LESS_THROTTLE has a very specific use case: to avoid deadlocks
and live-locks while writing to the page cache in a loop-back
NFS mount situation.

It therefore makes sense to *only* set PF_LESS_THROTTLE in this
situation.
We now know when a request came from the local-host so it could be a
loop-back mount.  We already know when we are handling write requests,
and when we are doing anything else.

So combine those two to allow nfsd to still be throttled (like any
other process) in every situation except when it is known to be
problematic.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfssvc.c
fs/nfsd/vfs.c