Skip to content
Commit b3dd738c authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Bruce Ashfield
Browse files

mm: memcontrol: Add an argument to refill_stock() to indicate locking



The access to the per-CPU variable memcg_stock is protected by disabling
interrupts. refill_stock() may change the ->caching member and updates
the ->nr_pages member.
refill_obj_stock() is also accecssing memcg_stock (modifies ->nr_pages)
and disables interrupts as part for the locking. Since
refill_obj_stock() may invoke refill_stock() (via drain_obj_stock() ->
obj_cgroup_uncharge_pages()) the "disable interrupts"-lock is acquired
recursively.

Add an argument to refill_stock() to indicate if it is required to
disable interrupts as part of the locking for exclusive memcg_stock
access.

Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent ab8ca387
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment