Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1594105

[RFC][PATCH 2/2] mm: unreserve highatomic pageblock if direct reclaim failed

From Xishi Qiu <qiuxishi@huawei.com>
Newsgroups linux.kernel
Subject [RFC][PATCH 2/2] mm: unreserve highatomic pageblock if direct reclaim failed
Date 2017-03-07 11:50 +0100
Message-ID <tikQO-6fF-21@gated-at.bofh.it> (permalink)
References <tikH7-6ao-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


If direct reclaim failed, unreserve highatomic pageblock
immediately is better than unreserve in should_reclaim_retry().
We may get page in next try rather than reclaim-compact-reclaim-compact...

Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
---
 mm/page_alloc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2331840..2bd19d0 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3421,7 +3421,8 @@ void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...)
 	bool drained = false;
 
 	*did_some_progress = __perform_reclaim(gfp_mask, order, ac);
-	if (unlikely(!(*did_some_progress)))
+	if (unlikely(!(*did_some_progress)
+	    && !unreserve_highatomic_pageblock(ac, false)))
 		return NULL;
 
 retry:
-- 
1.8.3.1

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC][PATCH 1/2] mm: use MIGRATE_HIGHATOMIC as late as possible Xishi Qiu <qiuxishi@huawei.com> - 2017-03-07 11:40 +0100
  Re: [RFC][PATCH 1/2] mm: use MIGRATE_HIGHATOMIC as late as possible Michal Hocko <mhocko@kernel.org> - 2017-03-07 11:50 +0100
    Re: [RFC][PATCH 1/2] mm: use MIGRATE_HIGHATOMIC as late as possible Xishi Qiu <qiuxishi@huawei.com> - 2017-03-07 12:10 +0100
      Re: [RFC][PATCH 1/2] mm: use MIGRATE_HIGHATOMIC as late as possible Michal Hocko <mhocko@kernel.org> - 2017-03-07 15:00 +0100
  [RFC][PATCH 2/2] mm: unreserve highatomic pageblock if direct reclaim  failed Xishi Qiu <qiuxishi@huawei.com> - 2017-03-07 11:50 +0100

csiph-web