Re: [PATCH] hrtimer: Remove overly verbose "switch to high res mode" message

From: Valdis . Kletnieks
Date: Thu Sep 24 2009 - 22:42:44 EST


On Thu, 24 Sep 2009 14:15:14 PDT, Roland Dreier said:
>
> > > - printk(KERN_DEBUG "Switched to high resolution mode on CPU %d\n",
> > > - smp_processor_id());
> >
> > Perhaps pr_debug instead?
> > It gets compiled to nothing unless DEBUG is defined.
>
> Dunno... is that kernel log message ever useful now?

There's 3 cases to consider:

1) Kernel built with CONFIG_HIGH_RES_TIMERS=n. We get no message then.

2) We have high-res timers and it succeeded. We probably don't care if that's
the usual case, so lose the message in that case, just like we probably
don't need a message that we managed to fork off init.

3) We attempted to switch to high-res mode, and it *failed*. We already throw
the appropriate KERN_WARNING for that a few lines up.

And since we issue a message in the one case we *care* about, we can
determine that the *lack* of that KERN_WARNING means the switch went OK.

Thus, we don't need the message, as it doesn't *tell* us anything we didn't
already know.

Attachment: pgp00000.pgp
Description: PGP signature