Messages in this thread | | | Date | Tue, 2 Sep 2008 06:03:23 -0700 | From | Arjan van de Ven <> | Subject | Re: [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
| |