Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1718584

Re: [PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime timestamps

From John Stultz <john.stultz@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime timestamps
Date 2017-08-23 21:00 +0200
Message-ID <uhJ2F-4cF-9@gated-at.bofh.it> (permalink)
References <ufsSm-5nC-7@gated-at.bofh.it> <ufsSn-5nC-27@gated-at.bofh.it> <uhzwl-6J0-9@gated-at.bofh.it> <uhIJj-44j-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Aug 23, 2017 at 11:31 AM, Prarit Bhargava <prarit@redhat.com> wrote:
> On 08/23/2017 04:45 AM, Petr Mladek wrote:
>> I know that it would make the code more complicated. But
>> I really like the approach used by /sys/power/disk or
>> /sys/power/pm_test. They list all possible values
>> and put the selected one into [] brackets.
>>
>
> I like the idea too, however, I think that complicates things with userspace
> (which as you point out is something that we really need to be concerned
> with).  I am using /sys/modules/printk/parameters/time to indicate the
> timestamp to userspace.
>
> With my code, userspace would see "realtime" or "disabled".  With your
> suggested change they would see "disabled [realtime]".  I think that
> file needs to be a simple as possible and be a single entry for userspace
> to consume.  IMHO.
>
>> Well, this might be done in a separate patch.
>> I am not 100% sure that this actually does not break some
>> rules for sysfs.
>>
>
> I don't see anything that says I must list every available option
> but I only did a quick overview of the docs.

I think the issue is that sysfs uses a "one value per file" rule.  So
a value can be a list of possible options or the current option being
used, but mixing a list of options with some formatting to also
communicate the current option isn't strictly following the rule.
This is why we have available_clocksources and current_clocksource
entries.

That said, its not something that has been perfectly followed, so I'm
not sure how much of an issue it really is. I suspect GregKH would be
the gatekeeper on that.

thanks
-john

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime timestamps Prarit Bhargava <prarit@redhat.com> - 2017-08-17 15:20 +0200
  Re: [PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime  timestamps Mark Salyzyn <salyzyn@android.com> - 2017-08-17 17:40 +0200
    Re: [PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime  timestamps Prarit Bhargava <prarit@redhat.com> - 2017-08-22 16:10 +0200
      Re: [PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime  timestamps Petr Mladek <pmladek@suse.com> - 2017-08-22 16:30 +0200
        Re: [PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime  timestamps Prarit Bhargava <prarit@redhat.com> - 2017-08-22 16:50 +0200
  Re: [PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime  timestamps Petr Mladek <pmladek@suse.com> - 2017-08-23 10:50 +0200
    Re: [PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime  timestamps Prarit Bhargava <prarit@redhat.com> - 2017-08-23 20:40 +0200
      Re: [PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime timestamps John Stultz <john.stultz@linaro.org> - 2017-08-23 21:00 +0200

csiph-web