From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikolay Borisov Subject: Re: PIDs Controller Limit Date: Tue, 29 Sep 2015 09:13:34 +0300 Message-ID: <560A2C0E.40007@kyup.com> References: <20150925153912.GG4449@mtj.duckdns.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Aleksa Sarai , Tejun Heo Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On 09/26/2015 02:11 AM, Aleksa Sarai wrote: >> On Thu, Sep 24, 2015 at 09:42:38AM +1000, Aleksa Sarai wrote: >>> Does it make sense for the PIDs controller to allow a user to set a >>> limit of 0? Since we don't cancel attaches, a limit of 0 doesn't >>> affect anything (nothing stops attaches, and you need to have a >>> process in the PIDs cgroup in order for fork()s to be affected by the >>> limit). So I think that attempting to set pid.limit to 0 should return >>> an -EINVAL. >> >> I don't know. Why does it matter? > > Well, it might be confusing that a limit of `0` is not different from > a limit of `1`. Especially since someone might think that a limit of > `0` means "no processes AT ALL", which is wrong. Although, I guess > they should've just RTFM'd in that case. I personally would have parsed a value of 0 as "unlimited" From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932606AbbI2GOA (ORCPT ); Tue, 29 Sep 2015 02:14:00 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:36943 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932540AbbI2GNm (ORCPT ); Tue, 29 Sep 2015 02:13:42 -0400 Subject: Re: PIDs Controller Limit To: Aleksa Sarai , Tejun Heo References: <20150925153912.GG4449@mtj.duckdns.org> Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org From: Nikolay Borisov Message-ID: <560A2C0E.40007@kyup.com> Date: Tue, 29 Sep 2015 09:13:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/26/2015 02:11 AM, Aleksa Sarai wrote: >> On Thu, Sep 24, 2015 at 09:42:38AM +1000, Aleksa Sarai wrote: >>> Does it make sense for the PIDs controller to allow a user to set a >>> limit of 0? Since we don't cancel attaches, a limit of 0 doesn't >>> affect anything (nothing stops attaches, and you need to have a >>> process in the PIDs cgroup in order for fork()s to be affected by the >>> limit). So I think that attempting to set pid.limit to 0 should return >>> an -EINVAL. >> >> I don't know. Why does it matter? > > Well, it might be confusing that a limit of `0` is not different from > a limit of `1`. Especially since someone might think that a limit of > `0` means "no processes AT ALL", which is wrong. Although, I guess > they should've just RTFM'd in that case. I personally would have parsed a value of 0 as "unlimited"