Re: [PATCH v15 5/9] ref_tracker: allow pr_ostream() to print directly to a seq_file

2025-06-23 Thread Jeff Layton
o leave it empty. That is the prefix for each line that gets printed by the pr_ostream() call. This one is for the lines that go to the debugfs files. I think it will be redundant to prepend every line in these files with "ref_tracker: ". -- Jeff Layton

Re: [PATCH 00/10] convert the majority of file systems to mmap_prepare

2025-06-18 Thread Jeff Layton
; > Documentation/filesystems/porting.rst? Also, an entry for ->mmap_prepare in Documentation/filesystems/vfs.rst would be good. I went there first to understand what the requirements of mmap_prepare are, but there is nothing. -- Jeff Layton

[PATCH v15 6/9] ref_tracker: automatically register a file in debugfs for a ref_tracker_dir

2025-06-18 Thread Jeff Layton
nd removes their xarray entries and the debugfs dentries. Because of this, the debugfs dentry can outlive the corresponding ref_tracker_dir. Have ref_tracker_debugfs_show() take extra care to ensure that it's safe to dereference the dir pointer before using it. Signed-off-by: Jeff Layton ---

[PATCH v15 9/9] ref_tracker: eliminate the ref_tracker_dir name field

2025-06-18 Thread Jeff Layton
Now that we have dentries and the ability to create meaningful symlinks to them, don't keep a name string in each tracker. Switch the output format to print "class@address", and drop the name field. Also, add a kerneldoc header for ref_tracker_dir_init(). Signed-off-by: Jeff Layto

[PATCH v15 8/9] net: add symlinks to ref_tracker_dir for netns

2025-06-18 Thread Jeff Layton
() to register its files and symlinks. Signed-off-by: Jeff Layton --- net/core/net_namespace.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index aa1e34181ed6f353921a23411fa227b612db661a

[PATCH v15 5/9] ref_tracker: allow pr_ostream() to print directly to a seq_file

2025-06-18 Thread Jeff Layton
Allow pr_ostream to also output directly to a seq_file without an intermediate buffer. The first caller of +ref_tracker_dir_seq_print() will come in a later patch, so mark that __maybe_unused for now. That designation will be removed once it is used. Reviewed-by: Andrew Lunn Signed-off-by: Jeff

[PATCH v15 7/9] ref_tracker: add a way to create a symlink to the ref_tracker_dir debugfs file

2025-06-18 Thread Jeff Layton
Add the ability for a subsystem to add a user-friendly symlink that points to a ref_tracker_dir's debugfs file. Add a separate debugfs_symlinks xarray and use that to track symlinks. The reaper workqueue job will remove symlinks before their corresponding dentries. Signed-off-by: Jeff L

[PATCH v15 4/9] ref_tracker: add a static classname string to each ref_tracker_dir

2025-06-18 Thread Jeff Layton
r can be initialized more than once. Signed-off-by: Jeff Layton --- drivers/gpu/drm/display/drm_dp_tunnel.c | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 4 +++- drivers/gpu/drm/i915/intel_wakeref.c| 3 ++- include/linux/ref_tracker.h | 4 lib/test_ref_tracker.c

[PATCH v15 3/9] ref_tracker: have callers pass output function to pr_ostream()

2025-06-18 Thread Jeff Layton
_fmt macro. Reviewed-by: Andrew Lunn Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 2 ++ lib/ref_tracker.c | 52 - 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/include/linux/ref_tracker.h b/include/linux/ref

[PATCH v15 2/9] ref_tracker: add a top level debugfs directory for ref_tracker

2025-06-18 Thread Jeff Layton
Add a new "ref_tracker" directory in debugfs. Each individual refcount tracker can register files under there to display info about currently-held references. Reviewed-by: Andrew Lunn Reviewed-by: Krzysztof Karas Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 13 +++

[PATCH v15 0/9] ref_tracker: add ability to register a debugfs file for a ref_tracker_dir

2025-06-18 Thread Jeff Layton
does some general cleanup of how the ref_tracker object names are handled. Jakub pointed out that I hadn't gotten the xarray locking correct on the last set [1]. This version should fix that: [1]: https://lore.kernel.org/netdev/20250611071524.45610...@kernel.org/ Signed-off-by: Jeff Layton ---

[PATCH v15 1/9] ref_tracker: don't use %pK in pr_ostream() output

2025-06-18 Thread Jeff Layton
/20250414-restricted-pointers-net-v1-0-12af0ce46...@linutronix.de/ Cc: Thomas Weißschuh Reviewed-by: Thomas Weißschuh Reviewed-by: Krzysztof Karas Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ref_tracker.c b/lib

[PATCH v14 2/9] ref_tracker: add a top level debugfs directory for ref_tracker

