diff options
author | Zqiang <qiang1.zhang@intel.com> | 2023-04-12 22:31:27 +0800 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2023-05-09 17:26:21 -0700 |
commit | 60888b77a06ea16665e4df980bb86b418253e268 (patch) | |
tree | 7afe5fc6bdac65bb933b8392689cead882d1664b /lib/dhry_run.c | |
parent | 021a5ff8474379cd6c23e9b0e97aa27e5ff66a8b (diff) |
rcu/kvfree: Make fill page cache start from krcp->nr_bkv_objs
When the fill_page_cache_func() function is invoked, it assumes that
the cache of pages is completely empty. However, there can be some time
between triggering execution of this function and its actual invocation.
During this time, kfree_rcu_work() might run, and might fill in part or
all of this cache of pages, thus invalidating the fill_page_cache_func()
function's assumption.
This will not overfill the cache because put_cached_bnode() will reject
the extra page. However, it will result in a needless allocation and
freeing of one extra page, which might not be helpful under lowish-memory
conditions.
This commit therefore causes the fill_page_cache_func() to explicitly
account for pages that have been placed into the cache shortly before
it starts running.
Signed-off-by: Zqiang <qiang1.zhang@intel.com>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'lib/dhry_run.c')
0 files changed, 0 insertions, 0 deletions