Re: [RFC] printk: add relative printk timing support

From: Kay Sievers
Date: Thu May 17 2012 - 11:37:24 EST


On Thu, May 17, 2012 at 5:02 PM, Sasha Levin <levinsasha928@xxxxxxxxx> wrote:
> This patch adds support for relative timestamps in printk output.

> Âstatic size_t print_prefix(const struct log *msg, bool syslog, char *buf)

> + Â Â Â } else if (printk_time == 2 || printk_time == 3) {
> + Â Â Â Â Â Â Â static unsigned long long last_print;

We can have multiple concurrent users of the relative time calculation, right?

I guess the last_print needs to be localized to every possible user
and concurrent instance: syslog(dmesg), syslog(/proc/kmsg), console
output, to not race against each other?

Kay
--
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/