2025-06-10 Thread Jeff Layton
Add a new "ref_tracker" directory in debugfs. Each individual refcount tracker can register files under there to display info about currently-held references. Reviewed-by: Andrew Lunn Reviewed-by: Krzysztof Karas Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 13 +++

[PATCH v14 1/9] ref_tracker: don't use %pK in pr_ostream() output

2025-06-10 Thread Jeff Layton
/20250414-restricted-pointers-net-v1-0-12af0ce46...@linutronix.de/ Cc: Thomas Weißschuh Reviewed-by: Thomas Weißschuh Reviewed-by: Krzysztof Karas Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ref_tracker.c b/lib

[PATCH v14 8/9] net: add symlinks to ref_tracker_dir for netns

2025-06-10 Thread Jeff Layton
() to register its files and symlinks. Signed-off-by: Jeff Layton --- net/core/net_namespace.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index aa1e34181ed6f353921a23411fa227b612db661a

[PATCH v14 9/9] ref_tracker: eliminate the ref_tracker_dir name field

2025-06-10 Thread Jeff Layton
Now that we have dentries and the ability to create meaningful symlinks to them, don't keep a name string in each tracker. Switch the output format to print "class@address", and drop the name field. Also, add a kerneldoc header for ref_tracker_dir_init(). Signed-off-by: Jeff Layto

[PATCH v14 3/9] ref_tracker: have callers pass output function to pr_ostream()

2025-06-10 Thread Jeff Layton
_fmt macro. Reviewed-by: Andrew Lunn Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 2 ++ lib/ref_tracker.c | 52 - 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/include/linux/ref_tracker.h b/include/linux/ref

[PATCH v14 7/9] ref_tracker: add a way to create a symlink to the ref_tracker_dir debugfs file

2025-06-10 Thread Jeff Layton
Add the ability for a subsystem to add a user-friendly symlink that points to a ref_tracker_dir's debugfs file. Add a separate debugfs_symlinks xarray and use that to track symlinks. The reaper workqueue job will remove symlinks before their corresponding dentries. Signed-off-by: Jeff L

[PATCH v14 6/9] ref_tracker: automatically register a file in debugfs for a ref_tracker_dir

2025-06-10 Thread Jeff Layton
nd removes their xarray entries and the debugfs dentries. Because of this, the debugfs dentry can outlive the corresponding ref_tracker_dir. Have ref_tracker_debugfs_show() take extra care to ensure that it's safe to dereference the dir pointer before using it. Signed-off-by: Jeff Layton ---

[PATCH v14 5/9] ref_tracker: allow pr_ostream() to print directly to a seq_file

2025-06-10 Thread Jeff Layton
Allow pr_ostream to also output directly to a seq_file without an intermediate buffer. The first caller of +ref_tracker_dir_seq_print() will come in a later patch, so mark that __maybe_unused for now. That designation will be removed once it is used. Reviewed-by: Andrew Lunn Signed-off-by: Jeff

[PATCH v14 4/9] ref_tracker: add a static classname string to each ref_tracker_dir

2025-06-10 Thread Jeff Layton
r can be initialized more than once. Signed-off-by: Jeff Layton --- drivers/gpu/drm/display/drm_dp_tunnel.c | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 4 +++- drivers/gpu/drm/i915/intel_wakeref.c| 3 ++- include/linux/ref_tracker.h | 4 lib/test_ref_tracker.c

[PATCH v14 0/9] ref_tracker: add ability to register a debugfs file for a ref_tracker_dir

2025-06-10 Thread Jeff Layton
the debugfs dentries can now outlive their corresponding ref_tracker_dir. It's not pretty, but it should work. [1]: https://netdev-3.bots.linux.dev/vmksft-packetdrill-dbg/results/149560/2-tcp-slow-start-slow-start-app-limited-pkt/stderr Signed-off-by: Jeff Layton --- Changes in

Re: [PATCH v12 03/10] ref_tracker: add a top level debugfs directory for ref_tracker

2025-06-09 Thread Jeff Layton
On Wed, 2025-06-04 at 12:12 +0300, Jani Nikula wrote: > On Thu, 29 May 2025, Jeff Layton wrote: > > Add a new "ref_tracker" directory in debugfs. Each individual refcount > > tracker can register files under there to display info about > > currently-held reference

Re: [PATCH v13 0/9] ref_tracker: add ability to register a debugfs file for a ref_tracker_dir

2025-06-04 Thread Jeff Layton
On Tue, 2025-06-03 at 19:29 -0700, Jakub Kicinski wrote: > On Tue, 03 Jun 2025 07:27:11 -0400 Jeff Layton wrote: > > For those just joining in, this series adds a new top-level > > "ref_tracker" debugfs directory, and has each ref_tracker_dir register a > &g

[PATCH v13 1/9] ref_tracker: don't use %pK in pr_ostream() output

