From: Ganesh Mahendran <opensource.ganesh@gmail.com>
To: akpm@linux-foundation.org, vbabka@suse.cz,
iamjoonsoo.kim@lge.com, mhocko@suse.com, mina86@mina86.com,
minchan@kernel.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Ganesh Mahendran <opensource.ganesh@gmail.com>
Subject: [PATCH] mm/compaction: remove unnecessary order check in try_to_compact_pages()
Date: Wed, 15 Jun 2016 14:52:48 +0800 [thread overview]
Message-ID: <1465973568-3496-1-git-send-email-opensource.ganesh@gmail.com> (raw)
The caller __alloc_pages_direct_compact() already check (order == 0).
So no need to check again.
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
---
mm/compaction.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/compaction.c b/mm/compaction.c
index fbb7b38..500acda 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1687,7 +1687,7 @@ enum compact_result try_to_compact_pages(gfp_t gfp_mask, unsigned int order,
*contended = COMPACT_CONTENDED_NONE;
/* Check if the GFP flags allow compaction */
- if (!order || !may_enter_fs || !may_perform_io)
+ if (!may_enter_fs || !may_perform_io)
return COMPACT_SKIPPED;
trace_mm_compaction_try_to_compact_pages(order, gfp_mask, mode);
--
1.9.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>
WARNING: multiple messages have this Message-ID (diff)
From: Ganesh Mahendran <opensource.ganesh@gmail.com>
To: akpm@linux-foundation.org, vbabka@suse.cz,
iamjoonsoo.kim@lge.com, mhocko@suse.com, mina86@mina86.com,
minchan@kernel.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Ganesh Mahendran <opensource.ganesh@gmail.com>
Subject: [PATCH] mm/compaction: remove unnecessary order check in try_to_compact_pages()
Date: Wed, 15 Jun 2016 14:52:48 +0800 [thread overview]
Message-ID: <1465973568-3496-1-git-send-email-opensource.ganesh@gmail.com> (raw)
The caller __alloc_pages_direct_compact() already check (order == 0).
So no need to check again.
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
---
mm/compaction.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/compaction.c b/mm/compaction.c
index fbb7b38..500acda 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1687,7 +1687,7 @@ enum compact_result try_to_compact_pages(gfp_t gfp_mask, unsigned int order,
*contended = COMPACT_CONTENDED_NONE;
/* Check if the GFP flags allow compaction */
- if (!order || !may_enter_fs || !may_perform_io)
+ if (!may_enter_fs || !may_perform_io)
return COMPACT_SKIPPED;
trace_mm_compaction_try_to_compact_pages(order, gfp_mask, mode);
--
1.9.1
next reply other threads:[~2016-06-15 6:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 6:52 Ganesh Mahendran [this message]
2016-06-15 6:52 ` [PATCH] mm/compaction: remove unnecessary order check in try_to_compact_pages() Ganesh Mahendran
2016-06-15 8:46 ` Anshuman Khandual
2016-06-15 8:46 ` Anshuman Khandual
2016-06-24 20:58 ` Andrew Morton
2016-06-24 20:58 ` Andrew Morton
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=1465973568-3496-1-git-send-email-opensource.ganesh@gmail.com \
--to=opensource.ganesh@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=mina86@mina86.com \
--cc=minchan@kernel.org \
--cc=vbabka@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.