summaryrefslogtreecommitdiff
path: root/include/linux/kdebug.h
diff options
context:
space:
mode:
authorchenhuguanshen <chenhgs@chinatelecom.cn>2026-08-12 15:04:59 +0800
committerMarek Szyprowski <m.szyprowski@samsung.com>2026-08-13 08:02:35 +0200
commit121f9fd1c3083312055126205f3e40b8ee999fe6 (patch)
treec6eaf65fb285e65972a61c4e0a0d994773cbd08e /include/linux/kdebug.h
parent298d312c0ff3f49061316ba799257277f4bb9bc4 (diff)
downloadlinux-next-121f9fd1c3083312055126205f3e40b8ee999fe6.tar.gz
linux-next-121f9fd1c3083312055126205f3e40b8ee999fe6.zip
dma/swiotlb: decouple high watermark tracking from CONFIG_DEBUG_FS
Under heavy concurrent DMA traffic on CoCo VMs, inc_used_and_hiwater() performs an atomic_long_add_return() plus a CAS loop on the global used_hiwater, and dec_used() performs an atomic_long_sub() on total_used. All CPUs contend on the same cacheline, causing measurable throughput degradation at scale. Historically these counters were only compiled in under CONFIG_DEBUG_FS, which means production kernels with debugfs paid the atomic overhead unconditionally. Make the tracking boot-time opt-in instead so that it is disabled by default with near-zero overhead via static_call, and can be enabled via "swiotlb=track_hiwater" parameter on demand for debugging. Note that when CONFIG_DEBUG_FS is enabled but hiwater tracking is disabled, the "io_tlb_used" metric reports an approximate value rather than an instantaneously exact one. Suggested-by: Fan Du <fan.du@intel.com> Signed-off-by: Jun Miao <jun.miao@intel.com> Co-developed-by: Fan Du <fan.du@intel.com> Signed-off-by: Fan Du <fan.du@intel.com> Tested-by: chenhuguanshen <chenhgs@chinatelecom.cn> Signed-off-by: chenhuguanshen <chenhgs@chinatelecom.cn> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Tested-by: Michael Kelley <mhklinux@outlook.com> Link: https://lore.kernel.org/r/20260812070459.637077-1-frankchen158@126.com Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'include/linux/kdebug.h')
0 files changed, 0 insertions, 0 deletions