Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753813AbbHGOSI (ORCPT ); Fri, 7 Aug 2015 10:18:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:58482 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753347AbbHGOSF (ORCPT ); Fri, 7 Aug 2015 10:18:05 -0400 Subject: Re: [PATCH 1/1] mm: compaction: include compact_nodes in compaction.h To: Pintu Kumar , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, iamjoonsoo.kim@lge.com, mhocko@suse.cz, riel@redhat.com, emunson@akamai.com, mgorman@suse.de, zhangyanfei@cn.fujitsu.com, rientjes@google.com References: <1438956233-28690-1-git-send-email-pintu.k@samsung.com> Cc: cpgs@samsung.com, pintu_agarwal@yahoo.com, pintu.k@outlook.com, vishnu.ps@samsung.com, rohit.kr@samsung.com From: Vlastimil Babka Message-ID: <55C4BE1A.8050408@suse.cz> Date: Fri, 7 Aug 2015 16:18:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1438956233-28690-1-git-send-email-pintu.k@samsung.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1999 Lines: 54 On 08/07/2015 04:03 PM, Pintu Kumar wrote: > 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. Isn't it more common to introduce such visibility changes only as part of series that actually benefit from it? Otherwise next month somebody might notice that it's unused outside compaction.c and send a cleanup patch to make it static again... > 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; > > -- 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/