Re: [PATCH 2/3] tracing: Use pr_crit() instead of long fancy messages

2021-04-01 Thread Robin Murphy

On 2021-04-01 10:39, Geert Uytterhoeven wrote:

Hi Steven,

On Wed, Mar 31, 2021 at 3:40 PM Steven Rostedt  wrote:

On Wed, 31 Mar 2021 11:31:03 +0200
Geert Uytterhoeven  wrote:


This reduces kernel size by ca. 0.5 KiB.


If you are worried about size, disable tracing and it will go away
entirely. 0.5KiB is a drop in the bucket compared to what tracing adds in
size overhead.


Fair enough for this particular case, as tracing can be disabled.


I think the same argument can be applied to patch #1 - it's hard to 
imaging anyone debugging an IOMMU driver on a system where a few hundred 
bytes makes the slightest bit of difference, and for people not 
debugging IOMMU drivers it should be moot (per the message itself).


Robin.


Re: [PATCH 2/3] tracing: Use pr_crit() instead of long fancy messages

2021-04-01 Thread Geert Uytterhoeven
Hi Steven,

On Wed, Mar 31, 2021 at 3:40 PM Steven Rostedt  wrote:
> On Wed, 31 Mar 2021 11:31:03 +0200
> Geert Uytterhoeven  wrote:
>
> > This reduces kernel size by ca. 0.5 KiB.
>
> If you are worried about size, disable tracing and it will go away
> entirely. 0.5KiB is a drop in the bucket compared to what tracing adds in
> size overhead.

Fair enough for this particular case, as tracing can be disabled.

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [PATCH 2/3] tracing: Use pr_crit() instead of long fancy messages

2021-04-01 Thread Petr Mladek
On Wed 2021-03-31 09:40:07, Steven Rostedt wrote:
> On Wed, 31 Mar 2021 11:31:03 +0200
> Geert Uytterhoeven  wrote:
> 
> > This reduces kernel size by ca. 0.5 KiB.
> 
> If you are worried about size, disable tracing and it will go away
> entirely. 0.5KiB is a drop in the bucket compared to what tracing adds in
> size overhead.
> 
> Sorry, but NAK.
> 
> This has been very successful in stopping people from adding trace_printk()
> to the kernel, and I like to keep it that way.

I agree with Steven. I believe that the eye-catching form is
important.

Anyway, all three patches are replacing text that have
many common parts. It is:

pr_warn("\n");
pr_warn("**\n");
pr_warn("**   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **\n");
pr_warn("**  **\n");
pr_warn("**  **\n");
pr_warn("**  **\n");
pr_warn("** **\n");
pr_warn("**  **\n");
pr_warn("** If you see this message and you are not debugging**\n");
pr_warn("** the kernel, report this immediately to your vendor!  **\n");
pr_warn("**  **\n");
pr_warn("**   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **\n");
pr_warn("**\n");

It might be useful to avoid cut&pasting this entire blob and unify the
common parts.

My only concern is how to define the caller-specific lines so that
they fit with the common ones. They should not be longer than the
header and footer. We need to find a good compromise between
usability and over-engineering.

Also we have to keep bikeshading under control ;-)

Best Regards,
Petr


Re: [PATCH 2/3] tracing: Use pr_crit() instead of long fancy messages

2021-03-31 Thread Steven Rostedt
On Wed, 31 Mar 2021 11:31:03 +0200
Geert Uytterhoeven  wrote:

> This reduces kernel size by ca. 0.5 KiB.

If you are worried about size, disable tracing and it will go away
entirely. 0.5KiB is a drop in the bucket compared to what tracing adds in
size overhead.

Sorry, but NAK.

This has been very successful in stopping people from adding trace_printk()
to the kernel, and I like to keep it that way.

-- Steve