lkml.org 
[lkml]   [2016]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm, memory hotplug: print more failure information for online_pages
On Thu, 25 Feb 2016, Chen Yucong wrote:

> > Please explain how the conversion from KERN_DEBUG to KERN_INFO level is
> > better?
>
> Like __offline_pages(), printk() in online_pages() is used for reporting
> an failed addition rather than debug information.
> Another reason is that pr_debug() is not an exact equivalent of
> printk(KERN_DEBUG ...)
>
> /* If you are writing a driver, please use dev_dbg instead */
> #if defined(CONFIG_DYNAMIC_DEBUG)
> /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here
> */
> #define pr_debug(fmt, ...) \
> dynamic_pr_debug(fmt, ##__VA_ARGS__)
> #elif defined(DEBUG)
> #define pr_debug(fmt, ...) \
> printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
> #else
> #define pr_debug(fmt, ...) \
> no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
> #endif
>

My question is why in either __offline_pages() (today's code) or
__online_pages() (your patch) we would want to leave behind a message in
the kernel log to indicate failure? I don't think it's helpful to spam
the kernel log with unnecessary information when onlining or offlining
failed. Userspace already knows the range that it attempted to online or
offline, it already has the correct error value, why spam it?

A patch to move __offline_pages() to not print this with KERN_INFO would
make more sense.

\
 
 \ /
  Last update: 2016-02-25 03:21    [W:0.045 / U:2.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site