From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752493AbcFXC4Z (ORCPT ); Thu, 23 Jun 2016 22:56:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:43144 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752344AbcFXC4X (ORCPT ); Thu, 23 Jun 2016 22:56:23 -0400 From: Aleksa Sarai To: Jonathan Corbet , Tejun Heo , Li Zefan , Johannes Weiner , Kenny Yu Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Aleksa Sarai Subject: [PATCH 2/2] docs: cgroup/pids: update documentation to include pids.events Date: Fri, 24 Jun 2016 13:00:49 +1000 Message-Id: <20160624030049.13341-3-asarai@suse.de> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20160624030049.13341-2-asarai@suse.de> References: <20160624030049.13341-1-asarai@suse.de> <20160624030049.13341-2-asarai@suse.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org So that users know what the interface and meaning of the keyed values are. In addition, mention that the only time that since=0 is when the limit was changed. Signed-off-by: Aleksa Sarai --- Documentation/cgroup-v1/pids.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/cgroup-v1/pids.txt b/Documentation/cgroup-v1/pids.txt index 1a078b5d281a..a9bb7b964c6f 100644 --- a/Documentation/cgroup-v1/pids.txt +++ b/Documentation/cgroup-v1/pids.txt @@ -33,6 +33,11 @@ limit in the hierarchy is followed). pids.current tracks all child cgroup hierarchies, so parent/pids.current is a superset of parent/child/pids.current. +pids.events shows information about the number of failed forks in a particular +cgroup, both overall (since the cgroup was created) and recently (since the +last limit reset). Userspace is notified of each time a process failed to fork +in a cgroup. + Example ------- @@ -83,3 +88,16 @@ sh: fork: Resource temporary unavailable # /bin/echo "We can't even spawn a single process now." sh: fork: Resource temporary unavailable # + +We can also see how many times a particular cgroup has failed to fork. For an +example cgroup: + +# cat /sys/fs/cgroup/pids/some_cgroup/pids.events +since 1 +total 12 +# + +This cgroup has had 12 associated process fail to fork throughout its lifetime, +and has had 1 process fail to fork since the limit was last set. On setting the +limit, the since counter becomes 0 and userspace is notified (this is the only +case where since will be 0 and userspace will get a notification). -- 2.8.4