linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Hugh Dickins <hughd@google.com>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	 Roman Gushchin <roman.gushchin@linux.dev>,
	 Johannes Weiner <hannes@cmpxchg.org>,
	 Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	 Michal Hocko <mhocko@kernel.org>,
	David Hildenbrand <david@redhat.com>,
	 linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH mm-new] mm: optimize lru_note_cost() by adding lru_note_cost_unlock_irq() fix
Date: Tue, 15 Jul 2025 13:48:25 -0700 (PDT)	[thread overview]
Message-ID: <dbf9352a-1ed9-a021-c0c7-9309ac73e174@google.com> (raw)

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


                 reply	other threads:[~2025-07-15 20:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dbf9352a-1ed9-a021-c0c7-9309ac73e174@google.com \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mhocko@kernel.org \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox