From nobody Sun Dec 14 06:21:59 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E10C22A803 for ; Thu, 16 Jan 2025 14:37:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737038257; cv=none; b=UrkN2yZzJdfA/Zds/Ltd+BEDOK9/16N95E/OvFgnFNljpGLRAxXov0zTrd83qdO6znEOaAi7vHZmFMazwM7uDr5/YELAgBLhkn645FtGqQCRQZ5csUL9r8IGc/THhwnIa6FYdFsUbkbMKQqo0KpR+5ICSVCQSmgHg1q2Sbxk/6U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737038257; c=relaxed/simple; bh=Ugtpl9SH7y98fH6v7GsT0453yzZih4TWy5rrUGcv79I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-type; b=eYSTkWc1oRd635lS17TduDg0XUVeIxNKlwD9UlKenUUEOVFwuQ1w02AaDfm7828SNwk3UPcLud/getrrJSEsOD117ZQ7fEBlW42JSBpYh2RYtz/RfCca1x/ws/ZCnLPqQxQGcu3Pm1vDBJbRRHCau+pCNg5EqoygVC/wxJIsSH8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PKqTyh1q; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PKqTyh1q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737038255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=365y7JlHC80N2S+oGkqBXtlk3XrzLwH2T51QQBHq03E=; b=PKqTyh1q9hUFKvAzP433JaFTMeyP4pZkD+YFxFrfT91aVR+fpCB2sXsHHt5HhprIbjxTiH waQrJQz1+OuSZUHoZ+2pY3PqW+VqcpWrKT59BbBk/DYi63VUaAzkwwvT03XXcLhTYqsEac c4r6lyLn1eDIxI0zub9e3uGp0L4Lu+o= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-623-PL23JHHZPK27gQ5I_V-0tw-1; Thu, 16 Jan 2025 09:37:34 -0500 X-MC-Unique: PL23JHHZPK27gQ5I_V-0tw-1 X-Mimecast-MFC-AGG-ID: PL23JHHZPK27gQ5I_V-0tw Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DD3DB19560B4; Thu, 16 Jan 2025 14:37:32 +0000 (UTC) Received: from isengard.. (vm-10-0-109-147.hosted.upshift.rdu2.redhat.com [10.0.109.147]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2CEFF195608A; Thu, 16 Jan 2025 14:37:32 +0000 (UTC) From: Phil Auld To: Alejandro Colomar Cc: linux-man@vger.kernel.org, linux-kernel@vger.kernel.org, Carlos O'Donell Subject: [PATCH v2] man/man7/sched.7: Mention autogroup disabled behavior Date: Thu, 16 Jan 2025 14:37:47 +0000 Message-ID: <20250116143747.2366152-1-pauld@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Content-Type: text/plain; charset="utf-8" The autogroup feature can be contolled at runtime when built into the kernel. Disabling it in this case still creates autogroups and still shows the autogroup membership for the task in /proc. The scheduler code will just not use the the autogroup task group. This can be confusing to users. Add a sentence to this effect to sched.7 to point this out. The kernel code shows how this is used. The sched_autogroup_enabled toggle is only used in one place. kernel/sched/autogroup.h: static inline struct task_group * autogroup_task_group(struct task_struct *p, struct task_group *tg) { extern unsigned int sysctl_sched_autogroup_enabled; int enabled =3D READ_ONCE(sysctl_sched_autogroup_enabled); if (enabled && task_wants_autogroup(p, tg)) return p->signal->autogroup->tg; return tg; } task_wants_autogroup() is in kernel/sched/autogroup.c: bool task_wants_autogroup(struct task_struct *p, struct task_group *tg) { if (tg !=3D &root_task_group) return false; ... return true; } One can see that any group set other than root also bypasses the use of the autogroup. All of the machinery around the creation of the autogroup is not effected by the toggle. From userspace: 0 /autogroup-112 nice 0 Note, systemd based system these days is not really using autogroups at all anyway because any task in a non-root cgroup bypasses the autogroup as well. Signed-off-by: Phil Auld Cc: Alejandro Colomar Cc: --- man/man7/sched.7 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/man/man7/sched.7 b/man/man7/sched.7 index 71f098e48..f0a708cd7 100644 --- a/man/man7/sched.7 +++ b/man/man7/sched.7 @@ -724,6 +724,8 @@ in the group terminates. .P When autogrouping is enabled, all of the members of an autogroup are placed in the same kernel scheduler "task group". +When disabled the group creation happens as above, and autogroup membership +is still visible in /proc, but the autogroups are not used. The CFS scheduler employs an algorithm that equalizes the distribution of CPU cycles across task groups. The benefits of this for interactive desktop performance --=20 2.47.1