RE: [PATCH v2] printk: add option to print cpu id

From: Venu Byravarasu
Date: Fri Aug 03 2012 - 05:44:34 EST


> -----Original Message-----
> From: Pandita, Vikram [mailto:vikram.pandita@xxxxxx]
> Sent: Friday, August 03, 2012 3:07 PM
> To: Venu Byravarasu
> Cc: gregkh@xxxxxxxxxxxxxxxxxxx; kay@xxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; Mike Turquette; Vimarsh Zutshi
> Subject: Re: [PATCH v2] printk: add option to print cpu id
>
> Venu
>
> On Fri, Aug 3, 2012 at 2:32 AM, Venu Byravarasu <vbyravarasu@xxxxxxxxxx>
> wrote:
>
> To gain insight on SMP system logging behavior, the price to pay is
> the extra 4 chars per printk line,
> just like printk-time adds 15 chars to each line. Both options can be
> disabled as desired.
>
> So i am not sure what kind of option you are proposing?

May be I'm not correct, but IMO having local file level macros to
add wrappers on top of printk would serve this purpose.

Anyways its individual choice.

> Do u imply PRINTK_TIME is not right then?
>
> >
> >> Is it not better to have macros which will have wrapper to printk with
> >> required
> >> debug info added? E.g. cpu# in your case.
> >> If by default we add cupid, is it not over head in each message getting
> >> printed with printk?
> >>
> >> >
> >> > Known limitation is if the system gets preempted between function call
> and
> >> > actual printk, the reported cpu-id might not be accurate. But most of the
> >> > times its seen to give a good feel of how the N cpu's in the system are
> >> > getting loaded.
> >> >
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> >> the body of a message to majordomo@xxxxxxxxxxxxxxx
> >> More majordomo info at http://vger.kernel.org/majordomo-info.html
> >> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/