[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH] lib/ukdebug: print DLVL_EXTRA messages only in debug build



Hi,

> I kinda like approaches like the linux kernel has, which allows you to
> set debug output per subsystem level (which I guess in our case would
> be libraries)
In fact the proposal was to do it similar to linux kernel scheme. Here
is a sentence from
https://www.kernel.org/doc/html/v4.10/process/coding-style.html

 "While the other pr_XXX() functions print unconditionally, pr_debug()
  does not; it is compiled out by default, unless either DEBUG is
  defined or CONFIG_DYNAMIC_DEBUG is set."

Matching it to what Simon wrote:
1) uk_printk is equivalent to linux's printk with levels up to KERN_INFO

2) uk_printd is equivalent to linux's pr_debug(). However, in linux just
   defining "DEBUG" for a file or subsystem is not enough, you also need
   to change the printk level to KERN_DEBUG (e.g. echo 7 >
   /proc/sys/kernel/printk). The same happens in current patch I have
   sent, but the idea is to make debug output independent from the
   current selected level in the future.


> because global log levels of high verbosity can end up drowning you in
> messages.
Right, non-debug output should be readable even at maximum verbosity
level. If a print spits to many messages it either should be pr_debug
(or whatever we name it), or, it should be rate limited.

> However, I'm aware that's a bit of a larger redesign, so I'm not sure we 
> want to go for it at the moment.
This is dynamic print. We will get there eventually. This patch is a
first baby step towards it.

-Yuri.

Florian Schmidt <florian@xxxxxxxxx> writes:

> Hi everyone,
>
> On 07/31/2018 03:05 PM, Simon Kuenzer wrote:
>> Give me a +1/0/-1.
>
> I'm a 0 on this one.
>
> I agree that it's (slightly) less confusing than the current situation. 
> Then again, I kinda like approaches like the linux kernel has, which 
> allows you to set debug output per subsystem level (which I guess in our 
> case would be libraries) because global log levels of high verbosity can 
> end up drowning you in messages.
>
> However, I'm aware that's a bit of a larger redesign, so I'm not sure we 
> want to go for it at the moment.
>
> Cheers, Florian
>
> _______________________________________________
> Minios-devel mailing list
> Minios-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/minios-devel

-- 
Yuri Volchkov
Software Specialist

NEC Europe Ltd
Kurfürsten-Anlage 36
D-69115 Heidelberg

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.