mm,oom_kill: fix the comment of is_dump_unreclaim_slabs()
Subsystems (2)
PATCH 1/1 mm,oom_kill: fix the comment of is_dump_unreclaim_slabs()
fix the comment of is_dump_unreclaim_slabs(), it just check whether nr_unreclaimable slabs amount is greater than user memory.
--- mm/oom_kill.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
mm/oom_kill.c +3 -3
@@ -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 ) {
Signature · 1 line
2.25.1
Michal Hocko
maintainerQuoted 3 lines · Hui Su
fix the comment of
is_dump_unreclaim_slabs(), it just check whethernr_unreclaimableslabs 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.
Quoted 26 lines
Signed-off-by Hui Su <[email protected]>--- mm/oom_kill.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)mm/oom_kill.c +3
-3@@ -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 ) {Signature · 1 line
2.25.1
Signature · 2 lines
Michal Hocko SUSE Labs
Quoted 5 lines · Michal Hocko
Quoted 3 lines · Hui Su
fix the comment of
is_dump_unreclaim_slabs(), it just check whethernr_unreclaimableslabs amount is greater than user memory.
Quoted 9 lines
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.
Hi, Michal:
Thanks for your explanation.
I also think maybe we should delete the comment, and change the rename it to should_dump_unreclaimable_slabs().
Andrew,
Is that ok?