[<prev] [next>] [day] [month] [year] [list]
Message-ID: <dbf9352a-1ed9-a021-c0c7-9309ac73e174@google.com>
Date: Tue, 15 Jul 2025 13:48:25 -0700 (PDT)
From: Hugh Dickins <hughd@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Hugh Dickins <hughd@...gle.com>, Shakeel Butt <shakeel.butt@...ux.dev>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Johannes Weiner <hannes@...xchg.org>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Michal Hocko <mhocko@...nel.org>, David Hildenbrand <david@...hat.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: [PATCH mm-new] mm: optimize lru_note_cost() by adding
lru_note_cost_unlock_irq() fix
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@...gle.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
Powered by blists - more mailing lists