lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 15 Mar 2011 11:11:00 +0200
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
Subject: Re: [PATCH, v9 3/3] cgroups: introduce timer slack controller

On Mon, Mar 14, 2011 at 04:46:52PM -0700, Andrew Morton wrote:
> On Mon, 14 Mar 2011 16:05:24 +0200
> Kirill A. Shutemov" <kirill@...temov.name> wrote:
> 
> > +Overview
> > +--------
> > +
> > +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.
> 
> (quoting myself from last time)
> 
> Why do we need a cgroup for this as opposed to (say) inheritance over
> fork(), or a system-wide knob, or a per-process/threadgroup knob, or
> just leaving the existing code as-is?  Presumably you felt that a
> cgroup approach is better for manageability, but you didn't tell us
> about this and you didn't explore alternative ways of solving the
> problem-which-you-didn't-describe.

The main goal is reducing wakeups without affecting user experience.
Only userspace knows which tasks are important for UX. So we needed a
mechanism to define a policy in userspace.

Currently timer slack value inheritance over fork().

System-wide/threadgroup knob doesn't allow to change timer slack value of
a particular process. It's needed for foreground/background use-case.

With per-process know we have to reinvent grouping of tasks in userspace.

cgroups is a good solution for it, from my point of view.

> 
> I'm still having trouble seeing why we should merge this.  Who will use
> it, and for what reason and what benefits will they see?  Quantified
> benefits, if possible!
> 

-- 
 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