2025-06-03 Thread Jeff Layton
/20250414-restricted-pointers-net-v1-0-12af0ce46...@linutronix.de/ Cc: Thomas Weißschuh Reviewed-by: Thomas Weißschuh Reviewed-by: Krzysztof Karas Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ref_tracker.c b/lib

[PATCH v13 8/9] net: add symlinks to ref_tracker_dir for netns

2025-06-03 Thread Jeff Layton
() to register its files and symlinks. Signed-off-by: Jeff Layton --- net/core/net_namespace.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 8708eb975295ffb78de35fcf4abef7cc281f5a51

[PATCH v13 2/9] ref_tracker: add a top level debugfs directory for ref_tracker

2025-06-03 Thread Jeff Layton
Add a new "ref_tracker" directory in debugfs. Each individual refcount tracker can register files under there to display info about currently-held references. Reviewed-by: Andrew Lunn Reviewed-by: Krzysztof Karas Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 13 +++

[PATCH v13 0/9] ref_tracker: add ability to register a debugfs file for a ref_tracker_dir

2025-06-03 Thread Jeff Layton
em to be initialized more than once, which could lead to leaked ref_tracker objects. It would be good for one of the i915 maintainers to comment on whether this is a real problem. Signed-off-by: Jeff Layton --- Changes in v13: - drop i915 patch - Link to v12: https://lore.kernel.org/r/2025

[PATCH v13 9/9] ref_tracker: eliminate the ref_tracker_dir name field

2025-06-03 Thread Jeff Layton
Now that we have dentries and the ability to create meaningful symlinks to them, don't keep a name string in each tracker. Switch the output format to print "class@address", and drop the name field. Also, add a kerneldoc header for ref_tracker_dir_init(). Signed-off-by: Jeff Layto

[PATCH v13 4/9] ref_tracker: add a static classname string to each ref_tracker_dir

2025-06-03 Thread Jeff Layton
r can be initialized more than once. Signed-off-by: Jeff Layton --- drivers/gpu/drm/display/drm_dp_tunnel.c | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 4 +++- drivers/gpu/drm/i915/intel_wakeref.c| 3 ++- include/linux/ref_tracker.h | 4 lib/test_ref_tracker.c

[PATCH v13 3/9] ref_tracker: have callers pass output function to pr_ostream()

2025-06-03 Thread Jeff Layton
_fmt macro. Reviewed-by: Andrew Lunn Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 2 ++ lib/ref_tracker.c | 52 - 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/include/linux/ref_tracker.h b/include/linux/ref

[PATCH v13 6/9] ref_tracker: automatically register a file in debugfs for a ref_tracker_dir

2025-06-03 Thread Jeff Layton
ld be safe since this directory is only accessible by root If debugfs file creation fails, a pr_warn will be isssued. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 23 lib/ref_tracker.c | 67 +++-- 2 files c

[PATCH v13 7/9] ref_tracker: add a way to create a symlink to the ref_tracker_dir debugfs file

2025-06-03 Thread Jeff Layton
Add the ability for a subsystem to add a user-friendly symlink that points to a ref_tracker_dir's debugfs file. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 13 + lib/ref_tracker.c | 22 ++ 2 files changed, 35 insertions(+) diff --

[PATCH v13 5/9] ref_tracker: allow pr_ostream() to print directly to a seq_file

2025-06-03 Thread Jeff Layton
Allow pr_ostream to also output directly to a seq_file without an intermediate buffer. The first caller of +ref_tracker_dir_seq_print() will come in a later patch, so mark that __maybe_unused for now. That designation will be removed once it is used. Reviewed-by: Andrew Lunn Signed-off-by: Jeff

Re: [PATCH v12 04/10] ref_tracker: have callers pass output function to pr_ostream()

2025-05-30 Thread Jeff Layton
an error we could skip > modifying that field. > > > + va_end(args); > > + stream->used += min(ret, len); > > +} > > + > [...] > Good catch. I'll change this to be: va_start(args, fmt); ret = vsnprintf(stream->buf + stream->used, len, fmt, args); va_end(args); if (ret > 0) stream->used += min(ret, len); -- Jeff Layton

Re: [PATCH v12 01/10] i915: only initialize struct ref_tracker_dir once

2025-05-30 Thread Jeff Layton
) is called the second time, then those objects will now be sitting on a corrupt list. At best they'll just leak, but with them sitting on a now-corrupt list, they could cause a panic too. It may be that there can be no objects on that list when it's called the second time. But with this patchset initializing it twice will cause dentry leaks at least. -- Jeff Layton

[PATCH v12 04/10] ref_tracker: have callers pass output function to pr_ostream()

2025-05-29 Thread Jeff Layton
_fmt macro. Reviewed-by: Andrew Lunn Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 2 ++ lib/ref_tracker.c | 51 - 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/include/linux/ref_tracker.h b/include/linux/ref

[PATCH v12 10/10] ref_tracker: eliminate the ref_tracker_dir name field

2025-05-29 Thread Jeff Layton
Now that we have dentries and the ability to create meaningful symlinks to them, don't keep a name string in each tracker. Switch the output format to print "class@address", and drop the name field. Also, add a kerneldoc header for ref_tracker_dir_init(). Signed-off-by: Jeff Layto

[PATCH v12 09/10] net: add symlinks to ref_tracker_dir for netns

2025-05-29 Thread Jeff Layton
() to register its files and symlinks. Signed-off-by: Jeff Layton --- net/core/net_namespace.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 8708eb975295ffb78de35fcf4abef7cc281f5a51

[PATCH v12 08/10] ref_tracker: add a way to create a symlink to the ref_tracker_dir debugfs file

2025-05-29 Thread Jeff Layton
Add the ability for a subsystem to add a user-friendly symlink that points to a ref_tracker_dir's debugfs file. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 13 + lib/ref_tracker.c | 22 ++ 2 files changed, 35 insertions(+) diff --

[PATCH v12 01/10] i915: only initialize struct ref_tracker_dir once

2025-05-29 Thread Jeff Layton
. Since these objects are zalloc'ed, ensure that they are only initialized once by testing whether the first byte of the name field is 0. Signed-off-by: Jeff Layton --- drivers/gpu/drm/i915/intel_runtime_pm.c | 3 ++- drivers/gpu/drm/i915/intel_wakeref.c| 3 ++- 2 files changed, 4 inser

[PATCH v12 03/10] ref_tracker: add a top level debugfs directory for ref_tracker

2025-05-29 Thread Jeff Layton
Add a new "ref_tracker" directory in debugfs. Each individual refcount tracker can register files under there to display info about currently-held references. Reviewed-by: Andrew Lunn Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 13 + 1 file changed, 13 insertion

[PATCH v12 05/10] ref_tracker: add a static classname string to each ref_tracker_dir

2025-05-29 Thread Jeff Layton
urpose. Add a new "class" string to the ref_tracker dir that describes the the type of object (sans any individual info for that object). Signed-off-by: Jeff Layton --- drivers/gpu/drm/display/drm_dp_tunnel.c | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 5 +++-- drivers/

[PATCH v12 07/10] ref_tracker: automatically register a file in debugfs for a ref_tracker_dir

2025-05-29 Thread Jeff Layton
ld be safe since this directory is only accessible by root If debugfs file creation fails, a pr_warn will be isssued. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 23 lib/ref_tracker.c | 67 +++-- 2 files c

[PATCH v12 06/10] ref_tracker: allow pr_ostream() to print directly to a seq_file

2025-05-29 Thread Jeff Layton
Allow pr_ostream to also output directly to a seq_file without an intermediate buffer. The first caller of +ref_tracker_dir_seq_print() will come in a later patch, so mark that __maybe_unused for now. That designation will be removed once it is used. Reviewed-by: Andrew Lunn Signed-off-by: Jeff

[PATCH v12 02/10] ref_tracker: don't use %pK in pr_ostream() output

2025-05-29 Thread Jeff Layton
/20250414-restricted-pointers-net-v1-0-12af0ce46...@linutronix.de/ Cc: Thomas Weißschuh Reviewed-by: Thomas Weißschuh Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ref_tracker.c b/lib/ref_tracker.c index

[PATCH v12 00/10] ref_tracker: add ability to register a debugfs file for a ref_tracker_dir

2025-05-29 Thread Jeff Layton
unexpectedly, so these warnings are unwanted when dentry creation fails before debugfs is up. Signed-off-by: Jeff Layton --- Changes in v12: - drop redundant pr_warn() calls. Debugfs already warns when these ops fail - Link to v11: https://lore.kernel.org/r/20250528-reftrack-dbgfs-v11-0-94ae0b165

[PATCH v11 02/10] ref_tracker: don't use %pK in pr_ostream() output

2025-05-28 Thread Jeff Layton
/20250414-restricted-pointers-net-v1-0-12af0ce46...@linutronix.de/ Cc: Thomas Weißschuh Reviewed-by: Thomas Weißschuh Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ref_tracker.c b/lib/ref_tracker.c index

[PATCH v11 06/10] ref_tracker: allow pr_ostream() to print directly to a seq_file

2025-05-28 Thread Jeff Layton
Allow pr_ostream to also output directly to a seq_file without an intermediate buffer. The first caller of +ref_tracker_dir_seq_print() will come in a later patch, so mark that __maybe_unused for now. That designation will be removed once it is used. Reviewed-by: Andrew Lunn Signed-off-by: Jeff

[PATCH v11 10/10] ref_tracker: eliminate the ref_tracker_dir name field

2025-05-28 Thread Jeff Layton
Now that we have dentries and the ability to create meaningful symlinks to them, don't keep a name string in each tracker. Switch the output format to print "class@address", and drop the name field. Also, add a kerneldoc header for ref_tracker_dir_init(). Signed-off-by: Jeff Layto

[PATCH v11 07/10] ref_tracker: automatically register a file in debugfs for a ref_tracker_dir

2025-05-28 Thread Jeff Layton
ld be safe since this directory is only accessible by root If debugfs file creation fails, a pr_warn will be isssued. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 23 ++ lib/ref_tracker.c | 73 +++-- 2 files c

[PATCH v11 09/10] net: add symlinks to ref_tracker_dir for netns

2025-05-28 Thread Jeff Layton
() to register its files and symlinks. Signed-off-by: Jeff Layton --- net/core/net_namespace.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 8708eb975295ffb78de35fcf4abef7cc281f5a51

[PATCH v11 08/10] ref_tracker: add a way to create a symlink to the ref_tracker_dir debugfs file

2025-05-28 Thread Jeff Layton
Add the ability for a subsystem to add a user-friendly symlink that points to a ref_tracker_dir's debugfs file. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 13 + lib/ref_tracker.c | 28 2 files changed, 41 insertions(+)

[PATCH v11 04/10] ref_tracker: have callers pass output function to pr_ostream()

2025-05-28 Thread Jeff Layton
_fmt macro. Reviewed-by: Andrew Lunn Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 2 ++ lib/ref_tracker.c | 51 - 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/include/linux/ref_tracker.h b/include/linux/ref

[PATCH v11 05/10] ref_tracker: add a static classname string to each ref_tracker_dir

2025-05-28 Thread Jeff Layton
urpose. Add a new "class" string to the ref_tracker dir that describes the the type of object (sans any individual info for that object). Signed-off-by: Jeff Layton --- drivers/gpu/drm/display/drm_dp_tunnel.c | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 5 +++-- drivers/

[PATCH v11 03/10] ref_tracker: add a top level debugfs directory for ref_tracker

2025-05-28 Thread Jeff Layton
Add a new "ref_tracker" directory in debugfs. Each individual refcount tracker can register files under there to display info about currently-held references. Reviewed-by: Andrew Lunn Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 16 1 file changed, 16 insertion

[PATCH v11 01/10] i915: only initialize struct ref_tracker_dir once

2025-05-28 Thread Jeff Layton
. Since these objects are zalloc'ed, ensure that they are only initialized once by testing whether the first byte of the name field is 0. Signed-off-by: Jeff Layton --- drivers/gpu/drm/i915/intel_runtime_pm.c | 3 ++- drivers/gpu/drm/i915/intel_wakeref.c| 3 ++- 2 files changed, 4 inser

[PATCH v11 00/10] ref_tracker: add ability to register a debugfs file for a ref_tracker_dir

2025-05-28 Thread Jeff Layton
. The rest is basically identical to v10 aside from a small format cleanup. [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_148490v6/index.html Signed-off-by: Jeff Layton --- Changes in v11: - don't call ref_tracker_dir_init() more than once for same i915 objects - use %llx in

Re: [PATCH v10 8/9] net: add symlinks to ref_tracker_dir for netns

2025-05-27 Thread Jeff Layton
On Tue, 2025-05-27 at 06:37 -0700, Eric Dumazet wrote: > On Tue, May 27, 2025 at 6:35 AM Eric Dumazet wrote: > > > > On Tue, May 27, 2025 at 4:34 AM Jeff Layton wrote: > > > > > > After assigning the inode number to the namespace, use it to create a > >

Re: [PATCH v10 9/9] ref_tracker: eliminate the ref_tracker_dir name field

2025-05-27 Thread Jeff Layton
On Tue, 2025-05-27 at 07:33 -0400, Jeff Layton wrote: > Now that we have dentries and the ability to create meaningful symlinks > to them, don't keep a name string in each tracker. Switch the output > format to print "class@address", and drop the name field. > > Al

[PATCH v10 5/9] ref_tracker: allow pr_ostream() to print directly to a seq_file

2025-05-27 Thread Jeff Layton
Allow pr_ostream to also output directly to a seq_file without an intermediate buffer. The first caller of +ref_tracker_dir_seq_print() will come in a later patch, so mark that __maybe_unused for now. That designation will be removed once it is used. Reviewed-by: Andrew Lunn Signed-off-by: Jeff

[PATCH v10 4/9] ref_tracker: add a static classname string to each ref_tracker_dir

2025-05-27 Thread Jeff Layton
urpose. Add a new "class" string to the ref_tracker dir that describes the the type of object (sans any individual info for that object). Signed-off-by: Jeff Layton --- drivers/gpu/drm/display/drm_dp_tunnel.c | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 3 ++- drivers/gpu/drm/i915

[PATCH v10 7/9] ref_tracker: add a way to create a symlink to the ref_tracker_dir debugfs file

2025-05-27 Thread Jeff Layton
Add the ability for a subsystem to add a user-friendly symlink that points to a ref_tracker_dir's debugfs file. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 13 + lib/ref_tracker.c | 28 2 files changed, 41 insertions(+)

[PATCH v10 2/9] ref_tracker: add a top level debugfs directory for ref_tracker

2025-05-27 Thread Jeff Layton
Add a new "ref_tracker" directory in debugfs. Each individual refcount tracker can register files under there to display info about currently-held references. Reviewed-by: Andrew Lunn Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 16 1 file changed, 16 insertion

[PATCH v10 9/9] ref_tracker: eliminate the ref_tracker_dir name field

2025-05-27 Thread Jeff Layton
Now that we have dentries and the ability to create meaningful symlinks to them, don't keep a name string in each tracker. Switch the output format to print "class@address", and drop the name field. Also, add a kerneldoc header for ref_tracker_dir_init(). Signed-off-by: Jeff Layto

[PATCH v10 1/9] ref_tracker: don't use %pK in pr_ostream() output

2025-05-27 Thread Jeff Layton
/20250414-restricted-pointers-net-v1-0-12af0ce46...@linutronix.de/ Cc: Thomas Weißschuh Reviewed-by: Thomas Weißschuh Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ref_tracker.c b/lib/ref_tracker.c index

[PATCH v10 0/9] ref_tracker: add ability to register a debugfs file for a ref_tracker_dir

2025-05-27 Thread Jeff Layton
not truly unique. Since I don't know much about the i915 driver, I'll leave that as an exercise for that team. It should be fairly simple to add if they come up with a scheme that gives these object unique names. [1]: https://patchwork.freedesktop.org/series/148490/ Signed-off-by: J

[PATCH v10 3/9] ref_tracker: have callers pass output function to pr_ostream()

2025-05-27 Thread Jeff Layton
_fmt macro. Reviewed-by: Andrew Lunn Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 2 ++ lib/ref_tracker.c | 51 - 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/include/linux/ref_tracker.h b/include/linux/ref

[PATCH v10 8/9] net: add symlinks to ref_tracker_dir for netns

2025-05-27 Thread Jeff Layton
() to register its files and symlinks. Signed-off-by: Jeff Layton --- net/core/net_namespace.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 8708eb975295ffb78de35fcf4abef7cc281f5a51

[PATCH v10 6/9] ref_tracker: automatically register a file in debugfs for a ref_tracker_dir

2025-05-27 Thread Jeff Layton
ld be safe since this directory is only accessible by root If debugfs file creation fails, a pr_warn will be isssued. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 23 ++ lib/ref_tracker.c | 73 +++-- 2 files c

Re: [PATCH v9 00/10] ref_tracker: add ability to register a debugfs file for a ref_tracker_dir

2025-05-10 Thread Jeff Layton
On Fri, 2025-05-09 at 16:00 -0700, Jakub Kicinski wrote: > On Fri, 09 May 2025 11:53:36 -0400 Jeff Layton wrote: > > This one just fixes a typo in the ref_tracker_dir_init() kerneldoc > > header. I'm only resending so the CI will pick it up. > > We got a bunch of:

[PATCH v9 09/10] i915: add ref_tracker_dir symlinks for each tracker

2025-05-09 Thread Jeff Layton
Now that there is the ability to create a symlink for each tracker, do so for the i915 entries. Acked-by: Jani Nikula Signed-off-by: Jeff Layton --- drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + drivers/gpu/drm/i915/intel_wakeref.c| 1 + 2 files changed, 2 insertions(+) diff --git a

[PATCH v9 10/10] ref_tracker: eliminate the ref_tracker_dir name field

2025-05-09 Thread Jeff Layton
Now that we have dentries and the ability to create meaningful symlinks to them, don't keep a name string in each tracker. Switch the output format to print "class@address", and drop the name field. Also, add a kerneldoc header for ref_tracker_dir_init(). Signed-off-by: Jeff Layto

[PATCH v9 05/10] ref_tracker: allow pr_ostream() to print directly to a seq_file

2025-05-09 Thread Jeff Layton
Allow pr_ostream to also output directly to a seq_file without an intermediate buffer. The first caller of +ref_tracker_dir_seq_print() will come in a later patch, so mark that __maybe_unused for now. That designation will be removed once it is used. Reviewed-by: Andrew Lunn Signed-off-by: Jeff

[PATCH v9 02/10] ref_tracker: add a top level debugfs directory for ref_tracker

2025-05-09 Thread Jeff Layton
Add a new "ref_tracker" directory in debugfs. Each individual refcount tracker can register files under there to display info about currently-held references. Reviewed-by: Andrew Lunn Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 16 1 file changed, 16 insertion

[PATCH v9 07/10] ref_tracker: add a way to create a symlink to the ref_tracker_dir debugfs file

2025-05-09 Thread Jeff Layton
Add the ability for a subsystem to add a user-friendly symlink that points to a ref_tracker_dir's debugfs file. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 13 + lib/ref_tracker.c | 28 2 files changed, 41 insertions(+)

[PATCH v9 04/10] ref_tracker: add a static classname string to each ref_tracker_dir

2025-05-09 Thread Jeff Layton
urpose. Add a new "class" string to the ref_tracker dir that describes the the type of object (sans any individual info for that object). Signed-off-by: Jeff Layton --- drivers/gpu/drm/display/drm_dp_tunnel.c | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 3 ++- drivers/gpu/drm/i915

[PATCH v9 00/10] ref_tracker: add ability to register a debugfs file for a ref_tracker_dir

2025-05-09 Thread Jeff Layton
This one just fixes a typo in the ref_tracker_dir_init() kerneldoc header. I'm only resending so the CI will pick it up. Signed-off-by: Jeff Layton --- Changes in v9: - fix typo in ref_tracker_dir_init() kerneldoc header - Link to v8: https://lore.kernel.org/r/20250507-reftrack-dbgfs

[PATCH v9 08/10] net: add symlinks to ref_tracker_dir for netns

2025-05-09 Thread Jeff Layton
() to register its files and symlinks. Signed-off-by: Jeff Layton --- net/core/net_namespace.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 008de9675ea98fa8c18628b2f1c3aee7f3ebc9c6

[PATCH v9 06/10] ref_tracker: automatically register a file in debugfs for a ref_tracker_dir

2025-05-09 Thread Jeff Layton
ld be safe since this directory is only accessible by root If debugfs file creation fails, a pr_warn will be isssued. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 23 ++ lib/ref_tracker.c | 73 +++-- 2 files c

[PATCH v9 03/10] ref_tracker: have callers pass output function to pr_ostream()

2025-05-09 Thread Jeff Layton
_fmt macro. Reviewed-by: Andrew Lunn Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 2 ++ lib/ref_tracker.c | 51 - 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/include/linux/ref_tracker.h b/include/linux/ref

[PATCH v9 01/10] ref_tracker: don't use %pK in pr_ostream() output

2025-05-09 Thread Jeff Layton
/20250414-restricted-pointers-net-v1-0-12af0ce46...@linutronix.de/ Cc: Thomas Weißschuh Reviewed-by: Thomas Weißschuh Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ref_tracker.c b/lib/ref_tracker.c index

Re: [PATCH v8 10/10] ref_tracker: eliminate the ref_tracker_dir name field

2025-05-09 Thread Jeff Layton
On Wed, 2025-05-07 at 20:01 -0700, Jakub Kicinski wrote: > On Wed, 07 May 2025 09:06:35 -0400 Jeff Layton wrote: > > + * @quarantime_count: max number of entries to be tracked > > quarantime > ^ > :( Sorry, I thought I had fixed that. Do you need me to resend? The pi

[PATCH v8 02/10] ref_tracker: add a top level debugfs directory for ref_tracker

2025-05-07 Thread Jeff Layton
Add a new "ref_tracker" directory in debugfs. Each individual refcount tracker can register files under there to display info about currently-held references. Reviewed-by: Andrew Lunn Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 16 1 file changed, 16 insertion

[PATCH v8 01/10] ref_tracker: don't use %pK in pr_ostream() output

2025-05-07 Thread Jeff Layton
/20250414-restricted-pointers-net-v1-0-12af0ce46...@linutronix.de/ Cc: Thomas Weißschuh Reviewed-by: Thomas Weißschuh Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ref_tracker.c b/lib/ref_tracker.c index

[PATCH v8 08/10] net: add symlinks to ref_tracker_dir for netns

2025-05-07 Thread Jeff Layton
() to register its files and symlinks. Signed-off-by: Jeff Layton --- net/core/net_namespace.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 008de9675ea98fa8c18628b2f1c3aee7f3ebc9c6

[PATCH v8 10/10] ref_tracker: eliminate the ref_tracker_dir name field

2025-05-07 Thread Jeff Layton
Now that we have dentries and the ability to create meaningful symlinks to them, don't keep a name string in each tracker. Switch the output format to print "class@address", and drop the name field. Also, add a kerneldoc header for ref_tracker_dir_init(). Signed-off-by: Jeff Layto

[PATCH v8 09/10] i915: add ref_tracker_dir symlinks for each tracker

2025-05-07 Thread Jeff Layton
Now that there is the ability to create a symlink for each tracker, do so for the i915 entries. Acked-by: Jani Nikula Signed-off-by: Jeff Layton --- drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + drivers/gpu/drm/i915/intel_wakeref.c| 1 + 2 files changed, 2 insertions(+) diff --git a

[PATCH v8 07/10] ref_tracker: add a way to create a symlink to the ref_tracker_dir debugfs file

2025-05-07 Thread Jeff Layton
Add the ability for a subsystem to add a user-friendly symlink that points to a ref_tracker_dir's debugfs file. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 13 + lib/ref_tracker.c | 28 2 files changed, 41 insertions(+)

[PATCH v8 06/10] ref_tracker: automatically register a file in debugfs for a ref_tracker_dir

2025-05-07 Thread Jeff Layton
ld be safe since this directory is only accessible by root If debugfs file creation fails, a pr_warn will be isssued. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 23 ++ lib/ref_tracker.c | 73 +++-- 2 files c

[PATCH v8 05/10] ref_tracker: allow pr_ostream() to print directly to a seq_file

2025-05-07 Thread Jeff Layton
Allow pr_ostream to also output directly to a seq_file without an intermediate buffer. The first caller of +ref_tracker_dir_seq_print() will come in a later patch, so mark that __maybe_unused for now. That designation will be removed once it is used. Reviewed-by: Andrew Lunn Signed-off-by: Jeff

[PATCH v8 04/10] ref_tracker: add a static classname string to each ref_tracker_dir

2025-05-07 Thread Jeff Layton
urpose. Add a new "class" string to the ref_tracker dir that describes the the type of object (sans any individual info for that object). Signed-off-by: Jeff Layton --- drivers/gpu/drm/display/drm_dp_tunnel.c | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 3 ++- drivers/gpu/drm/i915

[PATCH v8 03/10] ref_tracker: have callers pass output function to pr_ostream()

2025-05-07 Thread Jeff Layton
_fmt macro. Reviewed-by: Andrew Lunn Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 2 ++ lib/ref_tracker.c | 51 - 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/include/linux/ref_tracker.h b/include/linux/ref

[PATCH v8 00/10] ref_tracker: add ability to register a debugfs file for a ref_tracker_dir

2025-05-07 Thread Jeff Layton
Minor update to fix up the build and some compiler warnings with more esoteric Kconfigs. Signed-off-by: Jeff Layton --- Changes in v8: - fix up compiler warnings that the KTR warned about - ensure builds with CONFIG_DEBUG_FS=n and CONFIG_REF_TRACKER=y work - Link to v7: https://lore.kernel.org

[PATCH v7 10/10] ref_tracker: eliminate the ref_tracker_dir name field

2025-05-05 Thread Jeff Layton
Now that we have dentries and the ability to create meaningful symlinks to them, don't keep a name string in each tracker. Switch the output format to print "class@address", and drop the name field. Also, add a kerneldoc header for ref_tracker_dir_init(). Signed-off-by: Jeff Layto

[PATCH v7 09/10] i915: add ref_tracker_dir symlinks for each tracker

2025-05-05 Thread Jeff Layton
Now that there is the ability to create a symlink for each tracker, do so for the i915 entries. Signed-off-by: Jeff Layton --- drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + drivers/gpu/drm/i915/intel_wakeref.c| 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915

[PATCH v7 07/10] ref_tracker: add a way to create a symlink to the ref_tracker_dir debugfs file

2025-05-05 Thread Jeff Layton
Add the ability for a subsystem to add a user-friendly symlink that points to a ref_tracker_dir's debugfs file. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 11 +++ lib/ref_tracker.c | 28 2 files changed, 39 insertions(+)

[PATCH v7 08/10] net: add symlinks to ref_tracker_dir for netns

2025-05-05 Thread Jeff Layton
() to register its files and symlinks. Signed-off-by: Jeff Layton --- net/core/net_namespace.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 008de9675ea98fa8c18628b2f1c3aee7f3ebc9c6

[PATCH v7 06/10] ref_tracker: automatically register a file in debugfs for a ref_tracker_dir

2025-05-05 Thread Jeff Layton
ld be safe since this directory is only accessible by root If debugfs file creation fails, a pr_warn will be isssued. Signed-off-by: Jeff Layton --- include/linux/ref_tracker.h | 13 lib/ref_tracker.c | 73 +++-- 2 files changed, 84

[PATCH v7 01/10] ref_tracker: don't use %pK in pr_ostream() output

2025-05-05 Thread Jeff Layton
/20250414-restricted-pointers-net-v1-0-12af0ce46...@linutronix.de/ Cc: Thomas Weißschuh Reviewed-by: Thomas Weißschuh Signed-off-by: Jeff Layton --- lib/ref_tracker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ref_tracker.c b/lib/ref_tracker.c index

  1   2   >