lkml.org 
[lkml]   [2010]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] Use ktime_get() instead of sched_clock() for blkio cgroup stats.

* Divyesh Shah <dpshah@google.com> wrote:

> This will take care of the pre-emptive kernel issue and the unbounded
> TSC drift problem. We will lose resolution though in some cases.

> - blkg->stats.start_group_wait_time = sched_clock();
> + blkg->stats.start_group_wait_time = ktime_to_ns(ktime_get());

Ugh!

ktime_get() can have insanely high overhead. Peter has added local_clock(), if
then you should use that and apply checks to make sure the result isnt
negative.

Ingo


\
 
 \ /
  Last update: 2010-06-12 09:21    [W:0.163 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site