Commit 18811f55d48e5f3ee70c4744c592f940022fa592
1 parent
f57d98ae69
Exists in
master
and in
4 other branches
AMD IOMMU: add stats counter for domain tlb flushes
Impact: see number of domain tlb flushes in debugfs Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff
arch/x86/kernel/amd_iommu.c
... | ... | @@ -73,6 +73,7 @@ |
73 | 73 | DECLARE_STATS_COUNTER(cnt_free_coherent); |
74 | 74 | DECLARE_STATS_COUNTER(cross_page); |
75 | 75 | DECLARE_STATS_COUNTER(domain_flush_single); |
76 | +DECLARE_STATS_COUNTER(domain_flush_all); | |
76 | 77 | |
77 | 78 | static struct dentry *stats_dir; |
78 | 79 | static struct dentry *de_isolate; |
... | ... | @@ -108,6 +109,7 @@ |
108 | 109 | amd_iommu_stats_add(&cnt_free_coherent); |
109 | 110 | amd_iommu_stats_add(&cross_page); |
110 | 111 | amd_iommu_stats_add(&domain_flush_single); |
112 | + amd_iommu_stats_add(&domain_flush_all); | |
111 | 113 | } |
112 | 114 | |
113 | 115 | #endif |
... | ... | @@ -430,6 +432,8 @@ |
430 | 432 | unsigned long flags; |
431 | 433 | struct amd_iommu *iommu; |
432 | 434 | struct iommu_cmd cmd; |
435 | + | |
436 | + INC_STATS_COUNTER(domain_flush_all); | |
433 | 437 | |
434 | 438 | __iommu_build_inv_iommu_pages(&cmd, CMD_INV_IOMMU_ALL_PAGES_ADDRESS, |
435 | 439 | domid, 1, 1); |