From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752469AbbCJLcm (ORCPT ); Tue, 10 Mar 2015 07:32:42 -0400 Received: from mail-ig0-f178.google.com ([209.85.213.178]:33732 "EHLO mail-ig0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750848AbbCJLci (ORCPT ); Tue, 10 Mar 2015 07:32:38 -0400 Message-ID: <54FED651.6040100@gmail.com> Date: Tue, 10 Mar 2015 07:32:33 -0400 From: Austin S Hemmelgarn User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Aleksa Sarai CC: Tejun Heo , lizefan@huawei.com, mingo@redhat.com, peterz@infradead.org, richard@nod.at, =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVj?= =?UTF-8?B?a2Vy?= , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH v4 2/2] cgroups: add a pids subsystem References: <1424660891-12719-1-git-send-email-cyphar@cyphar.com> <1425606357-6337-1-git-send-email-cyphar@cyphar.com> <1425606357-6337-3-git-send-email-cyphar@cyphar.com> <20150309033405.GE13283@htj.duckdns.org> <54FDED43.4050908@gmail.com> In-Reply-To: x-hashcash: 1:21:150310:cyphar@cyphar.com::3acc31abb00e0899b962214cfac8ea64:695d143c1a9e7c19 x-hashcash: 1:21:150310:tj@kernel.org::be34c45e78edd4440087cd7b44854c7:22ee4cc54efa1dd8 x-hashcash: 1:21:150310:lizefan@huawei.com::2be857dfcd22bff9cdb7cdcdd9a9d42b:deea2c2e9d92980f x-hashcash: 1:21:150310:mingo@redhat.com::752e6f889e77babf5207f0f442cc387a:a6f5297263b6dfb6 x-hashcash: 1:21:150310:peterz@infradead.org::e5b6563f126dc5fd2b5e27b803911c1:43f14f1491eff96 x-hashcash: 1:21:150310:richard@nod.at::826602f8d64d8884754e10d5ade01443:6ded45cda32b1015 x-hashcash: 1:21:150310:fweisbec@gmail.com::97797e6f63f7808c8ed2db7b015ee507:944bd26f6b95df16 x-hashcash: 1:21:150310:linux-kernel@vger.kernel.org::d93c89650112b6cda7927cd74aca02f7:5be6002d34895229 x-hashcash: 1:21:150310:cgroups@vger.kernel.org::28403cd8a90040217edd2cea36852d8f:dc9202fc9c78a7d3 x-stampprotocols: hashcash:1:17;mbound:0:10:3000:5000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015-03-10 04:10, Aleksa Sarai wrote: > Hi Austin, > >>> Does pids limit make sense in the root cgroup? >>> >> I would say it kind of does, although I would just expect it to track >> /proc/sys/kernel/pid_max (either as a read-only value, or as an alternative >> way to set it). > > Personally, that seems unintuitive. /proc/sys/kernel/pid_max and the pids > cgroup controller are orthogonal features, why should they be able to affect > each other (or even be aware of each other)? I wouldn't consider them entirely orthogonal, the sysctl value is the limiting factor for the maximal value that can be set in a given pids cgroup. Setting an unlimited value in the cgroup is functionally identical to setting it to be equal to /proc/sys/kernel/pid_max, and the root cgroup is functionally equivalent to /proc/sys/kernel/pid_max, because all tasks that aren't in another cgroup get put in the root. My only thought is that having the file that would set the limit there might make things much simpler for software that expects the entire cgroup structure to be hierarchical.