linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mm,oom: Remove unused argument from oom_scan_process_thread().
@ 2016-05-21  2:00 Tetsuo Handa
  2016-05-23  8:13 ` Michal Hocko
  0 siblings, 1 reply; 2+ messages in thread
From: Tetsuo Handa @ 2016-05-21  2:00 UTC (permalink / raw)
  To: mhocko, akpm, rientjes; +Cc: linux-mm, Tetsuo Handa

oom_scan_process_thread() does not use totalpages argument.
oom_badness() uses it.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
 include/linux/oom.h | 2 +-
 mm/memcontrol.c     | 2 +-
 mm/oom_kill.c       | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/oom.h b/include/linux/oom.h
index 8346952..c63de01 100644
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -90,7 +90,7 @@ extern void check_panic_on_oom(struct oom_control *oc,
 			       struct mem_cgroup *memcg);
 
 extern enum oom_scan_t oom_scan_process_thread(struct oom_control *oc,
-		struct task_struct *task, unsigned long totalpages);
+					       struct task_struct *task);
 
 extern bool out_of_memory(struct oom_control *oc);
 
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index ab574d8..49cee6f 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1287,7 +1287,7 @@ static bool mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask,
 
 		css_task_iter_start(&iter->css, &it);
 		while ((task = css_task_iter_next(&it))) {
-			switch (oom_scan_process_thread(&oc, task, totalpages)) {
+			switch (oom_scan_process_thread(&oc, task)) {
 			case OOM_SCAN_SELECT:
 				if (chosen)
 					put_task_struct(chosen);
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 8e151d0..743afdd 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -274,7 +274,7 @@ static enum oom_constraint constrained_alloc(struct oom_control *oc,
 #endif
 
 enum oom_scan_t oom_scan_process_thread(struct oom_control *oc,
-			struct task_struct *task, unsigned long totalpages)
+					struct task_struct *task)
 {
 	if (oom_unkillable_task(task, NULL, oc->nodemask))
 		return OOM_SCAN_CONTINUE;
@@ -311,7 +311,7 @@ static struct task_struct *select_bad_process(struct oom_control *oc,
 	for_each_process(p) {
 		unsigned int points;
 
-		switch (oom_scan_process_thread(oc, p, totalpages)) {
+		switch (oom_scan_process_thread(oc, p)) {
 		case OOM_SCAN_SELECT:
 			chosen = p;
 			chosen_points = ULONG_MAX;
-- 
1.8.3.1

--
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] 2+ messages in thread

* Re: [PATCH 1/2] mm,oom: Remove unused argument from oom_scan_process_thread().
  2016-05-21  2:00 [PATCH 1/2] mm,oom: Remove unused argument from oom_scan_process_thread() Tetsuo Handa
@ 2016-05-23  8:13 ` Michal Hocko
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Hocko @ 2016-05-23  8:13 UTC (permalink / raw)
  To: Tetsuo Handa; +Cc: akpm, rientjes, linux-mm

On Sat 21-05-16 11:00:41, Tetsuo Handa wrote:
> oom_scan_process_thread() does not use totalpages argument.
> oom_badness() uses it.
> 
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
>  include/linux/oom.h | 2 +-
>  mm/memcontrol.c     | 2 +-
>  mm/oom_kill.c       | 4 ++--
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/linux/oom.h b/include/linux/oom.h
> index 8346952..c63de01 100644
> --- a/include/linux/oom.h
> +++ b/include/linux/oom.h
> @@ -90,7 +90,7 @@ extern void check_panic_on_oom(struct oom_control *oc,
>  			       struct mem_cgroup *memcg);
>  
>  extern enum oom_scan_t oom_scan_process_thread(struct oom_control *oc,
> -		struct task_struct *task, unsigned long totalpages);
> +					       struct task_struct *task);
>  
>  extern bool out_of_memory(struct oom_control *oc);
>  
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index ab574d8..49cee6f 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -1287,7 +1287,7 @@ static bool mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask,
>  
>  		css_task_iter_start(&iter->css, &it);
>  		while ((task = css_task_iter_next(&it))) {
> -			switch (oom_scan_process_thread(&oc, task, totalpages)) {
> +			switch (oom_scan_process_thread(&oc, task)) {
>  			case OOM_SCAN_SELECT:
>  				if (chosen)
>  					put_task_struct(chosen);
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index 8e151d0..743afdd 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -274,7 +274,7 @@ static enum oom_constraint constrained_alloc(struct oom_control *oc,
>  #endif
>  
>  enum oom_scan_t oom_scan_process_thread(struct oom_control *oc,
> -			struct task_struct *task, unsigned long totalpages)
> +					struct task_struct *task)
>  {
>  	if (oom_unkillable_task(task, NULL, oc->nodemask))
>  		return OOM_SCAN_CONTINUE;
> @@ -311,7 +311,7 @@ static struct task_struct *select_bad_process(struct oom_control *oc,
>  	for_each_process(p) {
>  		unsigned int points;
>  
> -		switch (oom_scan_process_thread(oc, p, totalpages)) {
> +		switch (oom_scan_process_thread(oc, p)) {
>  		case OOM_SCAN_SELECT:
>  			chosen = p;
>  			chosen_points = ULONG_MAX;
> -- 
> 1.8.3.1

-- 
Michal Hocko
SUSE Labs

--
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] 2+ messages in thread

end of thread, other threads:[~2016-05-23  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-21  2:00 [PATCH 1/2] mm,oom: Remove unused argument from oom_scan_process_thread() Tetsuo Handa
2016-05-23  8:13 ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).