From patchwork Fri Dec 13 11:27:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jiang.kun2@zte.com.cn X-Patchwork-Id: 13906897 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D1FBE7717F for ; Fri, 13 Dec 2024 11:27:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 03AD76B007B; Fri, 13 Dec 2024 06:27:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F2B426B0082; Fri, 13 Dec 2024 06:27:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DF2856B0083; Fri, 13 Dec 2024 06:27:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id BFD726B007B for ; Fri, 13 Dec 2024 06:27:13 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3B42B160412 for ; Fri, 13 Dec 2024 11:27:13 +0000 (UTC) X-FDA: 82889708790.24.ECD616B Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by imf23.hostedemail.com (Postfix) with ESMTP id 66239140004 for ; Fri, 13 Dec 2024 11:26:53 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=none; spf=pass (imf23.hostedemail.com: domain of jiang.kun2@zte.com.cn designates 183.62.165.209 as permitted sender) smtp.mailfrom=jiang.kun2@zte.com.cn; dmarc=pass (policy=none) header.from=zte.com.cn ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734089219; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references; bh=YQ2bUqB5NUNllKAI2mPs7j5rIIz056U1YaeGPq81QkQ=; b=nF+F9sp9B/1GHxDY41ocMzecw1CUUStVttWQa4aoEdl1/7hfI8/h+ABRdo+zyVwtkW2R57 efPvMV3tZVQg/rdvXYsX8i7UI/w/xi7G5GVY0/PfjZ1MOdpMWGBZXzH1FNI+0hfvur42MO K29gFEC9H9/FAPVkmDMVwl2bXHcAO40= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734089219; a=rsa-sha256; cv=none; b=sicFTRmqyRx0UsYJclKjBNMQUvYtRkCMsAaBqwuMFfmxSMohrV09HfP9R35vDzB4KJH2bv SbLNODo7nZXH59uu4nn8YFTYseGkm1i/BpQgagB5l/m+HUBplRIf+iVPjBC3hLyyeGAAlZ 1FM7WpmJA1FRhkb5g3Y1wGSDux05VEI= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; spf=pass (imf23.hostedemail.com: domain of jiang.kun2@zte.com.cn designates 183.62.165.209 as permitted sender) smtp.mailfrom=jiang.kun2@zte.com.cn; dmarc=pass (policy=none) header.from=zte.com.cn Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4Y8n9d6Whmz50FXL; Fri, 13 Dec 2024 19:27:01 +0800 (CST) Received: from njb2app06.zte.com.cn ([10.55.23.119]) by mse-fl1.zte.com.cn with SMTP id 4BDBQvZo004681; Fri, 13 Dec 2024 19:26:57 +0800 (+08) (envelope-from jiang.kun2@zte.com.cn) Received: from mapi (njb2app05[null]) by mapi (Zmail) with MAPI id mid204; Fri, 13 Dec 2024 19:27:00 +0800 (CST) Date: Fri, 13 Dec 2024 19:27:00 +0800 (CST) X-Zmail-TransId: 2afd675c1a04ffffffffc14-1f4ed X-Mailer: Zmail v1.0 Message-ID: <20241213192700771XKZ8H30OtHSeziGqRVMs0@zte.com.cn> Mime-Version: 1.0 From: To: , , Cc: , , , , , , , , , , , Subject: =?utf-8?q?=5BPATCH_linux_next=5D_delayacct=3A_update_docs_and_fix_s?= =?utf-8?q?ome_spelling_errors?= X-MAIL: mse-fl1.zte.com.cn 4BDBQvZo004681 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 675C1A05.000/4Y8n9d6Whmz50FXL X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 66239140004 X-Stat-Signature: rg6jz8paituggpzpnq8dojps3y9ue61a X-Rspam-User: X-HE-Tag: 1734089213-299210 X-HE-Meta: U2FsdGVkX1+pihJPd1n9Qfs6xtJNPlQvXHL3bgDbITTRssHgr7/gnaCVjIE4rBUA8sVI8nHI5zg77DZ+eNulcsOxtjWLBZStb/1JUMjOjZWF60dBvwt+KSQCfhmyseHokgV6PNjk4K1mS7vU0Cwkbek6tcppIkliuQ9KEMWmmoA0iM7mLromDSFtQacHqACdiEPjrM0eVnbIj9hpUI96LnXsEz+q4Tf3JgQL/yMJUFNYDHTxL9HXTetYpXqL89KU44JCv5TGLsVW+6b2fTgf2tu7IM2oRP1WLg3ktFWWimwYUDfTm+pSDRNMKS92xiIk+efFTSMQ+Z5EKUDSrIP5EFYUWTGlUZWHEIkuzqK6IlVt/clf3ZAPVDSfVapLcsggQ48tLHKTXWvWp83TBxeY4JqYxvYrlmYpOSOKrhBWK+hin67L6Frsati9H0O56ll3G5HSQpvORUwxbT+TKPiUx7LA/NEiYII7g5pDQIDHnabAbIeptBD2I5xjT/8DoLWQvJ8JqNkMczaYRbj/jQkEK9wOPtoXOB/Fx9AQCUIxCOPOAFR6ZIeMsl1kpo7K5c5k4ayTzWwqymdT82zeUkPZqE1YIXrbqCSJ50upo8cpEJJjmh4w2PN3uzqR91ZuW+rotLL/bZrwqdSSx4b1OLQW225L/Kqx+V65R+/4TG6VqQg0tnzQyF/irYiF96vnb6RO5F++ssfXJNhhoi4rqkSJjU4XwxTgubByLEqiSREs0V0PETh3CXrhAnfcrhJ2js6Z59GKHcecAvxBf4jlmCG0nS69TPjEdEc6Ls6LvB9b0GzBBWTUbzu6LnWRYATCsZfokE06gRJ6S/lbA+cL0RG7tlisA1gqJXm5g1ttlDR+SiFpYzw/6lcIc3XNWCrQ6FJVAFkxn7CfcdzflJ/0b5PoUNjyVUIO1T5DfnIkX8mfxnrCNvH07CZKwPdcOfJtcXGEAOsaJo2s6APSZsoppUL hFYXfG+z c/T2xVdXcObRiCRtDZNuJ1Xqv58nH13xCQ5zEm8H5a9rP8GHqJmKdN5gwk9OIXQev+KRs62qVz+7C2SjdWFRk+OPo0hu9eHxrt1MweECkGr6KRKDrgLBgmjRCMnRtl38wOWy5Tyj9tWmZDx4GdYbw0+JkA8DOU34hBbv1/o62UCO8UT8kpJ+9IOZ7D0AGIy5jIpkN3Td2IjSudeRvXnR88Gi5czRjJ/0lZdjXg9LqyfRYz2tpVTSdzSCDWi5bQOJg2v3LGwhECyoPYiDcEkn01DZuvtPOpHnJn/weP7prAu1/gRE= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Yaxin Wang Update delay-accounting.rst to include the 'delay max' in the output of getdelays, and fix some spelling errors before. Signed-off-by: Yaxin Wang Signed-off-by: Jiang Kun --- Some fixes according to: https://lore.kernel.org/all/20241203170816.3fe81941fe1866ca1672eba8@linux-foundation.org/ 1.fix some spelling errors 2.update Documentation/accounting/delay-accounting.rst Documentation/accounting/delay-accounting.rst | 42 +++++++++---------- kernel/delayacct.c | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Documentation/accounting/delay-accounting.rst b/Documentation/accounting/delay-accounting.rst index f61c01fc376e..8a0277428ccf 100644 --- a/Documentation/accounting/delay-accounting.rst +++ b/Documentation/accounting/delay-accounting.rst @@ -100,29 +100,29 @@ Get delays, since system boot, for pid 10:: # ./getdelays -d -p 10 (output similar to next case) -Get sum of delays, since system boot, for all pids with tgid 5:: +Get sum and peak of delays, since system boot, for all pids with tgid 242:: - # ./getdelays -d -t 5 + bash-4.4# ./getdelays -d -t 242 print delayacct stats ON - TGID 5 - - - CPU count real total virtual total delay total delay average - 8 7000000 6872122 3382277 0.423ms - IO count delay total delay average - 0 0 0.000ms - SWAP count delay total delay average - 0 0 0.000ms - RECLAIM count delay total delay average - 0 0 0.000ms - THRASHING count delay total delay average - 0 0 0.000ms - COMPACT count delay total delay average - 0 0 0.000ms - WPCOPY count delay total delay average - 0 0 0.000ms - IRQ count delay total delay average - 0 0 0.000ms + TGID 242 + + + CPU count real total virtual total delay total delay average delay max + 239 296000000 307724885 1127792 0.005ms 0.238382ms + IO count delay total delay average delay max + 0 0 0.000ms 0.000000ms + SWAP count delay total delay average delay max + 0 0 0.000ms 0.000000ms + RECLAIM count delay total delay average delay max + 0 0 0.000ms 0.000000ms + THRASHING count delay total delay average delay max + 0 0 0.000ms 0.000000ms + COMPACT count delay total delay average delay max + 0 0 0.000ms 0.000000ms + WPCOPY count delay total delay average delay max + 230 19100476 0.083ms 0.383822ms + IRQ count delay total delay average delay max + 0 0 0.000ms 0.000000ms Get IO accounting for pid 1, it works only with -p:: diff --git a/kernel/delayacct.c b/kernel/delayacct.c index d64ad2a48b4f..23212a0c88e4 100644 --- a/kernel/delayacct.c +++ b/kernel/delayacct.c @@ -93,7 +93,7 @@ void __delayacct_tsk_init(struct task_struct *tsk) /* * Finish delay accounting for a statistic using its timestamps (@start), - * accumalator (@total) and @count + * accumulator (@total) and @count */ static void delayacct_end(raw_spinlock_t *lock, u64 *start, u64 *total, u32 *count, u64 *max) {