All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] mm: compaction: include compact_nodes in compaction.h
@ 2015-08-07 14:03 ` Pintu Kumar
  0 siblings, 0 replies; 6+ messages in thread
From: Pintu Kumar @ 2015-08-07 14:03 UTC (permalink / raw)
  To: akpm, linux-kernel, linux-mm, vbabka, iamjoonsoo.kim, mhocko,
	riel, emunson, mgorman, zhangyanfei, rientjes, pintu.k
  Cc: cpgs, pintu_agarwal, pintu.k, vishnu.ps, rohit.kr

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@samsung.com>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 1/1] mm: compaction: include compact_nodes in compaction.h
@ 2015-08-07 14:03 ` Pintu Kumar
  0 siblings, 0 replies; 6+ messages in thread
From: Pintu Kumar @ 2015-08-07 14:03 UTC (permalink / raw)
  To: akpm, linux-kernel, linux-mm, vbabka, iamjoonsoo.kim, mhocko,
	riel, emunson, mgorman, zhangyanfei, rientjes, pintu.k
  Cc: cpgs, pintu_agarwal, pintu.k, vishnu.ps, rohit.kr

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@samsung.com>
---
 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@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>

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] mm: compaction: include compact_nodes in compaction.h
  2015-08-07 14:03 ` Pintu Kumar
@ 2015-08-07 14:18   ` Vlastimil Babka
  -1 siblings, 0 replies; 6+ messages in thread
From: Vlastimil Babka @ 2015-08-07 14:18 UTC (permalink / raw)
  To: Pintu Kumar, akpm, linux-kernel, linux-mm, iamjoonsoo.kim,
	mhocko, riel, emunson, mgorman, zhangyanfei, rientjes
  Cc: cpgs, pintu_agarwal, pintu.k, vishnu.ps, rohit.kr

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 <pintu.k@samsung.com>
> ---
>   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;
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] mm: compaction: include compact_nodes in compaction.h
@ 2015-08-07 14:18   ` Vlastimil Babka
  0 siblings, 0 replies; 6+ messages in thread
From: Vlastimil Babka @ 2015-08-07 14:18 UTC (permalink / raw)
  To: Pintu Kumar, akpm, linux-kernel, linux-mm, iamjoonsoo.kim,
	mhocko, riel, emunson, mgorman, zhangyanfei, rientjes
  Cc: cpgs, pintu_agarwal, pintu.k, vishnu.ps, rohit.kr

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 <pintu.k@samsung.com>
> ---
>   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, 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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 1/1] mm: compaction: include compact_nodes in compaction.h
  2015-08-07 14:18   ` Vlastimil Babka
@ 2015-08-11 10:45     ` PINTU KUMAR
  -1 siblings, 0 replies; 6+ messages in thread
From: PINTU KUMAR @ 2015-08-11 10:45 UTC (permalink / raw)
  To: 'Vlastimil Babka',
	akpm, linux-kernel, linux-mm, iamjoonsoo.kim, mhocko, riel,
	emunson, mgorman, zhangyanfei, rientjes
  Cc: cpgs, pintu_agarwal, pintu.k, vishnu.ps, rohit.kr

Hi,

> -----Original Message-----
> From: Vlastimil Babka [mailto:vbabka@suse.cz]
> Sent: Friday, August 07, 2015 7:48 PM
> 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
> Cc: cpgs@samsung.com; pintu_agarwal@yahoo.com; pintu.k@outlook.com;
> vishnu.ps@samsung.com; rohit.kr@samsung.com
> Subject: Re: [PATCH 1/1] mm: compaction: include compact_nodes in
> compaction.h
> 
> 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?
> 
Other series are not ready right now and not defined yet. It may take longer time.
I thought, it is left to the user, if somebody wants to invoke compaction from other sub-system.

> 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 <pintu.k@samsung.com>
> > ---
> >   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;
> >
> >


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 1/1] mm: compaction: include compact_nodes in compaction.h
@ 2015-08-11 10:45     ` PINTU KUMAR
  0 siblings, 0 replies; 6+ messages in thread
From: PINTU KUMAR @ 2015-08-11 10:45 UTC (permalink / raw)
  To: 'Vlastimil Babka',
	akpm, linux-kernel, linux-mm, iamjoonsoo.kim, mhocko, riel,
	emunson, mgorman, zhangyanfei, rientjes
  Cc: cpgs, pintu_agarwal, pintu.k, vishnu.ps, rohit.kr

Hi,

> -----Original Message-----
> From: Vlastimil Babka [mailto:vbabka@suse.cz]
> Sent: Friday, August 07, 2015 7:48 PM
> 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
> Cc: cpgs@samsung.com; pintu_agarwal@yahoo.com; pintu.k@outlook.com;
> vishnu.ps@samsung.com; rohit.kr@samsung.com
> Subject: Re: [PATCH 1/1] mm: compaction: include compact_nodes in
> compaction.h
> 
> 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?
> 
Other series are not ready right now and not defined yet. It may take longer time.
I thought, it is left to the user, if somebody wants to invoke compaction from other sub-system.

> 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 <pintu.k@samsung.com>
> > ---
> >   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, 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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-08-11 10:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07 14:03 [PATCH 1/1] mm: compaction: include compact_nodes in compaction.h Pintu Kumar
2015-08-07 14:03 ` Pintu Kumar
2015-08-07 14:18 ` Vlastimil Babka
2015-08-07 14:18   ` Vlastimil Babka
2015-08-11 10:45   ` PINTU KUMAR
2015-08-11 10:45     ` PINTU KUMAR

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.