memcg-v1-remove-memcg-move-locking-code.patch removed from -mm tree
The quilt patch titled
Subject: memcg-v1: remove memcg move locking code
has been removed from the -mm tree. Its filename was
memcg-v1-remove-memcg-move-locking-code.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Shakeel Butt <[email protected]>
Subject: memcg-v1: remove memcg move locking code
Date: Thu, 24 Oct 2024 18:23:03 -0700
The memcg v1's charge move feature has been deprecated. All the places using the memcg move lock, have stopped using it as they don't need the protection any more. Let's proceed to remove all the locking code related to charge moving.
---
include/linux/memcontrol.h | 54 ----------------------- mm/filemap.c | 1 mm/memcontrol-v1.c | 82 ----------------------------------- mm/memcontrol.c | 5 -- mm/rmap.c | 1 5 files changed, 143 deletions(-)
include/linux/memcontrol.h renamed from include/linux/memcontrol.h~memcg-v1-remove-memcg-move-locking-code +0 -54
@@ -299,20 +299,10 @@ struct mem_cgroup {/* For oom notifier event fd */ struct list_head oom_notify; -/* taken only while moving_account > 0 */ -spinlock_t move_lock; -unsigned long move_lock_flags; -/* Legacy tcp memory accounting */ bool tcpmem_active;int tcpmem_pressure; -/* -* set > 0 if pages under this cgroup are moving to other cgroup. -*/ -atomic_t moving_account; -struct task_struct *move_lock_task; -/* List of events which userspace want to receive */ struct list_head event_list;spinlock_t event_list_lock;
@@ -428,9 +418,7 @@ static inline struct obj_cgroup *__folio* * - the folio lock * - LRU isolation -* - folio_memcg_lock() * - exclusive reference -* - mem_cgroup_trylock_pages() * * For a kmem folio a caller should hold an rcu read lock to protect memcg * associated with a kmem folio from being released.
@@ -499,9 +487,7 @@ static inline struct mem_cgroup *folio_m* * - the folio lock * - LRU isolation -* - lock_folio_memcg() * - exclusive reference -* - mem_cgroup_trylock_pages() * * For a kmem folio a caller should hold an rcu read lock to protect memcg * associated with a kmem folio from being released.
@@ -1873,26 +1859,6 @@ static inline bool task_in_memcg_oom(strreturn p->memcg_in_oom; } -void folio_memcg_lock (struct folio *folio); -void folio_memcg_unlock (struct folio *folio); - -/* try to stablize folio_memcg() for all the pages in a memcg */ -static inline bool mem_cgroup_trylock_pages (struct mem_cgroup *memcg) -{ -rcu_read_lock (); - -if (mem_cgroup_disabled () || !atomic_read (&memcg->moving_account)) -return true; - -rcu_read_unlock (); -return false; -} - -static inline void mem_cgroup_unlock_pages (void ) -{ -rcu_read_unlock (); -} -static inline void mem_cgroup_enter_user_fault (void ) {WARN_ON (current->in_user_fault);
@@ -1914,26 +1880,6 @@ unsigned long memcg1_soft_limit_reclaim(return 0 ; } -static inline void folio_memcg_lock (struct folio *folio) -{ -} - -static inline void folio_memcg_unlock (struct folio *folio) -{ -} - -static inline bool mem_cgroup_trylock_pages (struct mem_cgroup *memcg) -{ -/* to match folio_memcg_rcu() */ -rcu_read_lock (); -return true; -} - -static inline void mem_cgroup_unlock_pages (void ) -{ -rcu_read_unlock (); -} -static inline bool task_in_memcg_oom (struct task_struct *p) {return false;
mm/filemap.c renamed from mm/filemap.c~memcg-v1-remove-memcg-move-locking-code +0 -1
@@ -119,7 +119,6 @@* ->i_pages lock (folio_remove_rmap_pte->set_page_dirty) * bdi.wb->list_lock (folio_remove_rmap_pte->set_page_dirty) * ->inode->i_lock (folio_remove_rmap_pte->set_page_dirty) -* ->memcg->move_lock (folio_remove_rmap_pte->folio_memcg_lock) * bdi.wb->list_lock (zap_pte_range->set_page_dirty) * ->inode->i_lock (zap_pte_range->set_page_dirty) * ->private_lock (zap_pte_range->block_dirty_folio)
mm/memcontrol.c renamed from mm/memcontrol.c~memcg-v1-remove-memcg-move-locking-code +0 -5
@@ -1189,7 +1189,6 @@ void lruvec_memcg_debug(struct lruvec *l* These functions are safe to use under any of the following conditions: * - folio locked * - folio_test_lru false -* - folio_memcg_lock() * - folio frozen (refcount of 0) * * Return: The lruvec this folio is on with its lock held.
@@ -1211,7 +1210,6 @@ struct lruvec *folio_lruvec_lock(struct* These functions are safe to use under any of the following conditions: * - folio locked * - folio_test_lru false -* - folio_memcg_lock() * - folio frozen (refcount of 0) * * Return: The lruvec this folio is on with its lock held and interrupts
@@ -1235,7 +1233,6 @@ struct lruvec *folio_lruvec_lock_irq(str* These functions are safe to use under any of the following conditions: * - folio locked * - folio_test_lru false -* - folio_memcg_lock() * - folio frozen (refcount of 0) * * Return: The lruvec this folio is on with its lock held and interrupts
@@ -2375,9 +2372,7 @@ static void commit_charge(struct folio ** * - the page lock * - LRU isolation -* - folio_memcg_lock() * - exclusive reference -* - mem_cgroup_trylock_pages() */ folio->memcg_data = (unsigned long )memcg; }
mm/memcontrol-v1.c renamed from mm/memcontrol-v1.c~memcg-v1-remove-memcg-move-locking-code +0 -82
94 lines not on this page · raw message
mm/rmap.c renamed from mm/rmap.c~memcg-v1-remove-memcg-move-locking-code +0 -1
@@ -32,7 +32,6 @@* swap_lock (in swap_duplicate, swap_info_get) * mmlist_lock (in mmput, drain_mmlist and others) * mapping->private_lock (in block_dirty_folio) -* folio_lock_memcg move_lock (in block_dirty_folio) * i_pages lock (widely used) * lruvec->lru_lock (in folio_lruvec_lock_irq) * inode->i_lock (in set_page_dirty's __mark_inode_dirty)
_
Patches currently in -mm which might be from [email protected] are