Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Dec 2017 12:45:47 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Michael Zhilin <mizhka@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Hopefully useful: macro-controlled logger
Message-ID:  <20171210104547.GX2272@kib.kiev.ua>
In-Reply-To: <CAF19XBL6yJLvHCn_V-0ntOXSQfbRn0ULgb1-fDCWZ8oBbd_y9g@mail.gmail.com>
References:  <0dd5240f-6c70-425f-7e98-7946097ea3ef@metricspace.net> <CAF19XBL6yJLvHCn_V-0ntOXSQfbRn0ULgb1-fDCWZ8oBbd_y9g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 10, 2017 at 12:00:41PM +0300, Michael Zhilin wrote:
> Hi Eric!
> 
> Nice! This minimalistic and powerful approach looks very nice.
> 
> We have similar thing in one of kernel driver:
> https://github.com/freebsd/freebsd/blob/master/sys/dev/bhnd/bhnd_debug.h
> 
> In my opinion such kind of thing is demanded.
We already have ktr(4).  If it is too limited for some use, it should be
extended instead of adding parallel half-done implementation.

Kernel printf(9) introduces too much serialization which makes it impossible
to reproduce an issue sometimes (or often).  Also, kernel consoles are slow
due to the nature of the hardware, and serialization blocks other threads
trying to log while current message is printed.

ktr(4) avoids both of the problems.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171210104547.GX2272>