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. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>