mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
cfcdef5e30
Bimodal behavior of rcu_do_batch() is not really suited to Google applications like gfe servers. When a process with millions of sockets exits, closing all files queues two rcu callbacks per socket. This eventually reaches the point where RCU enters an emergency mode, where rcu_do_batch() do not return until whole queue is flushed. Each rcu callback lasts at least 70 nsec, so with millions of elements, we easily spend more than 100 msec without rescheduling. Goal of this patch is to avoid the infamous message like following "need_resched set for > 51999388 ns (52 ticks) without schedule" We dynamically adjust the number of elements we process, instead of 10 / INFINITE choices, we use a floor of ~1 % of current entries. If the number is above 1000, we switch to a time based limit of 3 msec per batch, adjustable with /sys/module/rcutree/parameters/rcu_resched_ns Signed-off-by: Eric Dumazet <edumazet@google.com> [ paulmck: Forward-port and remove debug statements. ] Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com> |
||
---|---|---|
.. | ||
Kconfig | ||
Kconfig.debug | ||
Makefile | ||
rcu_segcblist.c | ||
rcu_segcblist.h | ||
rcu.h | ||
rcuperf.c | ||
rcutorture.c | ||
srcutiny.c | ||
srcutree.c | ||
sync.c | ||
tiny.c | ||
tree_exp.h | ||
tree_plugin.h | ||
tree_stall.h | ||
tree.c | ||
tree.h | ||
update.c |