mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
mm: remove MIGRATE_ISOLATE check in hotpath
Several functions test MIGRATE_ISOLATE and some of those are hotpath but MIGRATE_ISOLATE is used only if we enable CONFIG_MEMORY_ISOLATION(ie, CMA, memory-hotplug and memory-failure) which are not common config option. So let's not add unnecessary overhead and code when we don't enable CONFIG_MEMORY_ISOLATION. Signed-off-by: Minchan Kim <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Acked-by: Michal Nazarewicz <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c60514b631
commit
194159fbcc
5 changed files with 38 additions and 7 deletions
|
|
@ -15,6 +15,7 @@
|
|||
#include <linux/sysctl.h>
|
||||
#include <linux/sysfs.h>
|
||||
#include <linux/balloon_compaction.h>
|
||||
#include <linux/page-isolation.h>
|
||||
#include "internal.h"
|
||||
|
||||
#ifdef CONFIG_COMPACTION
|
||||
|
|
@ -215,7 +216,10 @@ static bool suitable_migration_target(struct page *page)
|
|||
int migratetype = get_pageblock_migratetype(page);
|
||||
|
||||
/* Don't interfere with memory hot-remove or the min_free_kbytes blocks */
|
||||
if (migratetype == MIGRATE_ISOLATE || migratetype == MIGRATE_RESERVE)
|
||||
if (migratetype == MIGRATE_RESERVE)
|
||||
return false;
|
||||
|
||||
if (is_migrate_isolate(migratetype))
|
||||
return false;
|
||||
|
||||
/* If the page is a large free page, then allow migration */
|
||||
|
|
|
|||
Loading…
Reference in a new issue