linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm,oom_kill: fix the comment of is_dump_unreclaim_slabs()
@ 2020-09-26  4:15 Hui Su
  2020-10-27  7:11 ` Michal Hocko
  0 siblings, 1 reply; 2+ messages in thread
From: Hui Su @ 2020-09-26  4:15 UTC (permalink / raw)
  To: akpm, linux-mm, linux-kernel

fix the comment of is_dump_unreclaim_slabs(), it just check
whether nr_unreclaimable slabs amount is greater than user
memory.

Signed-off-by: Hui Su <sh_def@163.com>
---
 mm/oom_kill.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index e90f25d6385d..a4a47559abcd 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -168,9 +168,9 @@ static bool oom_unkillable_task(struct task_struct *p)
 	return false;
 }
 
-/*
- * Print out unreclaimble slabs info when unreclaimable slabs amount is greater
- * than all user memory (LRU pages)
+/**
+ * Check whether unreclaimable slabs amount is greater than
+ * all user memory(LRU pages).
  */
 static bool is_dump_unreclaim_slabs(void)
 {
-- 
2.25.1




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

* Re: [PATCH] mm,oom_kill: fix the comment of is_dump_unreclaim_slabs()
  2020-09-26  4:15 [PATCH] mm,oom_kill: fix the comment of is_dump_unreclaim_slabs() Hui Su
@ 2020-10-27  7:11 ` Michal Hocko
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Hocko @ 2020-10-27  7:11 UTC (permalink / raw)
  To: Hui Su; +Cc: akpm, linux-mm, linux-kernel

On Sat 26-09-20 12:15:26, Hui Su wrote:
> fix the comment of is_dump_unreclaim_slabs(), it just check
> whether nr_unreclaimable slabs amount is greater than user
> memory.

The original comment is meant to say when the function should be used.
Your update makes the comment makes it a kerneldoc for an internal
function which on its own is not very useful. It is quite clear what
the function does. The intention is not clear anymore though.

If you find the comment confusing, however, then I would just propose either
dropping it altogether or rename it to should_dump_unreclaimable_slab.
Which is quite mouthful TBH.
 
> Signed-off-by: Hui Su <sh_def@163.com>
> ---
>  mm/oom_kill.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index e90f25d6385d..a4a47559abcd 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -168,9 +168,9 @@ static bool oom_unkillable_task(struct task_struct *p)
>  	return false;
>  }
>  
> -/*
> - * Print out unreclaimble slabs info when unreclaimable slabs amount is greater
> - * than all user memory (LRU pages)
> +/**
> + * Check whether unreclaimable slabs amount is greater than
> + * all user memory(LRU pages).
>   */
>  static bool is_dump_unreclaim_slabs(void)
>  {
> -- 
> 2.25.1
> 
> 

-- 
Michal Hocko
SUSE Labs


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

end of thread, other threads:[~2020-10-27  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-26  4:15 [PATCH] mm,oom_kill: fix the comment of is_dump_unreclaim_slabs() Hui Su
2020-10-27  7:11 ` 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).