diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-12-12 10:13:04 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-01-03 08:12:00 -0500 |
commit | 8ecaf8f19f0f0627d6ac6d69ed9472e7d307f35b (patch) | |
tree | 1b2ff78164c6fa11cd2a66060d8bfc1ff2d315f2 /arch | |
parent | 5774f7c5fef2526bfa58eab628fbe91dce5e07b1 (diff) |
AMD IOMMU: add statistics about total number of map requests
Impact: see total number of map requests in debugfs
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 69f367b033a2..0c504b207bf9 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -75,6 +75,7 @@ DECLARE_STATS_COUNTER(cross_page); | |||
75 | DECLARE_STATS_COUNTER(domain_flush_single); | 75 | DECLARE_STATS_COUNTER(domain_flush_single); |
76 | DECLARE_STATS_COUNTER(domain_flush_all); | 76 | DECLARE_STATS_COUNTER(domain_flush_all); |
77 | DECLARE_STATS_COUNTER(alloced_io_mem); | 77 | DECLARE_STATS_COUNTER(alloced_io_mem); |
78 | DECLARE_STATS_COUNTER(total_map_requests); | ||
78 | 79 | ||
79 | static struct dentry *stats_dir; | 80 | static struct dentry *stats_dir; |
80 | static struct dentry *de_isolate; | 81 | static struct dentry *de_isolate; |
@@ -112,6 +113,7 @@ static void amd_iommu_stats_init(void) | |||
112 | amd_iommu_stats_add(&domain_flush_single); | 113 | amd_iommu_stats_add(&domain_flush_single); |
113 | amd_iommu_stats_add(&domain_flush_all); | 114 | amd_iommu_stats_add(&domain_flush_all); |
114 | amd_iommu_stats_add(&alloced_io_mem); | 115 | amd_iommu_stats_add(&alloced_io_mem); |
116 | amd_iommu_stats_add(&total_map_requests); | ||
115 | } | 117 | } |
116 | 118 | ||
117 | #endif | 119 | #endif |
@@ -1229,6 +1231,8 @@ static dma_addr_t __map_single(struct device *dev, | |||
1229 | pages = iommu_num_pages(paddr, size, PAGE_SIZE); | 1231 | pages = iommu_num_pages(paddr, size, PAGE_SIZE); |
1230 | paddr &= PAGE_MASK; | 1232 | paddr &= PAGE_MASK; |
1231 | 1233 | ||
1234 | INC_STATS_COUNTER(total_map_requests); | ||
1235 | |||
1232 | if (pages > 1) | 1236 | if (pages > 1) |
1233 | INC_STATS_COUNTER(cross_page); | 1237 | INC_STATS_COUNTER(cross_page); |
1234 | 1238 | ||