linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: xiang xiao <xiaoxiang781216@gmail.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	linux-kernel@vger.kernel.org, Xiang Xiao <xiaoxiang@xiaomi.com>
Subject: Re: [PATCH] printk: add KERN_NOTIME to skip the timestamp
Date: Wed, 13 Feb 2019 16:52:49 +0800	[thread overview]
Message-ID: <CAH2Cfb-vv8cAUqpv3vKMiYEg_W=5CGDqZXA9BkCukRONahWoxg@mail.gmail.com> (raw)
In-Reply-To: <20190213080852.GA1702@jagdpanzerIV>

On Wed, Feb 13, 2019 at 4:08 PM Sergey Senozhatsky
<sergey.senozhatsky.work@gmail.com> wrote:
>
> On (02/13/19 15:14), xiang xiao wrote:
> >
> > But how can I precisely control timestamp on/off per message
> > through sysfs node?
> >
>
> Hmm. I don't know how many kernel printk-s you have and how often
> do you write to kmsg.

It depend on use case, but I plan to create a generic driver which
could reuse by all rpmsg based remoteproc.
This is the driver for upstream:
https://github.com/thesofproject/linux/pull/177/commits/a0b7009fede5552dc98733f2996a8140bff62455
so we need more precisely control here.

> I was thinking about something like this:
>

>         echo 0 > /...printk.../time
>         dump buffer to /dev/kmsg
>         echo 1 > /...printk../time
>

Another problem is how to control sysfs node from driver code
naturally, the concurrency and global side effect also need to
address.

> - If you would have several kernel printk-s in the meantime, then
>   those would not have timestamps, but you kinda can roughly guess
>   it
>
>         write [1243] foo > /dev/kmsg
>         write [1244] foo > /dev/kmsg
>                 << printk(bar)               <timestamp ~[1244,1245]>
>         write [1245] foo > /dev/kmsg
>
> Maybe this won't suffice.
>
>         -ss

  reply	other threads:[~2019-02-13  8:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 18:11 [PATCH] printk: add KERN_NOTIME to skip the timestamp Xiang Xiao
2019-02-12 19:46 ` Steven Rostedt
2019-02-13  6:19   ` xiang xiao
2019-02-13  6:29     ` Sergey Senozhatsky
2019-02-13  6:38       ` Sergey Senozhatsky
2019-02-13  7:14         ` xiang xiao
2019-02-13  8:08           ` Sergey Senozhatsky
2019-02-13  8:52             ` xiang xiao [this message]
2019-02-13 13:19     ` Petr Mladek
2019-02-13 13:49       ` xiang xiao
2019-02-13 13:47     ` Steven Rostedt
2019-02-13 14:00       ` xiang xiao
2019-02-13 14:31         ` Steven Rostedt
2019-02-13 16:25           ` xiang xiao
2019-02-14  1:26           ` Sergey Senozhatsky
2019-02-14  8:48           ` Petr Mladek
2019-02-13  0:48 ` Sergey Senozhatsky
2019-02-13  6:25   ` xiang xiao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH2Cfb-vv8cAUqpv3vKMiYEg_W=5CGDqZXA9BkCukRONahWoxg@mail.gmail.com' \
    --to=xiaoxiang781216@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=xiaoxiang@xiaomi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).