diff options
author | Zhang Qiang <qiang.zhang@windriver.com> | 2021-04-15 19:19:56 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2021-05-10 16:00:48 -0700 |
commit | d0bfa8b3c411e25e014e4131d2804afe29c440a6 (patch) | |
tree | ce6873d2b15f3acc6f793e823518b0a7f068aa3c /lib/mpi/mpi-sub-ui.c | |
parent | 6efb943b8616ec53a5e444193dccf1af9ad627b5 (diff) |
kvfree_rcu: Release a page cache under memory pressure
Add a drain_page_cache() function to drain a per-cpu page cache.
The reason behind of it is a system can run into a low memory
condition, in that case a page shrinker can ask for its users
to free their caches in order to get extra memory available for
other needs in a system.
When a system hits such condition, a page cache is drained for
all CPUs in a system. By default a page cache work is delayed
with 5 seconds interval until a memory pressure disappears, if
needed it can be changed. See a rcu_delay_page_cache_fill_msec
module parameter.
Co-developed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Zqiang <qiang.zhang@windriver.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions