Hello Dave,
Sorry for late. And I think my last mail is not that clear, so I will
add some explanation here.
And firstly, some answers to your question.
1. offset means the offset of the clock to the monotonic time.
2. If offset is 0 or without offset, the clock gets the monotonic time
with it.
3. If offset is not 0, lick clock 0 on cpu 0, the time of this clock is
monotonic time together with the value of offset. Additionally,
expiration of the clock is also based on the offset.
If I want to compare expiration with current time, I should first add
offset with monotonic time(I use uptime in my command, for accurate time
is unable to get), then get the current time of the clock.
At 2013-3-2 5:35, Dave Anderson wrote:
Hi Qiao,
Clarify this for me -- the offset value for the ktime_get_real() timer is
presumably the current per-timer clock value for that timer:
cpu: 0 HRTIMER_CPU_BASE: ffff880004159d20
clock: 0 HRTIMER_CLOCK_BASE: ffff880004159d28
OFFSET: 1277723463192897448
GET_TIME: ktime_get_real
ACTIVE TIMERS:
EXPIRES HRTIMER FUNCTION
1277723709520405731-1277723709520455731 ffff88001cc71d18
ffffffff81093e00<hrtimer_wakeup>
But what does an offset of 0 mean for ktime_get() timers?
clock: 1 HRTIMER_CLOCK_BASE: ffff880004159d68
OFFSET: 0
GET_TIME: ktime_get
ACTIVE TIMERS:
EXPIRES HRTIMER FUNCTION
205155628339-205156606338 ffff88001dfa1a68
ffffffff81093e00<hrtimer_wakeup>
205500000000-205500000000 ffff880004159e20
ffffffff810a0290<tick_sched_timer>
212807104852-212807154852 ffff88000355fea8
ffffffff81093e00<hrtimer_wakeup>
221875226353-221905226352 ffff880003611a68
ffffffff81093e00<hrtimer_wakeup>
237880877947-237880927947 ffff88001df2dea8
ffffffff81093e00<hrtimer_wakeup>
254807591647-254877419646 ffff88001d67ba68
ffffffff81093e00<hrtimer_wakeup>
347174079293-347174079293 ffff8800035edc68 ffffffff810701a0<it_real_fn>
And for the old-style hrtimers, there is no offset value shown at all. What would
their expires values compare to?
clock: 1 HRTIMER_BASE: ffff810009006500
GET_TIME: ktime_get
ACTIVE TIMERS:
EXPIRES HRTIMER FUNCTION
614160200709018 ffff81042e432ab0 ffffffff80095103<it_real_fn>
614160235717018 ffff8103d93681b0 ffffffff80095103<it_real_fn>
Dave
--
Crash-utility mailing list
Crash-utility(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
--
--
Regards
Qiao Nuohan