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 49734C5AD49 for ; Sat, 31 May 2025 00:45:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9D2EA6B0141; Fri, 30 May 2025 20:45:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9AA356B0145; Fri, 30 May 2025 20:45:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E7156B0146; Fri, 30 May 2025 20:45:54 -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 7073F6B0141 for ; Fri, 30 May 2025 20:45:54 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 23904E88B2 for ; Sat, 31 May 2025 00:45:54 +0000 (UTC) X-FDA: 83501360628.29.79BE6DF Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by imf30.hostedemail.com (Postfix) with ESMTP id 876B08000F for ; Sat, 31 May 2025 00:45:52 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=JF92qscn; spf=pass (imf30.hostedemail.com: domain of sj@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1748652352; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=sFUZnoEmQoX4F7CUEDem6KYGuWp5RYh9vsf5ojxfW3k=; b=zzhrxoAu3LCQfLtEUMftky44eWHdn4Mfryf4QCMzyGlRvMqLnezejqVFFfwVgyidaUcYCO R3fEPiT2riU5zWSdgdKmhl3xOkub/qR2qr7hEr/B6cfysCS8oswR/p6EEp+466I4shRuDi 82WspwGTOKl3KiQADI335DeF+Nv35pU= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=JF92qscn; spf=pass (imf30.hostedemail.com: domain of sj@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1748652352; a=rsa-sha256; cv=none; b=MvghJNwTGq0RbF4vORynaEc+AUsJ+Fm/N3cVFY8U/7ObNfl3yNC1zhO3DPDqhB7a2UQjN2 2oJEtDrtcq/ekJ2Y5hiXk3HpS8n0YddC7uX+YUwB8zKzrvF75ztJ+xAXGLoPQYvidZ6BBU 8ops1ObNVzOnfBBYTooub6gVEvbvoPE= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id D078660007; Sat, 31 May 2025 00:45:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C24AC4CEE9; Sat, 31 May 2025 00:45:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1748652351; bh=eFuUU5H0EZTvta9tnSmPNt8NChN173VFZtM77Xz79WU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JF92qscn5WOuWyTX5GtXUGeQFX4mdZ/eypeD+e9RGTcztb40wgLhpY5jj3iqEnBFs WRZh9mJgorIz8wJoZ92f8UCyvqw8Lx/lsWmTlRzEENCfsvdPk7XJMxGJnqMm0p6bWA 1HSsiDjprlXGcfI0pBn8URbxtCOfb7VGB9SnfKA++PevnkWjzOKEESsJozCJUysTpx f3FsquHVIlRPedOqPG1vB1rk5cn6oNB7K287kdtqi0jce6ADuSuzyR08qcL2LWxij5 OJ7ytBjxgX2gZI2MYNIWDlRUlS5z5Sm3H4qp9F5oclFq7uSRXNNirsJoSAzZDbXNiv 3M2hfcSDwQNNQ== From: SeongJae Park To: Stephen Brennan Cc: SeongJae Park , Ye Liu , akpm@linux-foundation.org, linux-debuggers@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-toolchains@vger.kernel.org, osandov@osandov.com, paulmck@kernel.org, sweettea-kernel@dorminy.me, liuye@kylinos.cn, fweimer@redhat.com Subject: Re: [PATCH v5] tools/mm: Add script to display page state for a given PID and VADDR Date: Fri, 30 May 2025 17:45:48 -0700 Message-Id: <20250531004548.170935-1-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <875xhhagp8.fsf@oracle.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Stat-Signature: ewfc5rraay615jo3ceuh3mtjmi7mkofk X-Rspamd-Queue-Id: 876B08000F X-Rspamd-Server: rspam11 X-HE-Tag: 1748652352-779345 X-HE-Meta: U2FsdGVkX1+7rlKKfpgGReQ4EIrVnDiWytmCflfYdnZD98erp2ob1TfieKe7e70+XsRngIaup8+wLmXxROnmTYo1HS5gBoBT/tmxipMvXqgWZCQz9ZV8b5OSqTYmYj0kMpgXqlfsYblSMw1JiO3gupmdpF/H+0EA0OkymNOcTX1S9hKxcOSq6levMKF393blJZfquccGDuiCKHi7KdsKDs8yUmb5NKDqSASexfqVrO4UJHKph1GTNHF8ZxwXzJahLeNwEsY66cTSgK3UNsmGLFgSRv8Fu9eEYzs0C67r0JJnezXnJiYSo4mLi8WqvPX2dkUH3IKd2iWrOetyC09STvSFhhPWtS93TrLdxxx8n7b0wTxdoIkrp/WweB1CmGmHWNwcMaZB7jXA3EwTBzt3nl88Kn792gYLguQPBiWPsmlsTa2ArBRQLr8HIbYA1/ii9Q4+pHuTfk9VIpD6VQ2yb25BgPMtQS7DW7AiNJCydvB2ACoL/wIUa6jenjOr6d5bpsYGR18LdqLF8neYkrusP4rz83BMVmXE8lyLDYh2MW/zdKWtQjr6Oep8uYvoj8kjg4g1xya4QljEwsYuIcqaW6mnai9Fx7lE3vQZtj+O1rw69kuK7ClwUoOcSK8QSnweDrl7dZXOMvXPEcVQKQOf0sJjORK1w+6IlA/u+2AcsXzWtOK7jsEtEbrpRKeUKqL9vbAmzg5UJxuruy8k7EdXa/iqK9fTA+6dYZho3pkUHEoFhQwqL235CzRgQhd7BeXLS6JORW3pk3FydtndtsmX61/egSw3pTadTmcMdf+PA0ky+zNJce4Q8TVKBrSxYj4xsiuWfSCv9hFvUUHqLPqqDH4dqePAM8pBKpMIBuEPQWlrh5BKLJZEzjK4KK2pZktv9ZKYU7O/Z8ORjlZNxHOJ8q9AnPjjuwlkpCsjA8dIkAE1kjw+SPiv6Tln62yR4QVfqFj1tA89J97EXlpGu0L niGRFmwP oOxmORSiuivp93lG6bgkSR/jpXtHOD+Yc9+/NhEx1Q2lMRHnGJdjvbJOUXSvPn8W4yjmKqDXc8tBNL4Rga24D675kqZHvmWA9O/RMo5UdxpVhhyrBKieNitDQLCypJJObxlcRdQlZUjAMAgquqn2E+Wjgdtu9lCXCSqsENZcz+AlMKKpkpP7jdo8hhgwgSR4ZdaZ56UoMQlN93JEWX/30hfwkZ8mQC+13n8TYjJl1EigOnYlUpMA/Iyu6gNC4tjyk34/C8HHUkLpsFvYVmiJppuJKhg== 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: On Fri, 30 May 2025 15:15:15 -0700 Stephen Brennan wrote: > SeongJae Park writes: > > On Fri, 30 May 2025 13:58:55 +0800 Ye Liu wrote: [...] > > As reported to the previous version, I show below on my test. > > > > Memcg Name: unknown > > Memcg Path: Unexpected error: 'struct kernfs_node' has no member 'parent' > > > > I know you explained it is an issue of drgn version on my setup, as a reply to > > my previous report. But, could you please make the output more easy to > > understand the problem? No strong opinion, though. > > This is an interesting issue. > > The cgroup helpers in drgn were broken by the name change of > kernfs_node.parent to kernfs_node.__parent in Linux 6.15. This was fixed > in drgn promptly, and the fix is included in drgn's 0.0.31 release. If > you use that, the error should go away. In essence, 0.0.31 was the first > drgn version to support Linux 6.15. FYI, I'm using drgn package on Debian 12, which says $ drgn --version drgn 0.0.30+82.ge2b60e4b (using Python 3.11.2, elfutils 0.188, without libkdumpfile) Also I run a kernel built from damon/next[1], which is based on 6.15-rc6. > > However, there's no general way to catch any drgn error and determine > that that drgn doesn't support your kernel version (yet). The code could > be updated for this specific issue, but it wouldn't really fix the > general problem. I think drgn needs to include an (INFORMATIONAL ONLY) > set of kernel versions that it has been tested on. Then, you could use > that in a script to print a warning (or add it to your general purpose > error handling). Sounds like a nice plan! > I'll look into adding this. Thank you! I'm not urgent or having a real problem with this at the moment, though. So, please take your time and fun! > > This is itself a corner case for committing drgn scripts in the kernel. > Omar does a really excellent job with running tests on the -rc's and > finding broken helpers promptly -- usually well ahead of the kernel > release. But even then, there can be a delay from the fix to the next > drgn release. The more that you rely on drgn's helpers for a script that > you distribute in the kernel, the more likely that it will periodically > break, and the in-tree version wouldn't work until the newer drgn > version is released. > > I don't have a solution for *that*, but it's something to consider when > deciding whether to include a script in drgn's contrib/ directory, versus > in the kernel. Makes sense, thank you for sharing your wise thoughts. This is very helpful to me. [1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees Thanks, SJ [...]