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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64025C7115B for ; Tue, 24 Jun 2025 02:18:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BBF6C6B009C; Mon, 23 Jun 2025 22:18:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B96A46B009D; Mon, 23 Jun 2025 22:18:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD41E6B00C3; Mon, 23 Jun 2025 22:18:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 9D8F16B009C for ; Mon, 23 Jun 2025 22:18:58 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 3CC83814EE for ; Tue, 24 Jun 2025 02:18:58 +0000 (UTC) X-FDA: 83588686356.04.AC20184 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [160.30.148.34]) by imf18.hostedemail.com (Postfix) with ESMTP id AE89B1C0008 for ; Tue, 24 Jun 2025 02:18:55 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=zte.com.cn; spf=pass (imf18.hostedemail.com: domain of yang.yang29@zte.com.cn designates 160.30.148.34 as permitted sender) smtp.mailfrom=yang.yang29@zte.com.cn ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1750731536; 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:in-reply-to:references:references; bh=/hu8Sz2sSr6q/FpTLPiJqs+IKUWLx+NTCNo/vfmzFqI=; b=cgrO6G7SVMMCVRLWUTwN/WH0NICJxKm/AVa7mCbEbpuEVbExETyAJYjE+aEigqcvPwg0cG 2kZEwp9ePW/OjQIn7nKdw8s92d77ZM3pwrJ1gAvt3c65rjkgYiL/UspNMLodGLiaOafClF YGKO8NoUL5rs/6LsLi5rvUFq5M/TX9g= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=zte.com.cn; spf=pass (imf18.hostedemail.com: domain of yang.yang29@zte.com.cn designates 160.30.148.34 as permitted sender) smtp.mailfrom=yang.yang29@zte.com.cn ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1750731536; a=rsa-sha256; cv=none; b=z8ry3wSCVFt8YxA+96oaaXZkuABeaAgLPPXv1pR449MgzMuitQQUXBqRLerpNOq3cvY+K5 HODSsLrxOeg0I84LuJW823ruNY8i/gmUEjptReiKM452aFKIoHq0R8VrhNOsvyJiUCHJja GVlMACdNY3R00YNhkRXgkuDhWWf+aaM= 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 mxhk.zte.com.cn (FangMail) with ESMTPS id 4bR7t32ngRz5DXWj; Tue, 24 Jun 2025 10:18:51 +0800 (CST) Received: from szxlzmapp02.zte.com.cn ([10.5.231.79]) by mse-fl1.zte.com.cn with SMTP id 55O2IYeG096824; Tue, 24 Jun 2025 10:18:34 +0800 (+08) (envelope-from yang.yang29@zte.com.cn) Received: from mapi (szxlzmapp04[null]) by mapi (Zmail) with MAPI id mid14; Tue, 24 Jun 2025 10:18:35 +0800 (CST) Date: Tue, 24 Jun 2025 10:18:35 +0800 (CST) X-Zmail-TransId: 2b06685a0afbffffffffc7c-f4ac5 X-Mailer: Zmail v1.0 Message-ID: <20250624101835869AZSKLr2_kXapp5khYIQ7H@zte.com.cn> In-Reply-To: <20250619225152603EIiJTlhHy4mFMv1dVTzue@zte.com.cn> References: 20250619211843633h05gWrBDMFkEH6xAVm_5y@zte.com.cn,20250619225152603EIiJTlhHy4mFMv1dVTzue@zte.com.cn Mime-Version: 1.0 From: To: , Cc: , , , , , , , , , , , , , Subject: =?UTF-8?B?UmU6IFtQQVRDSCBsaW51eCBuZXh0XSB0b29scy9hY2NvdW50aW5nL2RlbGF5dG9wOiBhZGQgZGVsYXl0b3AKIHRvIHJlY29yZCB0b3AtbiB0YXNrIGRlbGF5?= Content-Type: text/plain; charset="UTF-8" X-MAIL:mse-fl1.zte.com.cn 55O2IYeG096824 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 685A0B0B.001/4bR7t32ngRz5DXWj X-Rspamd-Server: rspam11 X-Rspam-User: X-Rspamd-Queue-Id: AE89B1C0008 X-Stat-Signature: fycoez6biznumuczz8gfyyrfrkyxorzi X-HE-Tag: 1750731535-173584 X-HE-Meta: U2FsdGVkX1+lLFSQBD2Vd7+i7TW6DA3GmQUGxPSyP+R320MTnoNZbi6+UcwMbbPZVWdtQY+k6EChjWns5ejfm2o3raIo71SI1ssT/feiovlLDY8+KpYgGR1l+v2ol+NolEr8SfrycFQ1NPtVV6na82/jfTPfOUdTa1qdkrKTI6BOILzB1BgG+ShOuEmeNI6Aa7UMbq39IyO3+SZRDGPId/H0lBx9CYtQ4IaHoMlOXewsrBxBWVb1xeren4DOuGC0JnywkptTa4BCV8AkIOefKHgSpKeg1GfvH1vJwxWvxJwA149TPzpqHQGBgxtFBlhG9R7PKN4qtEnIFLzTj2PFCduH5ykI3UStfp1Sdl0NaUMw0vCidEcHgZ4yf9wZ7xZjtEqCJSYxavoEdSoOmj8bfKK1O+taYd8y+aCFWoPzXBabZS9wN3sSEsQvBviq44bi8ilv8pDZ2NvgK6cOIFZ6PJDJf+MK5eMjfVRULszyAt/dq5jOuV1b0ycRO8tNHjTxa/9TZzGq+W+lPSkOvxUXPPNWtCJEz0MwF00yMiFZNGdO5y559IvISwI2E2twII/b3YIxEXC+wjiHnHIaJW0viaw9Pca36kOzMSNpcpNDlwm/pyf91yzOTnkPNgvLVgcAI1zjlErWR+ACYnAwaeEFZ+o6IyUVMs6sXEbf/OiSOQdUnghg3YrlRp/hnbPWtm3qKGt2qMSgsetfDs+atvoBjEYP8zfFp/tTHUEfMBI0lZTn5m91FZkJtOw1DFJSpcf2Vr78mkbymSdiGkhv8jUmwy6wTIeyBSxs46dlY7ILZM25WKUKOHhi9sOLA50KyLOnpdCvt+uYN3RK0T/jR3YMQRuYivaMHy1TA48n7LCH5DLqWyR81G9HfRBtElWs65frqqe85Nio5bsjrZmYRzCIstpeJ0RmSMFEvrI84xs98bDOjwKnh3nc/cQ/6L6V/O83uR238svxfSCCQ3LfegO OZJmkUJl eRFa6xRHL9W87vvynuLD3mh0uZreB2k5Luus233VeKL2C0pYkoNq+SAoPWCVpx5Bz51gjHhiv2PJRGQGjmb75ry9IkErS66U+Eolc/KmVRYbyS+h7cn3g6Kev/RSXOCa02S/Sa7E5pTLCk+EqaYpTBiiI3uGMX/aqMigy 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: > For latency-sensitive scenarios, such as industrial control, communications, > or automotive, I think this tool is useful. And it may be better if it support > showing whole delay of system by reading PSI, just like the first few lines of > information output by the top command. Another suggestion, we can provide a new command to control the display of either the total memory delay for tasks or detailed memory delays. This approach offers two benefits: first, it better aligns with PSI results; second, it offers choices for users with different interests (e.g., some users may not have enabled or are not concerned about swap delay). The implementation can follow the dynamic command approach similar to top. If it's OK to you, may send follow-up patch. For the initial patch: > + * delaytop.c - task delay monitoring tool. > + * This tool provides real-time monitoring and statistics of > + * system, container, and task-level delays, including CPU, Since the tool cover 'system' delay, we may say: delaytop.c - system-wide delay monitoring tool. > + * This tool provides real-time monitoring and statistics of > + * system, container, and task-level delays, including CPU, > + * memory, IO, and IRQ and delay accounting. It supports both I am confused with the words 'and delay accouting', they are all delays. > + if (bind(fd, (struct sockaddr *) &local, sizeof(local)) < 0) { > + close(fd); > + return -1; We better tell user what happend, and pelase check other code that may also fail. > + rc = recv(nl_sd, &resp, sizeof(resp), 0); Please check if close(nl_sd) is called.