From mboxrd@z Thu Jan 1 00:00:00 1970 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 5F85522ACC6 for ; Thu, 16 Jan 2025 14:14:53 +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=1737036895; cv=none; b=T4ToWx2CyIRxt/iEWX6VQUrh7WNFG7qvpWfBXWUttXPwss+OefP0nlpOOd7CxWH19y3F43rrG/0f22/F7ln+rqFwdaWaU4J4x94+cn3XnEkv2oKt82IxzOpUMxhCsiubPHdrRhcGlVc65c326UmWMtp7FbEsKh0BiOxYXKkL2y4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737036895; c=relaxed/simple; bh=SZjPpRxiV7sqca3BMcy6MppZ2QsadsXP9wjKG8W1E2I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FrI/LFCqjKKI/csJpW+Dp7sRVKglIVe3cOJs53jVMlixNMmhpD1c4ZZlckice4GfDefgc3e+krkTb7zPrwhXWMoIyLUgoov3+L1qMg295tYPeVbyCYrQHiryctviIvaeKVT7Ex7sc6RulDzFO8MMvcqgwCnr/vDsWUj2PNACtDU= 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=H704zZiT; 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="H704zZiT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737036892; 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: in-reply-to:in-reply-to:references:references; bh=0+1pMScv/P1lMgD0y4/lgXAMlLY8SFDkgSS9rPVeXkg=; b=H704zZiTYFDJr0DkM5DmretDYuXa43V+U9D7wdBq8wy+f94rJVDqOgW6O3mUls9fbfLszz oexAd8rBhFxzsjT+7oh9KYrxYGS0QXj7ai8t3JMLfELt2Q1gTB8FE6APl92P8ZYMScDb+N elN9lRd5yFWSUekuTwjvFksA75RPIrs= Received: from mx-prod-mc-02.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-611-iBrAJP9FPGuzuelT3yAWWg-1; Thu, 16 Jan 2025 09:14:50 -0500 X-MC-Unique: iBrAJP9FPGuzuelT3yAWWg-1 X-Mimecast-MFC-AGG-ID: iBrAJP9FPGuzuelT3yAWWg Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E0FDE1955DC6; Thu, 16 Jan 2025 14:14:48 +0000 (UTC) Received: from pauld.westford.csb (unknown [10.22.88.147]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DCB781955F10; Thu, 16 Jan 2025 14:14:47 +0000 (UTC) Date: Thu, 16 Jan 2025 09:14:45 -0500 From: Phil Auld To: Alejandro Colomar Cc: linux-man@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] sched: Mention autogroup disabled behavior Message-ID: <20250116141445.GB7382@pauld.westford.csb> References: <20250116124654.2365691-1-pauld@redhat.com> <20250116135315.GA7382@pauld.westford.csb> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 On Thu, Jan 16, 2025 at 02:59:20PM +0100 Alejandro Colomar wrote: > Hi Phil, > > On Thu, Jan 16, 2025 at 08:53:15AM -0500, Phil Auld wrote: > > This is actually part of the problem. It's very hard to see this > > from userspace. I can show a shell session that shows that autogroup > > is disabled and that my task has an autogroup in /proc but determining > > that the autogroup is not being used not so much. (I may be missing > > something obvious but I could not find it). > > > > I had to look at the kernel code: > > > > 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 = READ_ONCE(sysctl_sched_autogroup_enabled); > > > > if (enabled && task_wants_autogroup(p, tg)) > > return p->signal->autogroup->tg; > > > > return tg; > > } > > > > bool task_wants_autogroup(struct task_struct *p, struct task_group *tg) > > { > > if (tg != &root_task_group) > > return false; > > ... > > > > } > > > > The former being called from sched_group_fork() and sched_get_task_group(). > > > > I suppose looking at /proc/pid/cgroup and seeing it report not "0::/" > > is part of it since it then won't be in root task group. > > > > To some extent any systemd based system these days is not really > > using autogroup at all anyway. > > > > I can put some of the above in there or just something like: > > > > # cat /proc/sys/kernel/sched_autogroup_enabled > > 0 > > # cat /proc/$$/autogroup > > /autogroup-112 nice 0 > > > > > > Thoughts? > > Both. :) > > The more information we have in the commit message, the better (in case > someone needs to check in the future, that will give more context). > Okay, fair enough. Will do. It was just hard for me to show that the listed autogroup is not really being used. I'll put the above in there and send v2. Thanks! Cheers, Phil > > Cheers, > Alex > > -- > --