* [merged] mm-migrate-introduce-a-local-variable-to-get-the-number-of-pages.patch removed from -mm tree
@ 2021-09-09 21:05 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-09-09 21:05 UTC (permalink / raw)
To: apopple, baolin.wang, mm-commits, shy828301, willy
The patch titled
Subject: mm: migrate: introduce a local variable to get the number of pages
has been removed from the -mm tree. Its filename was
mm-migrate-introduce-a-local-variable-to-get-the-number-of-pages.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Baolin Wang <baolin.wang@linux.alibaba.com>
Subject: mm: migrate: introduce a local variable to get the number of pages
Use thp_nr_pages() instead of compound_nr() to get the number of pages for
THP page, meanwhile introducing a local variable 'nr_pages' to avoid
getting the number of pages repeatedly.
Link: https://lkml.kernel.org/r/a8e331ac04392ee230c79186330fb05e86a2aa77.1629447552.git.baolin.wang@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/migrate.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/mm/migrate.c~mm-migrate-introduce-a-local-variable-to-get-the-number-of-pages
+++ a/mm/migrate.c
@@ -2107,6 +2107,7 @@ out:
static int numamigrate_isolate_page(pg_data_t *pgdat, struct page *page)
{
int page_lru;
+ int nr_pages = thp_nr_pages(page);
VM_BUG_ON_PAGE(compound_order(page) && !PageTransHuge(page), page);
@@ -2115,7 +2116,7 @@ static int numamigrate_isolate_page(pg_d
return 0;
/* Avoid migrating to a node that is nearly full */
- if (!migrate_balanced_pgdat(pgdat, compound_nr(page)))
+ if (!migrate_balanced_pgdat(pgdat, nr_pages))
return 0;
if (isolate_lru_page(page))
@@ -2123,7 +2124,7 @@ static int numamigrate_isolate_page(pg_d
page_lru = page_is_file_lru(page);
mod_node_page_state(page_pgdat(page), NR_ISOLATED_ANON + page_lru,
- thp_nr_pages(page));
+ nr_pages);
/*
* Isolating the page has taken another reference, so the
_
Patches currently in -mm which might be from baolin.wang@linux.alibaba.com are
mm-migrate-simplify-the-file-backed-pages-validation-when-migrating-its-mapping.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-09 21:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 21:05 [merged] mm-migrate-introduce-a-local-variable-to-get-the-number-of-pages.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).