+ vmscan-add-a-vmscan-event-for-reclaim_pages-v3.patch added to mm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: vmscan-add-a-vmscan-event-for-reclaim_pages-v3
has been added to the -mm mm-unstable branch.  Its filename is
     vmscan-add-a-vmscan-event-for-reclaim_pages-v3.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/vmscan-add-a-vmscan-event-for-reclaim_pages-v3.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Jaewon Kim <jaewon31.kim@xxxxxxxxxxx>
Subject: vmscan-add-a-vmscan-event-for-reclaim_pages-v3
Date: Wed, 16 Oct 2024 23:32:27 +0900

use sc.nr_scanned rather than new counting

Link: https://lkml.kernel.org/r/20241016143227.961162-1-jaewon31.kim@xxxxxxxxxxx
Signed-off-by: Jaewon Kim <jaewon31.kim@xxxxxxxxxxx>
Cc: Kalesh Singh <kaleshsingh@xxxxxxxxxx>
Cc: Minchan Kim <minchan@xxxxxxxxxx>
Cc: SeongJae Park <sj@xxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/vmscan.c |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

--- a/mm/vmscan.c~vmscan-add-a-vmscan-event-for-reclaim_pages-v3
+++ a/mm/vmscan.c
@@ -2126,7 +2126,6 @@ static void shrink_active_list(unsigned
 }
 
 static unsigned int reclaim_folio_list(struct list_head *folio_list,
-				      unsigned int nr_scanned,
 				      struct pglist_data *pgdat)
 {
 	struct reclaim_stat stat;
@@ -2146,7 +2145,7 @@ static unsigned int reclaim_folio_list(s
 		list_del(&folio->lru);
 		folio_putback_lru(folio);
 	}
-	trace_mm_vmscan_reclaim_pages(pgdat->node_id, nr_scanned, nr_reclaimed, &stat);
+	trace_mm_vmscan_reclaim_pages(pgdat->node_id, sc.nr_scanned, nr_reclaimed, &stat);
 
 	return nr_reclaimed;
 }
@@ -2154,7 +2153,6 @@ static unsigned int reclaim_folio_list(s
 unsigned long reclaim_pages(struct list_head *folio_list)
 {
 	int nid;
-	unsigned int nr_scanned = 0;
 	unsigned int nr_reclaimed = 0;
 	LIST_HEAD(node_folio_list);
 	unsigned int noreclaim_flag;
@@ -2171,18 +2169,15 @@ unsigned long reclaim_pages(struct list_
 		if (nid == folio_nid(folio)) {
 			folio_clear_active(folio);
 			list_move(&folio->lru, &node_folio_list);
-			nr_scanned += folio_nr_pages(folio);
 			continue;
 		}
 
-		nr_reclaimed += reclaim_folio_list(&node_folio_list, nr_scanned,
-						   NODE_DATA(nid));
-		nr_scanned = 0;
+		nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid));
 		nid = folio_nid(lru_to_folio(folio_list));
 	} while (!list_empty(folio_list));
 
-	nr_reclaimed += reclaim_folio_list(&node_folio_list, nr_scanned,
-					   NODE_DATA(nid));
+	nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid));
+
 	memalloc_noreclaim_restore(noreclaim_flag);
 
 	return nr_reclaimed;
_

Patches currently in -mm which might be from jaewon31.kim@xxxxxxxxxxx are

vmscan-add-a-vmscan-event-for-reclaim_pages.patch
vmscan-add-a-vmscan-event-for-reclaim_pages-v3.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux