Re: [PATCH 3/6] sched/fair: Change the variable to hold the number of periods to 32bit integer

From: Yuyang Du
Date: Thu Apr 28 2016 - 22:15:46 EST


On Thu, Apr 28, 2016 at 10:29:55AM -0700, bsegall@xxxxxxxxxx wrote:
> Yuyang Du <yuyang.du@xxxxxxxxx> writes:
>
> > Now a period is about 1ms, so a 32-bit unsigned integer can approximately
> > hold a maximum of 49 (=2^32/1000/3600/24) days, which means it is big enough
> > and 64-bit is needless.
> >
> If a thread sleeps for 49 days and then wakes up this would be wrong...
> but it also would just result in it not being decayed to zero, and even
> then only if it was in a very small window, so it doesn't seem like a
> huge deal if it happens.

Oh, yeah, and we wouldn't know that task is as sleepy as it realy is. :)