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:Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by:
Thomas Gleixner <tglx@linutronix.de>
Loading
Please register or sign in to comment