linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wenwei Tao <wwtao0320@163.com>
To: akpm@linux-foundation.org, mgorman@techsingularity.net
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, ww.tao0320@gmail.com
Subject: [RFC PATCH 3/3] mm, page_alloc: prevent merge freepages between highatomic and others
Date: Sun, 19 Jun 2016 09:51:43 +0800	[thread overview]
Message-ID: <1466301103-6436-1-git-send-email-wwtao0320@163.com> (raw)
In-Reply-To: <1466300927-1364-1-git-send-email-wwtao0320@163.com>

From: Wenwei Tao <ww.tao0320@gmail.com>

We might not want other migrate types pin highatomic pageblock
away since it's reserved for high order use. And also we might
not want reserve high atomic pages out of limit, we can add
check in __free_one_page but this might be costly, so just stop
the merging.

Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
---
 mm/page_alloc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b72b771..ffce9b5 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -832,7 +832,8 @@ continue_merging:
 		 * We don't want to hit this code for the more frequent
 		 * low-order merging.
 		 */
-		if (unlikely(has_isolate_pageblock(zone))) {
+		if (unlikely(has_isolate_pageblock(zone) ||
+				zone->nr_reserved_highatomic)) {
 			int buddy_mt;
 
 			buddy_idx = __find_buddy_index(page_idx, order);
@@ -841,7 +842,9 @@ continue_merging:
 
 			if (migratetype != buddy_mt
 					&& (is_migrate_isolate(migratetype) ||
-						is_migrate_isolate(buddy_mt)))
+					is_migrate_isolate(buddy_mt) ||
+					migratetype == MIGRATE_HIGHATOMIC ||
+					buddy_mt == MIGRATE_HIGHATOMIC))
 				goto done_merging;
 		}
 		max_order++;
-- 
1.8.3.1


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2016-06-19  1:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-18  9:34 [RFC PATCH 1/3] mm, page_alloc: free HIGHATOMIC page directly to the allocator Wenwei Tao
2016-06-18 10:14 ` Vlastimil Babka
     [not found]   ` <CACygaLAU-PiB8UDR0i9FYbTuH8vBKJRFxufGOVoWCmqPad-XZQ@mail.gmail.com>
2016-06-19  2:49     ` Fwd: " Wenwei Tao
2016-06-19  1:48 ` [RFC PATCH 2/3] mm, page_alloc: get page migreate type again when related to highatomic Wenwei Tao
2016-06-19  1:51   ` Wenwei Tao [this message]

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=1466301103-6436-1-git-send-email-wwtao0320@163.com \
    --to=wwtao0320@163.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=ww.tao0320@gmail.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;
as well as URLs for NNTP newsgroup(s).