AMD IOMMU: add stats counter for completion wait events
Impact: see number of completion wait events in debugfs Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
This commit is contained in:
Родитель
7f26508bbb
Коммит
da49f6df72
|
@ -64,6 +64,8 @@ static struct dma_ops_domain *find_protection_domain(u16 devid);
|
||||||
* Initialization code for statistics collection
|
* Initialization code for statistics collection
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
DECLARE_STATS_COUNTER(compl_wait);
|
||||||
|
|
||||||
static struct dentry *stats_dir;
|
static struct dentry *stats_dir;
|
||||||
static struct dentry *de_isolate;
|
static struct dentry *de_isolate;
|
||||||
static struct dentry *de_fflush;
|
static struct dentry *de_fflush;
|
||||||
|
@ -88,6 +90,8 @@ static void amd_iommu_stats_init(void)
|
||||||
|
|
||||||
de_fflush = debugfs_create_bool("fullflush", 0444, stats_dir,
|
de_fflush = debugfs_create_bool("fullflush", 0444, stats_dir,
|
||||||
(u32 *)&amd_iommu_unmap_flush);
|
(u32 *)&amd_iommu_unmap_flush);
|
||||||
|
|
||||||
|
amd_iommu_stats_add(&compl_wait);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -249,6 +253,8 @@ static void __iommu_wait_for_completion(struct amd_iommu *iommu)
|
||||||
unsigned status = 0;
|
unsigned status = 0;
|
||||||
unsigned long i = 0;
|
unsigned long i = 0;
|
||||||
|
|
||||||
|
INC_STATS_COUNTER(compl_wait);
|
||||||
|
|
||||||
while (!ready && (i < EXIT_LOOP_COUNT)) {
|
while (!ready && (i < EXIT_LOOP_COUNT)) {
|
||||||
++i;
|
++i;
|
||||||
/* wait for the bit to become one */
|
/* wait for the bit to become one */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче