From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755536AbbDXOYM (ORCPT ); Fri, 24 Apr 2015 10:24:12 -0400 Received: from mail-ig0-f181.google.com ([209.85.213.181]:35592 "EHLO mail-ig0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753494AbbDXOYJ (ORCPT ); Fri, 24 Apr 2015 10:24:09 -0400 MIME-Version: 1.0 X-Originating-IP: [122.106.150.15] In-Reply-To: <20150422162954.GF10738@htj.duckdns.org> References: <1429446154-10660-1-git-send-email-cyphar@cyphar.com> <1429446154-10660-5-git-send-email-cyphar@cyphar.com> <20150422162954.GF10738@htj.duckdns.org> Date: Sat, 25 Apr 2015 00:24:08 +1000 Message-ID: Subject: Re: [PATCH v10 4/4] cgroups: implement the PIDs subsystem From: Aleksa Sarai To: Tejun Heo Cc: lizefan@huawei.com, mingo@redhat.com, peterz@infradead.org, richard@nod.at, =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Also, >> +struct pids_cgroup { >> + struct cgroup_subsys_state css; >> + >> + /* >> + * Use 64-bit types so that we can safely represent "max" as >> + * (PID_MAX_LIMIT + 1). > ^^^^^^^^^^^^^^^^^ > ... >> +static struct cgroup_subsys_state * >> +pids_css_alloc(struct cgroup_subsys_state *parent) >> +{ >> + struct pids_cgroup *pids; >> + >> + pids = kzalloc(sizeof(struct pids_cgroup), GFP_KERNEL); >> + if (!pids) >> + return ERR_PTR(-ENOMEM); >> + >> + pids->limit = PIDS_MAX; > ^^^^^^^^^ %PIDS_MAX = (%PID_MAX_LIMIT + 1). I can clarify this in the comments if you want. -- Aleksa Sarai (cyphar) www.cyphar.com