Re: [PATCH 2/4] nohz: Synchronize sleep time stats with seqlock

From: Oleg Nesterov
Date: Wed Aug 21 2013 - 14:39:00 EST


On 08/21, Peter Zijlstra wrote:
>
> OK, so do not remove the MAX_SCHEDULE_TIMEOUT check from
> __schedule_timeout() and change the above to:
>
> static __always_inline long schedule_timeout(long timeout)
> {
> if (__builtin_constant_p(timeout) && timeout == MAX_SCHEDULE_TIMEOUT) {
> schedule();
> return timeout;
> }
> return __schedule_timeout(timeout);
> }

Agreed, this looks nice.

Hmm. And this can simplify some changes in linux/wait.h I am going
to resend.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/