linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Zhiguo Jiang <justinjiang@vivo.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com, Zhiguo Jiang <justinjiang@vivo.com>
Subject: [PATCH] mm: mglru: fix add unevictable folio to lruvec->lists
Date: Thu, 14 Sep 2023 22:08:23 +0800	[thread overview]
Message-ID: <20230914140823.1732-1-justinjiang@vivo.com> (raw)

The unevictable folio is not supported to add to lruvec->lists
in lruvec_add_folio().

So use lruvec_add_folio_tail() instead of lruvec_add_folio()
to add unevictable folio to lruvec->lists in sort_folio().

Signed-off-by: Zhiguo Jiang <justinjiang@vivo.com>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100644 => 100755 mm/vmscan.c

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 661615fa709b..a15e45632034
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4237,7 +4237,7 @@ static bool sort_folio(struct lruvec *lruvec, struct folio *folio, struct scan_c
 		success = lru_gen_del_folio(lruvec, folio, true);
 		VM_WARN_ON_ONCE_FOLIO(!success, folio);
 		folio_set_unevictable(folio);
-		lruvec_add_folio(lruvec, folio);
+		lruvec_add_folio_tail(lruvec, folio);
 		__count_vm_events(UNEVICTABLE_PGCULLED, delta);
 		return true;
 	}
-- 
2.39.0



             reply	other threads:[~2023-09-14 14:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 14:08 Zhiguo Jiang [this message]
2023-09-14 17:46 ` Yu Zhao
2023-09-15  3:19   ` 答复: " 江志国
2023-09-15  3:25     ` Yu Zhao
2023-09-15  3:33       ` 答复: " 江志国
2023-09-15  3:34         ` Yu Zhao
2023-09-15  3:37           ` 答复: " 江志国

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=20230914140823.1732-1-justinjiang@vivo.com \
    --to=justinjiang@vivo.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=opensource.kernel@vivo.com \
    /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