Re: printk meeting at LPC
From: Tetsuo Handa
Date: Mon Sep 16 2019 - 00:30:34 EST
On 2019/09/13 22:26, John Ogness wrote:
> 6. A new may-sleep function pr_flush() will be made available to wait
> for all previously printk'd messages to be output on all consoles before
> proceeding. For example:
>
> pr_cont("Running test ABC... ");
> pr_flush();
>
> do_test();
>
> pr_cont("PASSED\n");
> pr_flush();
Don't we need to allow printk() callers to know the sequence number which
the printk() has queued? Something like
u64 seq;
pr_info(...);
pr_info(...);
pr_info(...);
seq = pr_current_seq();
pr_wait_seq(seq);
in case concurrently executed printk() flooding keeps adding a lot of
pending output?
By the way, do we need to keep printk() return bytes like printf() ?
Maybe we can make printk() return "void", for almost nobody can do
meaningful things with the return value.
> 9. Support for printk dictionaries will be discontinued. I will look
> into who is using this and why. If printk dictionaries are important for
> you, speak up now!
I think that dev_printk() is using "const char *dict, size_t dictlen," part
via create_syslog_header(). Some userspace programs might depend on
availability of such information.