Skip to content

Commit

Permalink
delayacct: Use ktime_get_ts()
Browse files Browse the repository at this point in the history
do_posix_clock_monotonic_gettime() is a leftover from the initial
posix timer implementation which maps to ktime_get_ts(). Remove the
silly wrapper while at it.

Signed-off-by: Thomas Gleixner <[email protected]>
Cc: John Stultz <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
KAGA-KOKO committed Jun 12, 2014
1 parent 2200182 commit b5d7682
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions kernel/delayacct.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ void __delayacct_tsk_init(struct task_struct *tsk)
spin_lock_init(&tsk->delays->lock);
}

/*
* Start accounting for a delay statistic using
* its starting timestamp (@start)
*/

static inline void delayacct_start(struct timespec *start)
{
do_posix_clock_monotonic_gettime(start);
}

/*
* Finish delay accounting for a statistic using
* its timestamps (@start, @end), accumalator (@total) and @count
Expand All @@ -67,7 +57,7 @@ static void delayacct_end(struct timespec *start, struct timespec *end,
s64 ns;
unsigned long flags;

do_posix_clock_monotonic_gettime(end);
ktime_get_ts(end);
ts = timespec_sub(*end, *start);
ns = timespec_to_ns(&ts);
if (ns < 0)
Expand All @@ -81,7 +71,7 @@ static void delayacct_end(struct timespec *start, struct timespec *end,

void __delayacct_blkio_start(void)
{
delayacct_start(&current->delays->blkio_start);
ktime_get_ts(&current->delays->blkio_start);
}

void __delayacct_blkio_end(void)
Expand Down Expand Up @@ -169,7 +159,7 @@ __u64 __delayacct_blkio_ticks(struct task_struct *tsk)

void __delayacct_freepages_start(void)
{
delayacct_start(&current->delays->freepages_start);
ktime_get_ts(&current->delays->freepages_start);
}

void __delayacct_freepages_end(void)
Expand Down

0 comments on commit b5d7682

Please sign in to comment.