summaryrefslogtreecommitdiff
path: root/fs/file.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-07-01 22:26:57 +0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-09-08 03:27:20 +0400
commitbde6c3aa993066acb0d6ce32ecabe03b9d5df92d (patch)
tree09ec78a9cfa751ce36288c32c4e5112f34af8582 /fs/file.c
parent8315f42295d2667a7f942f154b73a86fd7cb2227 (diff)
downloadlinux-bde6c3aa993066acb0d6ce32ecabe03b9d5df92d.tar.xz
rcu: Provide cond_resched_rcu_qs() to force quiescent states in long loops
RCU-tasks requires the occasional voluntary context switch from CPU-bound in-kernel tasks. In some cases, this requires instrumenting cond_resched(). However, there is some reluctance to countenance unconditionally instrumenting cond_resched() (see http://lwn.net/Articles/603252/), so this commit creates a separate cond_resched_rcu_qs() that may be used in place of cond_resched() in locations prone to long-duration in-kernel looping. This commit currently instruments only RCU-tasks. Future possibilities include also instrumenting RCU, RCU-bh, and RCU-sched in order to reduce IPI usage. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'fs/file.c')
-rw-r--r--fs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/file.c b/fs/file.c
index 66923fe3176e..1cafc4c9275b 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -367,7 +367,7 @@ static struct fdtable *close_files(struct files_struct * files)
struct file * file = xchg(&fdt->fd[i], NULL);
if (file) {
filp_close(file, files);
- cond_resched();
+ cond_resched_rcu_qs();
}
}
i++;