[PATCH 1/1] mm: compaction: include compact_nodes in compaction.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch declares compact_nodes prototype in compaction.h
header file.
This will allow us to call compaction from other places.
For example, during system suspend, suppose we want to check
the fragmentation state of the system. Then based on certain
threshold, we can invoke compaction, when system is idle.
There could be other use cases.

Signed-off-by: Pintu Kumar <pintu.k@xxxxxxxxxxx>
---
 include/linux/compaction.h |    2 +-
 mm/compaction.c            |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index aa8f61c..800ff50 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -50,7 +50,7 @@ extern bool compaction_deferred(struct zone *zone, int order);
 extern void compaction_defer_reset(struct zone *zone, int order,
 				bool alloc_success);
 extern bool compaction_restarting(struct zone *zone, int order);
-
+extern void compact_nodes(void);
 #else
 static inline unsigned long try_to_compact_pages(gfp_t gfp_mask,
 			unsigned int order, int alloc_flags,
diff --git a/mm/compaction.c b/mm/compaction.c
index 16e1b57..b793922 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1657,7 +1657,7 @@ static void compact_node(int nid)
 }
 
 /* Compact all nodes in the system */
-static void compact_nodes(void)
+void compact_nodes(void)
 {
 	int nid;
 
-- 
1.7.9.5

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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]