mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
hrtimer: create a "timer_slack" field in the task struct
We want to be able to control the default "rounding" that is used by select() and poll() and friends. This is a per process property (so that we can have a "nice" like program to start certain programs with a looser or stricter rounding) that can be set/get via a prctl(). For this purpose, a field called "timer_slack_ns" is added to the task struct. In addition, a field called "default_timer_slack"ns" is added so that tasks easily can temporarily to a more/less accurate slack and then back to the default. The default value of the slack is set to 50 usec; this is significantly less than 2.6.27's average select() and poll() timing error but still allows the kernel to group timers somewhat to preserve power behavior. Applications and admins can override this via the prctl() Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
This commit is contained in:
parent
654c8e0b1c
commit
6976675d94
5 changed files with 26 additions and 0 deletions
|
@ -78,4 +78,11 @@
|
|||
#define PR_GET_SECUREBITS 27
|
||||
#define PR_SET_SECUREBITS 28
|
||||
|
||||
/*
|
||||
* Get/set the timerslack as used by poll/select/nanosleep
|
||||
* A value of 0 means "use default"
|
||||
*/
|
||||
#define PR_SET_TIMERSLACK 29
|
||||
#define PR_GET_TIMERSLACK 30
|
||||
|
||||
#endif /* _LINUX_PRCTL_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue