From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB07BC10F11 for ; Mon, 22 Apr 2019 13:33:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A5B552064A for ; Mon, 22 Apr 2019 13:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555939995; bh=pcDNGytYNRVpqT1JzqhIipyUfrJEW224R9VpCyvDu28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=o6zmlZ5piQaYm59uqEBU3q/zP6dHhq33RSn7eY8OnIOEy16pSpzBe1+lATdBxeuP6 NougJWQikbOl5b7A6W95ko8YfG+kgLDgm9BQZdumEkBAoBWLP7hAnYeVVFOKoNFww0 24raXzamOmki+8Z1bABmqnzBG1935P30+QbRnAHM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728076AbfDVNdO (ORCPT ); Mon, 22 Apr 2019 09:33:14 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37692 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727547AbfDVN2U (ORCPT ); Mon, 22 Apr 2019 09:28:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zvzvyVb+im44veXN4ZpUOwK9iqmuVXaqp+QMzzaaYqg=; b=i/MnSCYwhQaRAc1byPgDI9Yijw Bpks9RbJW/DoJezqTb8V6ZWMWiuvLuhsk/2Dc9HsiRNGD3MiJc3OYBKd/q7iyXXxWYP7umxjPN9U+ kKKFmYZyuGUhzEpMIIXbYcUgJ+4F8zDrwWuuwP264PsEC2kMJ1ogDyjlzaVwAEwj1LdhFnkZp2cV3 23W/RvmNXSB00z0yGPHJKXnkbkIcqV6OXEP2M4FsNcj39uUDTBkfWqMDsH1c6m0vnBBBEoA2zmEQF IEbrn6ugAnhE/HDaTN/vF1vnDuNHvYTs/nmSj107UEsjJaSBmiz3Gb5+3Qm0D+Cf/ZbZikQv0sU/t YX0FCa0Q==; Received: from 179.176.125.229.dynamic.adsl.gvt.net.br ([179.176.125.229] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hIYza-0005Ha-Uj; Mon, 22 Apr 2019 13:28:19 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1hIYzU-0005o5-1A; Mon, 22 Apr 2019 10:28:12 -0300 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet , Balbir Singh , Tejun Heo , Li Zefan , Johannes Weiner , cgroups@vger.kernel.org Subject: [PATCH v2 57/79] docs: accounting: convert to ReST Date: Mon, 22 Apr 2019 10:27:46 -0300 Message-Id: <13b52516ab787b9a9637e6b9adfec88ec1931b99.1555938376.git.mchehab+samsung@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename the accounting documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab --- .../{cgroupstats.txt => cgroupstats.rst} | 14 +++-- ...ay-accounting.txt => delay-accounting.rst} | 61 +++++++++++-------- Documentation/accounting/index.rst | 14 +++++ Documentation/accounting/{psi.txt => psi.rst} | 40 ++++++------ ...kstats-struct.txt => taskstats-struct.rst} | 53 ++++++++++------ .../{taskstats.txt => taskstats.rst} | 15 +++-- Documentation/admin-guide/cgroup-v2.rst | 6 +- init/Kconfig | 2 +- 8 files changed, 126 insertions(+), 79 deletions(-) rename Documentation/accounting/{cgroupstats.txt => cgroupstats.rst} (77%) rename Documentation/accounting/{delay-accounting.txt => delay-accounting.rst} (77%) create mode 100644 Documentation/accounting/index.rst rename Documentation/accounting/{psi.txt => psi.rst} (91%) rename Documentation/accounting/{taskstats-struct.txt => taskstats-struct.rst} (90%) rename Documentation/accounting/{taskstats.txt => taskstats.rst} (95%) diff --git a/Documentation/accounting/cgroupstats.txt b/Documentation/accounting/cgroupstats.rst similarity index 77% rename from Documentation/accounting/cgroupstats.txt rename to Documentation/accounting/cgroupstats.rst index d16a9849e60e..b9afc48f4ea2 100644 --- a/Documentation/accounting/cgroupstats.txt +++ b/Documentation/accounting/cgroupstats.rst @@ -1,3 +1,7 @@ +================== +Control Groupstats +================== + Control Groupstats is inspired by the discussion at http://lkml.org/lkml/2007/4/11/187 and implements per cgroup statistics as suggested by Andrew Morton in http://lkml.org/lkml/2007/4/11/263. @@ -19,9 +23,9 @@ about tasks blocked on I/O. If CONFIG_TASK_DELAY_ACCT is disabled, this information will not be available. To extract cgroup statistics a utility very similar to getdelays.c -has been developed, the sample output of the utility is shown below +has been developed, the sample output of the utility is shown below:: -~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup/a" -sleeping 1, blocked 0, running 1, stopped 0, uninterruptible 0 -~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup" -sleeping 155, blocked 0, running 1, stopped 0, uninterruptible 2 + ~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup/a" + sleeping 1, blocked 0, running 1, stopped 0, uninterruptible 0 + ~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup" + sleeping 155, blocked 0, running 1, stopped 0, uninterruptible 2 diff --git a/Documentation/accounting/delay-accounting.txt b/Documentation/accounting/delay-accounting.rst similarity index 77% rename from Documentation/accounting/delay-accounting.txt rename to Documentation/accounting/delay-accounting.rst index 042ea59b5853..7cc7f5852da0 100644 --- a/Documentation/accounting/delay-accounting.txt +++ b/Documentation/accounting/delay-accounting.rst @@ -1,5 +1,6 @@ +================ Delay accounting ----------------- +================ Tasks encounter delays in execution when they wait for some kernel resource to become available e.g. a @@ -39,7 +40,9 @@ in detail in a separate document in this directory. Taskstats returns a generic data structure to userspace corresponding to per-pid and per-tgid statistics. The delay accounting functionality populates specific fields of this structure. See + include/linux/taskstats.h + for a description of the fields pertaining to delay accounting. It will generally be in the form of counters returning the cumulative delay seen for cpu, sync block I/O, swapin, memory reclaim etc. @@ -61,13 +64,16 @@ also serves as an example of using the taskstats interface. Usage ----- -Compile the kernel with +Compile the kernel with:: + CONFIG_TASK_DELAY_ACCT=y CONFIG_TASKSTATS=y Delay accounting is enabled by default at boot up. -To disable, add +To disable, add:: + nodelayacct + to the kernel boot options. The rest of the instructions below assume this has not been done. @@ -78,40 +84,43 @@ The utility also allows a given command to be executed and the corresponding delays to be seen. -General format of the getdelays command +General format of the getdelays command:: -getdelays [-t tgid] [-p pid] [-c cmd...] + getdelays [-t tgid] [-p pid] [-c cmd...] -Get delays, since system boot, for pid 10 -# ./getdelays -p 10 -(output similar to next case) +Get delays, since system boot, for pid 10:: -Get sum of delays, since system boot, for all pids with tgid 5 -# ./getdelays -t 5 + # ./getdelays -p 10 + (output similar to next case) +Get sum of delays, since system boot, for all pids with tgid 5:: -CPU count real total virtual total delay total - 7876 92005750 100000000 24001500 -IO count delay total - 0 0 -SWAP count delay total - 0 0 -RECLAIM count delay total - 0 0 + # ./getdelays -t 5 -Get delays seen in executing a given simple command -# ./getdelays -c ls / -bin data1 data3 data5 dev home media opt root srv sys usr -boot data2 data4 data6 etc lib mnt proc sbin subdomain tmp var + CPU count real total virtual total delay total + 7876 92005750 100000000 24001500 + IO count delay total + 0 0 + SWAP count delay total + 0 0 + RECLAIM count delay total + 0 0 +Get delays seen in executing a given simple command:: -CPU count real total virtual total delay total + # ./getdelays -c ls / + + bin data1 data3 data5 dev home media opt root srv sys usr + boot data2 data4 data6 etc lib mnt proc sbin subdomain tmp var + + + CPU count real total virtual total delay total 6 4000250 4000000 0 -IO count delay total + IO count delay total 0 0 -SWAP count delay total + SWAP count delay total 0 0 -RECLAIM count delay total + RECLAIM count delay total 0 0 diff --git a/Documentation/accounting/index.rst b/Documentation/accounting/index.rst new file mode 100644 index 000000000000..e1f6284b5ff3 --- /dev/null +++ b/Documentation/accounting/index.rst @@ -0,0 +1,14 @@ +:orphan: + +========== +Accounting +========== + +.. toctree:: + :maxdepth: 1 + + cgroupstats + delay-accounting + psi + taskstats + taskstats-struct diff --git a/Documentation/accounting/psi.txt b/Documentation/accounting/psi.rst similarity index 91% rename from Documentation/accounting/psi.txt rename to Documentation/accounting/psi.rst index 5cbe5659e3b7..621111ce5740 100644 --- a/Documentation/accounting/psi.txt +++ b/Documentation/accounting/psi.rst @@ -35,14 +35,14 @@ Pressure interface Pressure information for each resource is exported through the respective file in /proc/pressure/ -- cpu, memory, and io. -The format for CPU is as such: +The format for CPU is as such:: -some avg10=0.00 avg60=0.00 avg300=0.00 total=0 + some avg10=0.00 avg60=0.00 avg300=0.00 total=0 -and for memory and IO: +and for memory and IO:: -some avg10=0.00 avg60=0.00 avg300=0.00 total=0 -full avg10=0.00 avg60=0.00 avg300=0.00 total=0 + some avg10=0.00 avg60=0.00 avg300=0.00 total=0 + full avg10=0.00 avg60=0.00 avg300=0.00 total=0 The "some" line indicates the share of time in which at least some tasks are stalled on a given resource. @@ -77,9 +77,9 @@ To register a trigger user has to open psi interface file under /proc/pressure/ representing the resource to be monitored and write the desired threshold and time window. The open file descriptor should be used to wait for trigger events using select(), poll() or epoll(). -The following format is used: +The following format is used:: -