Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1342574

Re: [PATCH] mm, memory hotplug: print more failure information for online_pages

From David Rientjes <rientjes@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mm, memory hotplug: print more failure information for online_pages
Date 2016-02-25 02:50 +0100
Message-ID <r5Te1-4Ro-9@gated-at.bofh.it> (permalink)
References <r5CGd-1CZ-7@gated-at.bofh.it> <r5Pk6-27v-13@gated-at.bofh.it> <r5SBj-4Cr-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] mm, memory hotplug: print more failure information for online_pages Chen Yucong <slaoub@gmail.com> - 2016-02-24 09:10 +0100
  Re: [PATCH] mm, memory hotplug: print more failure information for  online_pages David Rientjes <rientjes@google.com> - 2016-02-24 22:40 +0100
    Re: [PATCH] mm, memory hotplug: print more failure information for  online_pages Chen Yucong <slaoub@gmail.com> - 2016-02-25 02:10 +0100
      Re: [PATCH] mm, memory hotplug: print more failure information for  online_pages David Rientjes <rientjes@google.com> - 2016-02-25 02:50 +0100

csiph-web