lkml.org 
[lkml]   [2018]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH RFC] mm: do not start node_reclaim for page order > MAX_ORDER
From
Date
Page allocator has check in __alloc_pages_slowpath() but nowdays
there is earlier entry point into reclimer without such check:
get_page_from_freelist() -> node_reclaim().

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
---
mm/vmscan.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 62ac0c488624..52f672420f0b 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4117,6 +4117,12 @@ int node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, unsigned int order)
{
int ret;

+ /*
+ * Do not scan if allocation will never succeed.
+ */
+ if (order >= MAX_ORDER)
+ return NODE_RECLAIM_NOSCAN;
+
/*
* Node reclaim reclaims unmapped file backed pages and
* slab pages if we are over the defined limits.
\
 
 \ /
  Last update: 2018-11-01 18:39    [W:0.053 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site