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.133.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 E5F082F361A for ; Thu, 29 Jan 2026 18:34:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769711643; cv=none; b=q3lDu+5VfH+7x1ZHUJEfJoKcCblxHXaeCnDroV/m0uDsdwKGSBzdbscCoZ9g5frgDrXy5pudgQtBCaVNqdoJIAz6VrcaTt8Mm6hm+p/Ghz0O6vt0jEoxjwxBYQNSbDJMxgEfk1gImcQsoEmzuqUO4//KkrfCVhAbG7JmC5Q+Ceg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769711643; c=relaxed/simple; bh=A52a0n6mXX/vpDsPDw1aYNuXCv9EMo1cdZdHaWNhQXE=; h=From:Message-ID:Date:MIME-Version:Subject:To:Cc:References: In-Reply-To:Content-Type; b=BnaggB5k9Kc3C0yek+wj3m7K7w0HOxQkdB/rePmWh7cU18lY84Mc5bSf8VMbHUwU1Fy0kPzWe/zqGwzMPPELDLwZ4mnF2ckwEBxe5UHI7sRfP0BIBFwF/Jetq5nH/GwyxThHgktLpcIlkacELJeCl21y7VlE0XV+REqOr60Z5mk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=X2wisG1t; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=dtRll92L; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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="X2wisG1t"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="dtRll92L" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769711641; 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: in-reply-to:in-reply-to:references:references; bh=m1KTQVsHamBVnOnmhCi9myxR4ebuO1ZMb0FARjaKcqs=; b=X2wisG1t1FfkE9l68hgJjhEf9roScL9WNlONcf9BMq6cvxT0HwJJgEM0FSny4rUDiLPRzk D4IWa+vb5b34vPCgPBXhWXhtRBfbW0BGIVuWtlDuPUwwXd9OnUomeAK6NG4F0I5+ZPSnWP /YhCTemUDUHApavN76KPONx3GS10b24= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-164-2b284tLgOBy6o1szP5f79A-1; Thu, 29 Jan 2026 13:33:59 -0500 X-MC-Unique: 2b284tLgOBy6o1szP5f79A-1 X-Mimecast-MFC-AGG-ID: 2b284tLgOBy6o1szP5f79A_1769711638 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-88a2ea47fa5so42435296d6.0 for ; Thu, 29 Jan 2026 10:33:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769711638; x=1770316438; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from:from:to :cc:subject:date:message-id:reply-to; bh=m1KTQVsHamBVnOnmhCi9myxR4ebuO1ZMb0FARjaKcqs=; b=dtRll92LeyiLtlBurKKGf2etDQtxbPsyt0WBmr89g7zYORvVi+KAgIdZdzckTluUNT H/GL+EwPzE21Kf3Uu0XPoJ+d6e0z0rLN+s0mBaJ+FdpdL4hffZQPOKoM6k2bUzuo0wdK vOOr0tv6j8gl3C4AAR27C9rE3LpdOgrr0l2M3+106+JnVbNEXG7nXMgUnwObgCXBp2YJ Qd4+T4M0Q/O0OdGX0HA8uNbPEyCcwqGsH+2A61vIXvpF75iesCeTdjaW1QwOOsjDVhok T+fsTb1MbgaKRMOxEbCubFXsETb5GsU2ZVsTo+am1eg/kf+7w/D0CKfCfA9AFb4D4G9Y eqbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769711638; x=1770316438; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=m1KTQVsHamBVnOnmhCi9myxR4ebuO1ZMb0FARjaKcqs=; b=dF6qcOXaPRsPpPifA62HaKWNEXUeTvBcK2LvKWIb7V38NiEgYIvuYvozuHyW4JFmQY cbkMbyu/AAIE6Gz4HbcN2aHXwa6hGrxRxgTf3V6RQ1CiFLfolcIcI8WO+8GK1VDctZ+6 pmQXs2MePHzY55eXcOZO0EDaF6YEgBD/DQs4vL1mMJ6Kshh3q2LRP1WEaCyYPVhPJa2L gARaHA8026Ee7A2p+SSa/bemJP4QLVf9nfEHlfhqupHs7g/u58Uuq76kAiDtcSlen4Y4 Z0ghuKurjfA8sOk3xyJm/3xD8ivEumg+pPnwBxW+bTyfbBnm3zopsioKBkJGPyBNnl1p 5itQ== X-Forwarded-Encrypted: i=1; AJvYcCWo9inWhb3wnXrK/82DHIrg0RaGTIds5C666HF4gcjZKSdMcWWEUScp3vVuLHslmQ+tWBuli68RlhY+T9U=@vger.kernel.org X-Gm-Message-State: AOJu0YwBhmCkEgh9+UrlkG2KWdDR5QFlGX3vn7E5b22XfZoL4fJyjqe9 qgwRlO1WdeL8Ngk8sVYtFPnjdlvnhkNE6+UL2iqYPcen5tU9s8QuBppOnT1OPFHMrsbdq5iQJFt 9c2P7siGtrPbL4HT+wR9nQPZiJuinj12z8bj4eLMKYIKiXBd2jNqiRJvMKNwC2duAdA== X-Gm-Gg: AZuq6aIPMtDdJe+0awS/xFigMq9yt8YZtEfRPbgJhqv5QU7kmbSuh4sXTW7/gL9fQsx 1HAq1ScFKOtmqs9rsHPdsGyaJKSL5c2XEg5/XHtEhy3FdGH/vz3wBAMJh2TaqvVWhHR6h77mphd k1NxA1/F+E4zu1lqXV0hVgY+ioyRV/7qBIbw2eAFMsLg+xzsBp7rVDElRugTic1G8KvA2Q6Pk4x cPdYTo0i0BW8QSd3BOXqODsOFZ1j5FjxJDg0vZGRMBhYVfqPicwZ9hyw/+5rBNvtTSkbD0kGqeY t42o/BmSMtqQzWYL5SiPd7wqZlnmSD39njUbBsC75vou87tVTVMqiJzLE9xCn/sjPqE9VnfWjMn opoGQHub7tMJ3ZWcnLZRK/svF02+ybw627aNr/BcLmENg8y7GcDb1j66O X-Received: by 2002:a05:6214:1304:b0:894:74cf:d2fe with SMTP id 6a1803df08f44-894ea8c1941mr2388206d6.1.1769711638521; Thu, 29 Jan 2026 10:33:58 -0800 (PST) X-Received: by 2002:a05:6214:1304:b0:894:74cf:d2fe with SMTP id 6a1803df08f44-894ea8c1941mr2387736d6.1.1769711638134; Thu, 29 Jan 2026 10:33:58 -0800 (PST) Received: from ?IPV6:2601:188:c102:b180:1f8b:71d0:77b1:1f6e? ([2601:188:c102:b180:1f8b:71d0:77b1:1f6e]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-894d375ce71sm42775696d6.45.2026.01.29.10.33.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Jan 2026 10:33:57 -0800 (PST) From: Waiman Long X-Google-Original-From: Waiman Long Message-ID: <6fc1fb93-7010-4381-a9a9-68a9b81acf88@redhat.com> Date: Thu, 29 Jan 2026 13:33:56 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH -next] cgroup: increase maximum subsystem count from 16 to 32 To: Chen Ridong , =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: tj@kernel.org, hannes@cmpxchg.org, rostedt@goodmis.org, mhiramat@kernel.org, mathieu.desnoyers@efficios.com, inwardvessel@gmail.com, shakeel.butt@linux.dev, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, lujialin4@huawei.com References: <20260129063133.209874-1-chenridong@huaweicloud.com> <3a12eb16-3a91-4278-9dfd-6c6f424e7f9f@huaweicloud.com> Content-Language: en-US In-Reply-To: <3a12eb16-3a91-4278-9dfd-6c6f424e7f9f@huaweicloud.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 1/29/26 4:51 AM, Chen Ridong wrote: > > On 2026/1/29 17:23, Michal Koutný wrote: >> On Thu, Jan 29, 2026 at 06:31:33AM +0000, Chen Ridong wrote: >>> From: Chen Ridong >>> >>> The current cgroup subsystem limit of 16 is insufficient, as the number of >>> subsystems has already reached this maximum. >> Indeed. But some of them are legacy (and some novel). Do you really need >> one kernel image with every subsys config enabled? >> > We compiled with 'make allmodconfig'. > >>> Attempting to add new subsystems beyond this limit results in boot >>> failures. >> That sounds like BUILD_BUG_ON(CGROUP_SUBSYS_COUNT > 16) doesn't trigger >> during build for you. Is the macro broken? >> > The BUILD_BUG_ON(CGROUP_SUBSYS_COUNT > 16) macro worked correctly. However, I > only modified the code to allow compilation to pass, and the system subsequently > failed to boot. > >>> This patch increases the maximum number of supported cgroup subsystems from >>> 16 to 32, providing adequate headroom for future subsystem additions. >> It may be needed one day but I'd suggest binding this change with >> introduction of actual new controller. >> (As we have some CONFIG_*_V1 options that default to N, I'm thinking >> about switching config's default to N as well (like: >> CONFIG_CGROUP_CPUACCT CONFIG_CGROUP_DEVICE CONFIG_CGROUP_FREEZER >> CONFIG_CGROUP_DEBGU), arch/x86/configs/x86_64_defconfig is not exactly >> pinnacle of freshness :-/) >> >> > Can I propose increasing the maximum number now? If we switch certain configs to > default N and then a new subsystem is added later, the default configuration may > work fine, but it will become a problem under allmodconfig — which some users > actually rely on. > > Besides, this shouldn't be a major change, right? Yes, I agreed that it is not a major change. I count the number of SUBSYS() in include/linux/cgroup_subsys.h and there are exactly 16 of them. So introduction of a new cgroup subsystem will break the current limit. I remember that there was talk about adding scheduling cgroup on the GPU side. One day, a new cgroup subsystem may be added without the awareness that the subsystem limit has to be extended causing issue down the line. So I support the idea of extending it now so that there is one less thing to worry about when a new cgroup subsystem is added in the future. Acked-by: Waiman Long