lkml.org 
[lkml]   [2017]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC patch 7/7] timekeeping: Hack to use fine grained timestamps during boot
From
Date
On 11/28/2017 11:45 AM, Steven Rostedt wrote:
> On Tue, 28 Nov 2017 11:10:02 -0800
> Mark Salyzyn <salyzyn@android.com> wrote:
>
>> There is no guarantee of sequential order of delivery for kernel prints.
> But isn't the timestamp taken with the logbuf_lock, and then delivered
> to the printk buffer? That would guarantee that all events will be in
> order, and the timestamps be sequential. They are serialized by the
> logbuf_lock.
>
> -- Steve

To get closer to a sequential order of event delivery by timestamp, you
really should take a global timestamp (I know, local clock is _not_ a
global timestamp) first thing and as close to the event as possible,
before anything else, and outside of a lock which is merely a
synchronization action.

A) event came first, got preempted by the scheduler before lock.

B) multiple events came in order while lock held, random selection of
which one gets the lock once released.

C) scheduling differences between FIFO, BATCH, low priority, cgroup
limits, interrupt, especially since an event is usually generated
_after_ the fact related to an activity.

We do not have a guarantee of sequential order, outside the scope of
this RFC. We accept this behavior as it is good enough for the most
part, and we are all smart adults here, we can figure it out when things
get strange.

-- Mark

\
 
 \ /
  Last update: 2017-11-28 21:30    [W:0.077 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site