public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: memcontrol: Skip test_mem_cgroup_node_reclaimable() when no MAX_NUMNODES or not more than 1
@ 2014-12-05 22:27 Chen Gang
  2014-12-07 10:33 ` Michal Hocko
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Gang @ 2014-12-05 22:27 UTC (permalink / raw)
  To: hannes, mhocko; +Cc: cgroups, linux-kernel@vger.kernel.org, linux-mm

test_mem_cgroup_node_reclaimable() is only used when "MAX_NUMNODES > 1",
so move it into related quote.

The related warning (with allmodconfig under parisc):

    CC      mm/memcontrol.o
  mm/memcontrol.c:1629:13: warning: 'test_mem_cgroup_node_reclaimable' defined but not used [-Wunused-function]
   static bool test_mem_cgroup_node_reclaimable(struct mem_cgroup *memcg,
               ^

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c6ac50e..d538b08 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1616,6 +1616,7 @@ static void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask,
 			 NULL, "Memory cgroup out of memory");
 }
 
+#if MAX_NUMNODES > 1
 /**
  * test_mem_cgroup_node_reclaimable
  * @memcg: the target memcg
@@ -1638,7 +1639,6 @@ static bool test_mem_cgroup_node_reclaimable(struct mem_cgroup *memcg,
 	return false;
 
 }
-#if MAX_NUMNODES > 1
 
 /*
  * Always updating the nodemask is not very good - even if we have an empty
-- 
1.9.3

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

* Re: [PATCH] mm: memcontrol: Skip test_mem_cgroup_node_reclaimable() when no MAX_NUMNODES or not more than 1
  2014-12-05 22:27 [PATCH] mm: memcontrol: Skip test_mem_cgroup_node_reclaimable() when no MAX_NUMNODES or not more than 1 Chen Gang
@ 2014-12-07 10:33 ` Michal Hocko
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Hocko @ 2014-12-07 10:33 UTC (permalink / raw)
  To: Chen Gang; +Cc: hannes, cgroups, linux-kernel@vger.kernel.org, linux-mm

Hi,
this has been fixed last week already
http://marc.info/?l=linux-mm&m=141751847710864&w=2

On Sat 06-12-14 06:27:57, Chen Gang wrote:
> test_mem_cgroup_node_reclaimable() is only used when "MAX_NUMNODES > 1",
> so move it into related quote.
> 
> The related warning (with allmodconfig under parisc):
> 
>     CC      mm/memcontrol.o
>   mm/memcontrol.c:1629:13: warning: 'test_mem_cgroup_node_reclaimable' defined but not used [-Wunused-function]
>    static bool test_mem_cgroup_node_reclaimable(struct mem_cgroup *memcg,
>                ^
> 
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  mm/memcontrol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index c6ac50e..d538b08 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -1616,6 +1616,7 @@ static void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask,
>  			 NULL, "Memory cgroup out of memory");
>  }
>  
> +#if MAX_NUMNODES > 1
>  /**
>   * test_mem_cgroup_node_reclaimable
>   * @memcg: the target memcg
> @@ -1638,7 +1639,6 @@ static bool test_mem_cgroup_node_reclaimable(struct mem_cgroup *memcg,
>  	return false;
>  
>  }
> -#if MAX_NUMNODES > 1
>  
>  /*
>   * Always updating the nodemask is not very good - even if we have an empty
> -- 
> 1.9.3

-- 
Michal Hocko
SUSE Labs

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

* Re: [PATCH] mm: memcontrol: Skip test_mem_cgroup_node_reclaimable() when no MAX_NUMNODES or not more than 1
@ 2014-12-07 13:53 Chen Gang
  0 siblings, 0 replies; 3+ messages in thread
From: Chen Gang @ 2014-12-07 13:53 UTC (permalink / raw)
  To: Michal Hocko; +Cc: hannes, cgroups,  linux-kernel@vger.kernel.org

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1705 bytes --]

OK, thanks. I shall try to send another patch to upstream kernel
within this month.

Send from Lenovo A788t.

Michal Hocko <mhocko@suse.cz> wrote:

>Hi,
>this has been fixed last week already
>http://marc.info/?l=linux-mm&m=141751847710864&w=2
>
>On Sat 06-12-14 06:27:57, Chen Gang wrote:
>> test_mem_cgroup_node_reclaimable() is only used when "MAX_NUMNODES > 1",
>> so move it into related quote.
>> 
>> The related warning (with allmodconfig under parisc):
>> 
>>     CC      mm/memcontrol.o
>>   mm/memcontrol.c:1629:13: warning: 'test_mem_cgroup_node_reclaimable' defined but not used [-Wunused-function]
>>    static bool test_mem_cgroup_node_reclaimable(struct mem_cgroup *memcg,
>>                ^
>> 
>> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
>> ---
>>  mm/memcontrol.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
>> index c6ac50e..d538b08 100644
>> --- a/mm/memcontrol.c
>> +++ b/mm/memcontrol.c
>> @@ -1616,6 +1616,7 @@ static void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask,
>>  			 NULL, "Memory cgroup out of memory");
>>  }
>>  
>> +#if MAX_NUMNODES > 1
>>  /**
>>   * test_mem_cgroup_node_reclaimable
>>   * @memcg: the target memcg
>> @@ -1638,7 +1639,6 @@ static bool test_mem_cgroup_node_reclaimable(struct mem_cgroup *memcg,
>>  	return false;
>>  
>>  }
>> -#if MAX_NUMNODES > 1
>>  
>>  /*
>>   * Always updating the nodemask is not very good - even if we have an empty
>> -- 
>> 1.9.3
>
>-- 
>Michal Hocko
>SUSE Labs
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

end of thread, other threads:[~2014-12-07 13:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-05 22:27 [PATCH] mm: memcontrol: Skip test_mem_cgroup_node_reclaimable() when no MAX_NUMNODES or not more than 1 Chen Gang
2014-12-07 10:33 ` Michal Hocko
  -- strict thread matches above, loose matches on Subject: below --
2014-12-07 13:53 Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox