This currently implements the empty stubs when CONFIG_REF_TRACKER is not defined.
This is used by the i915 DRM driver starting with Linux 6.8.
This is part of the update of DRM drivers to Linux 6.8.
Sponsored by: The FreeBSD Foundation
Differential D49376
linuxkpi: Add <linux/ref_tracker.h> dumbbell on Mar 15 2025, 11:13 AM. Authored by Tags None Referenced Files
Details
This currently implements the empty stubs when CONFIG_REF_TRACKER is not defined. This is used by the i915 DRM driver starting with Linux 6.8. This is part of the update of DRM drivers to Linux 6.8. Sponsored by: The FreeBSD Foundation
Diff Detail
Event TimelineComment Actions Let's add a comment describing the functionality here, and make it explicit that the stub implementations are what Linux provides when CONFIG_REF_TRACKER is not defined. (Make it clear that this is distinct from the case in Linuxkpi where we sometimes provide stubs that are actually insufficient / not correct, but function because the driver code calling them does not actually need the results.) Other than that LGTM. For reference, this arrived originally in Linux commit 4e66934eaadc83b27ada8d42b60894018f3bfabf lib: add reference counting tracking infrastructure It can be hard to track where references are taken and released. In networking, we have annoying issues at device or netns dismantles, and we had various proposals to ease root causing them. This patch adds new infrastructure pairing refcount increases and decreases. This will self document code, because programmers will have to associate increments/decrements. This is controled by CONFIG_REF_TRACKER which can be selected by users of this feature. This adds both cpu and memory costs, and thus should probably be used with care. Comment Actions Clicking request changes for @emaste here. The only other thing I can think of is mark the function arguments __unused but that's kind-of messy. |