LWN.net Logo

Are we really chasing the right issue?

Are we really chasing the right issue?

Posted Feb 24, 2012 9:29 UTC (Fri) by rvfh (subscriber, #31018)
In reply to: Are we really chasing the right issue? by dlang
Parent article: Short sleeps suffering from slack

Problem is:
* app dev says it should sleep 1 second
* sys owner says if you sleep, then you may sleep for 5 seconds

What do we do? Either
* sleep for 1 second, as requested, or
* sleep for up to 5 seconds and break the application

I think this calls for a new user-space API, such as:
unsigned int sleep_slack(unsigned int seconds, unsigned int slack);

But sleep's behaviour should not be changed.


(Log in to post comments)

Are we really chasing the right issue?

Posted Feb 24, 2012 9:55 UTC (Fri) by tglx (subscriber, #31301) [Link]

> But sleep's behaviour should not be changed.

The kernel does not change sleep() behaviour. It's the sysadmins choice to set slack to something large. The kernel provides the mechanism, but not the policy.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds