linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH mm-new] mm: optimize lru_note_cost() by adding lru_note_cost_unlock_irq() fix
@ 2025-07-15 20:48 Hugh Dickins
  0 siblings, 0 replies; only message in thread
From: Hugh Dickins @ 2025-07-15 20:48 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Hugh Dickins, Shakeel Butt, Roman Gushchin, Johannes Weiner,
	Lorenzo Stoakes, Michal Hocko, David Hildenbrand, linux-mm,
	linux-kernel

Delete the comment from above the deleted spin_lock_irq(): it was all to
justify the first iteration's spin_lock_irq(), none suitable for moving
down to where the parent's spin_lock_irq() is now done.

Signed-off-by: Hugh Dickins <hughd@google.com>
---
Thank you all for the warm reception! Sorry, I missed this deletion.

 mm/swap.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/mm/swap.c b/mm/swap.c
index 37053f222a6e..3632dd061beb 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -259,13 +259,6 @@ void lru_note_cost_unlock_irq(struct lruvec *lruvec, bool file,
 	for (;;) {
 		unsigned long lrusize;
 
-		/*
-		 * Hold lruvec->lru_lock is safe here, since
-		 * 1) The pinned lruvec in reclaim, or
-		 * 2) From a pre-LRU page during refault (which also holds the
-		 *    rcu lock, so would be safe even if the page was on the LRU
-		 *    and could move simultaneously to a new lruvec).
-		 */
 		/* Record cost event */
 		if (file)
 			lruvec->file_cost += cost;
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-15 20:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-15 20:48 [PATCH mm-new] mm: optimize lru_note_cost() by adding lru_note_cost_unlock_irq() fix Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox