From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935627AbcKWLkH (ORCPT ); Wed, 23 Nov 2016 06:40:07 -0500 Received: from mout.gmx.net ([212.227.17.22]:53638 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756053AbcKWLkF (ORCPT ); Wed, 23 Nov 2016 06:40:05 -0500 Message-ID: <1479901185.4306.38.camel@gmx.de> Subject: Re: RFC: documentation of the autogroup feature From: Mike Galbraith To: "Michael Kerrisk (man-pages)" Cc: Peter Zijlstra , Ingo Molnar , linux-man , lkml , Thomas Gleixner Date: Wed, 23 Nov 2016 12:39:45 +0100 In-Reply-To: <41d802dc-873a-ff02-17ff-93ce50f3e925@gmail.com> References: <41d802dc-873a-ff02-17ff-93ce50f3e925@gmail.com> Content-Type: text/plain; charset="iso-2022-jp" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ZM58ZGe/bpy45D2ablcaJmeX31zhoy2+ZDygJJIBVtBmfRZKigM q6+ius9UOpTNkASnPBzAMxozReVz5i/E0IVvANG+079++zaOW/6sHUt42fSidN17iilQ6Vc EnRCC25CgNdEevMUOfrYiLDNyF74N4M8k+QJZe4As9wSuQzyFtiR5+OV/DHqk2EnVdCuTWe 1yKUo7MbpZc14GnT5h1og== X-UI-Out-Filterresults: notjunk:1;V01:K0:buWHzxOwJiA=:cO5tXAJ1EXJeqUiFUfIbjE 6rPWT7B2Rlj5ijkt+wWubLVwh8otsCIPR0G0DeDPhfSJDmudATTth7BgLaq/UdrKxvYo8Pey1 /DePv3g1anTiXGLTYQ4KmygrCyTum5KuJOvoH3sw9Zl05DTiU39xJXnp1wiOMLgw09bLrfbtk seu/7dp53+UC1CAXUFZ+qdY/jnQryNVlXbCoGhtQMFbi6Xk/YGzMJtHwJ+61UB3LLyBqpLhPG HbV44pDNEcQF0E0z7mEsmC67bGjoklWX5j/gU88/xO7F37ezNddoq0Xpsguf5pQp7KVK22Dwh QtMYc5dtr70ZP92hpIORPCvrdiaTvK4jfaMiPYxwzJ2TgdncyqUZbhsti27ZZ3+GsgttWTiPD u9vJLhQDTaIsOm/XtG+U+U/tw0XskpmPvjCUJGINdzI+47LgqNt/6enDk+A/g5KiIJDC0NTpK raFSlMhhpsyhoi4+AfbB/Cda4oDqspHHL9VvvFGPT2bf7NytK0POxS1oFmV7IvRvC7yrmtGNr SyaHcaqe1eyy6h8UQ7qLtww0SW2dc+XAMabdoyz8D/7YX3X2OwF6ykfL+4NOSjp3mVdOBAYnv 085ExxKMIasUMq8f+k9qykPdquskvzp2GdKtttqu+Qnr4OXMm6I+Xk6uqGATEht8CUuFn6pd1 xK74A7GMUQhtFGJ56DuJGdQJSJCppjJHV59T8MwsxnU+Wkzpba/PrsrvuPoqcB3IIZWA26xeN qn2kfb4apn8Yodk2tt6Nj74upjuCMenw5fnNzNGeg0z1MKy23FByaTvWA7T6BC80RywlZgfWG 6tr4/2M Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2016-11-22 at 16:59 +0100, Michael Kerrisk (man-pages) wrote: > ┌─────────────────────────────────────────────────────┐ > │FIXME │ > ├─────────────────────────────────────────────────────┤ > │The following is a little vague. Does it need to be │ > │made more precise? │ > └─────────────────────────────────────────────────────┘ > The CFS scheduler employs an algorithm that distributes the CPU > across task groups. As a result of this algorithm, the pro‐ > cesses in task groups that contain multiple CPU-intensive pro‐ > cesses are in effect disfavored by the scheduler. Mmmm, they're actually equalized (modulo smp fairness goop), but I see what you mean. > A process's autogroup (task group) membership can be viewed via > the file /proc/[pid]/autogroup: > > $ cat /proc/1/autogroup > /autogroup-1 nice 0 > > This file can also be used to modify the CPU bandwidth allo‐ > cated to a task group. This is done by writing a number in the > "nice" range to the file to set the task group's nice value. > The allowed range is from +19 (low priority) to -20 (high pri‐ > ority). Note that all values in this range cause a task group > to be further disfavored by the scheduler, with -20 resulting > in the scheduler mildy disfavoring the task group and +19 > greatly disfavoring it. Group nice levels exactly work the same as task nice levels, ie negative nice increases share, positive nice decreases it relative to the default nice 0. > ┌─────────────────────────────────────────────────────┐ > │FIXME │ > ├─────────────────────────────────────────────────────┤ > │Regarding the previous paragraph... My tests indi‐ │ > │cate that writing *any* value to the autogroup file │ > │causes the task group to get a lower priority. (patchlet.. I'd prefer to whack the knob, but like the on/off switch, it may be in use, so I guess we're stuck with it) > ┌─────────────────────────────────────────────────────┐ > │FIXME │ > ├─────────────────────────────────────────────────────┤ > │Is the following correct? Does the statement need to │ > │be more precise? (E.g., in precisely which circum‐ │ > │stances does the use of cgroups override autogroup?) │ > └─────────────────────────────────────────────────────┘ > The use of the cgroups(7) CPU controller overrides the effect > of autogrouping. Correct, autogroup defers to cgroups. Perhaps mention that moving a task back to the root task group will result in the autogroup again taking effect. > ┌─────────────────────────────────────────────────────┐ > │FIXME │ > ├─────────────────────────────────────────────────────┤ > │What needs to be said about autogroup and real-time │ > │tasks? │ > └─────────────────────────────────────────────────────┘ That it does not group realtime tasks, they are auto-deflected to the root task group. -Mike