Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753750AbbHGOPj (ORCPT ); Fri, 7 Aug 2015 10:15:39 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:41962 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753361AbbHGOPi (ORCPT ); Fri, 7 Aug 2015 10:15:38 -0400 X-AuditID: cbfee68e-f79c56d000006efb-cf-55c4bd883cd8 From: Pintu Kumar To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, vbabka@suse.cz, iamjoonsoo.kim@lge.com, mhocko@suse.cz, riel@redhat.com, emunson@akamai.com, mgorman@suse.de, zhangyanfei@cn.fujitsu.com, rientjes@google.com, pintu.k@samsung.com Cc: cpgs@samsung.com, pintu_agarwal@yahoo.com, pintu.k@outlook.com, vishnu.ps@samsung.com, rohit.kr@samsung.com Subject: [PATCH 1/1] mm: compaction: include compact_nodes in compaction.h Date: Fri, 07 Aug 2015 19:33:53 +0530 Message-id: <1438956233-28690-1-git-send-email-pintu.k@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJIsWRmVeSWpSXmKPExsWyRsSkVrdj75FQgw0/ZCzmrF/DZvHykKbF u/OfmSxWdjezWVzeNYfN4t6a/6wWk989Y7R41fyd1eJ8x2VWi77vh9ktvr29zW7x98p6Fou2 JRuZLJ43t7JYzG7sY7SY0neX0eLS8ZnMDoIek48sYPb4f3ASs8eCTaUemz5NYvfoenuFyePE jN8sHptfv2D2eL/vKptH35ZVjB5nFhxh99h8utrj8yY5j1mzDjMF8EZx2aSk5mSWpRbp2yVw ZdxZdZCpYCp3xfIXm1kbGKdxdjFyckgImEic2jadBcIWk7hwbz1bFyMXh5DACkaJrX+Ws8IU XTgzlxkiMYtR4tHzU4wQTiOTxKMHc5lAqtgE1CV+vPkNlhAR6GSSuLFyEhtIglmgUOLUoflA Ozg4hAW8JL60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vcrzgxt7g0L10vOT93EyM4kp9J7WA8uMv9EKMAB6MSD2/iv8OhQqyJ ZcWVuYcYJTiYlUR4F207EirEm5JYWZValB9fVJqTWnyI0RRo/0RmKdHkfGCSySuJNzQ2MTc1 NrU0sTAxs1QS55XdsDlUSCA9sSQ1OzW1ILUIpo+Jg1OqgdHoG+ena5s2LDyq9+7jrCLzAzq2 bz4rm93fxfZo91chpuknpsy9whYaZVVYkzVtX2vBjNkTQw7uigp8de5iqOfu1QdXXy69Obuu RuLrv8d2Oy/Jf3hunz1pZmjsOsmFay6+7uheZ6T9oCRfac3a6q6gjNBqF32e0//8jPmX7e2Y Frt1eevqTUycSizFGYmGWsxFxYkA4dLSs/oCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1631 Lines: 48 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 --- 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/