[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111014233445.GA28092@shutemov.name>
Date: Sat, 15 Oct 2011 02:34:45 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Paul Menage <menage@...gle.com>, Li Zefan <lizf@...fujitsu.com>,
Thomas Gleixner <tglx@...utronix.de>,
containers@...ts.linux-foundation.org,
jacob.jun.pan@...ux.intel.com,
Arjan van de Ven <arjan@...ux.intel.com>,
linux-kernel@...r.kernel.org, Matt Helsley <matthltc@...ibm.com>,
linux-api@...r.kernel.org, Kay Sievers <kay.sievers@...y.org>,
lennart@...ttering.net, harald@...hat.com, david@...ar.dk,
greg@...ah.com
Subject: Re: [PATCH, v10 3/3] cgroups: introduce timer slack controller
On Fri, Oct 14, 2011 at 03:43:48PM -0700, Andrew Morton wrote:
> On Tue, 11 Oct 2011 19:15:29 +0300
> "Kirill A. Shutemov" <kirill@...temov.name> wrote:
>
> > Every task_struct has timer_slack_ns value. This value uses to round up
> > poll() and select() timeout values. This feature can be useful in
> > mobile environment where combined wakeups are desired.
> >
> > Originally, prctl() was the only way to change timer slack value of
> > a process. So you was not able change timer slack value of another
> > process.
> >
> > cgroup subsys "timer_slack" implements timer slack controller. It
> > provides a way to set minimal timer slack value for a group of tasks.
> > If a task belongs to a cgroup with minimal timer slack value higher than
> > task's value, cgroup's value will be applied.
> >
> > Timer slack controller allows to implement setting timer slack value of
> > a process based on a policy. For example, you can create foreground and
> > background cgroups and move tasks between them based on system state.
>
> I'm having trouble understanding the value of this feature. Users can
> presently control the timer-slack of a group of processes via
> inherit-over-fork.
>
> Perhaps there's a case for providing a way for process A to set process
> B's slack. And perhaps B's children. That would be a simpler patch
> and would have the considerable advantage that it doesn't require
> cgroups.
>
> So.... why should we merge this?
Putting a task to a cgroup isn't change task's timer slack, it may affect
"effective timer slack", if min timer slack for the cgroup > task's timer
slack.
Since we don't touch task's slack value we can drag tasks between cgroups
and always get the most relaxed slack value for a task without
saving/restoring it in userspace.
--
Kirill A. Shutemov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists