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
;
> 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
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
---
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
() 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
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
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
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
_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
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 +++
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
---
/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
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 +++
/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
() 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
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
_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
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
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
---
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
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
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
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
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
/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
() 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
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 +++
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
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
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
_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
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
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 --
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
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
) 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
_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
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
() 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
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 --
.
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
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
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/
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
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
/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
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
/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
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
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
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
() 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
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(+)
_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
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/
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
.
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
. 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
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
> >
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
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
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
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(+)
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
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
/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
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
_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
() 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
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
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:
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
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
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
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
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(+)
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
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
() 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
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
_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
/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
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
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
/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
() 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
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
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
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(+)
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
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
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
_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
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
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
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
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(+)
() 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
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
/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 - 100 of 158 matches
Mail list logo