Skip to contentSkip to conversation

sched_fair: vruntime and min_vruntime will be overflow?

DISCUSSION figo zhang 2 participants 2 messages Mar 5, 2010

lore
Share & tools
lore

figo zhang

author
#0 lore raw

hi,

when enqueue or dequeue the task, the se->vruntime and cfs_rq->min_vruntime will increased, i want to know it is will be overflow in future time?

Best,
Figo.zhang

#1 lore raw
Quoted 4 lines

hi,

when enqueue or dequeue the task, the se->vruntime and cfs_rq->min_vruntime will increased, i want to know it is will be overflow in future time?

Let's quick calculation.

type of vruntime is u64.

1 year = 365 x 24 x 60 x 60 x 1000 x 1000 x 1000 nanosec

           ~= 3 x 10^16
           ~= 2^55

2^64 / 2^55 = 2^9 ~= 500 year.

then, 500 years after you can see overflow if you still live. :)