diff options
author | Uladzislau Rezki (Sony) <urezki@gmail.com> | 2021-01-20 17:21:46 +0100 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2021-03-08 14:18:07 -0800 |
commit | 148e3731d124079a036b3acf780f3d35c1b9c0aa (patch) | |
tree | 4944f96134a9c4d3b4dfb6407e05249bb3dca680 /kernel/locking/rtmutex-debug.h | |
parent | a38fd8748464831584a19438cbb3082b5a2dab15 (diff) |
kvfree_rcu: Directly allocate page for single-argument case
Single-argument kvfree_rcu() must be invoked from sleepable contexts,
so we can directly allocate pages. Furthermmore, the fallback in case
of page-allocation failure is the high-latency synchronize_rcu(), so it
makes sense to do these page allocations from the fastpath, and even to
permit limited sleeping within the allocator.
This commit therefore allocates if needed on the fastpath using
GFP_KERNEL|__GFP_RETRY_MAYFAIL. This also has the beneficial effect
of leaving kvfree_rcu()'s per-CPU caches to the double-argument variant
of kvfree_rcu(), given that the double-argument variant cannot directly
invoke the allocator.
[ paulmck: Add add_ptr_to_bulk_krc_lock header comment per Michal Hocko. ]
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/locking/rtmutex-debug.h')
0 files changed, 0 insertions, 0 deletions