lkml.org 
[lkml]   [2008]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/13] hrtimer: create a "timer_slack" field in the task struct
On Tue, 2 Sep 2008 12:04:39 +0200
Pavel Machek <pavel@suse.cz> wrote:

> Hi!
>
> > From: Arjan van de Ven <arjan@linux.intel.com>
> > Subject: [PATCH] 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.
>
> Is this a good idea? IMO it should be per-syscall, not per
> application.

Yes it would be nice to have new syscalls for this
and no, nobody and nothing would use them.

THe really big advantag of this default-from-task-struct is that you
can have a program similar to "nice" that allows you to run an existing
program at a specified granularity (say, a version of acroread that has
a really high wakeup count but you still want to save power)

> Threads would certainly like private values...

of course these are per thread.. they're in the task struct after all

> and this makes really ugly interface.

prctl() is ugly?

>
> ...plus it bloats task struct.
>
> ...where did the sys_indirect proposals go? We created new syscalls,
> right?

... which nobody uses today.
It's not just new syscalls, it's a new glibc api as well at that point.


--
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings,
visit http://www.lesswatts.org


\
 
 \ /
  Last update: 2008-09-02 15:05    [W:0.083 / U:3.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site