mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joerg Roedel <joerg.roedel@amd.com>
To: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Cc: Joerg Roedel <joerg.roedel@amd.com>
Subject: [PATCH 11/22] AMD IOMMU: add stats counter for completion wait events
Date: Mon, 15 Dec 2008 15:17:54 +0100	[thread overview]
Message-ID: <1229350685-3816-12-git-send-email-joerg.roedel@amd.com> (raw)
In-Reply-To: <1229350685-3816-1-git-send-email-joerg.roedel@amd.com>

Impact: see number of completion wait events in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
 arch/x86/kernel/amd_iommu.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index be1ddca..a494a98 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -63,6 +63,8 @@ static struct dma_ops_domain *find_protection_domain(u16 devid);
  * Initialization code for statistics collection
  */
 
+DECLARE_STATS_COUNTER(compl_wait);
+
 static struct dentry *stats_dir;
 static struct dentry *de_isolate;
 static struct dentry *de_fflush;
@@ -87,6 +89,8 @@ static void amd_iommu_stats_init(void)
 
 	de_fflush  = debugfs_create_bool("fullflush", 0444, stats_dir,
 					 (u32 *)&amd_iommu_unmap_flush);
+
+	amd_iommu_stats_add(&compl_wait);
 }
 
 #endif
@@ -248,6 +252,8 @@ static void __iommu_wait_for_completion(struct amd_iommu *iommu)
 	unsigned status = 0;
 	unsigned long i = 0;
 
+	INC_STATS_COUNTER(compl_wait);
+
 	while (!ready && (i < EXIT_LOOP_COUNT)) {
 		++i;
 		/* wait for the bit to become one */
-- 
1.5.6.4



  parent reply	other threads:[~2008-12-15 14:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 14:17 [PATCH 0/22] more AMD IOMMU updates for 2.6.29 Joerg Roedel
2008-12-15 14:17 ` [PATCH 01/22] AMD IOMMU: add a domain flag for default domains Joerg Roedel
2008-12-15 14:17 ` [PATCH 02/22] AMD IOMMU: allocate a new protection for hotplugged devices Joerg Roedel
2008-12-15 14:17 ` [PATCH 03/22] AMD IOMMU: use dev_name instead of self-build print_devid Joerg Roedel
2008-12-15 15:16   ` David Vrabel
2008-12-15 15:26     ` Joerg Roedel
2008-12-15 14:17 ` [PATCH 04/22] AMD IOMMU: convert iommu->need_sync to bool Joerg Roedel
2008-12-15 14:17 ` [PATCH 05/22] AMD IOMMU: convert amd_iommu_isolate " Joerg Roedel
2008-12-15 14:17 ` [PATCH 06/22] AMD IOMMU: use calc_devid in prealloc_protection_domains Joerg Roedel
2008-12-15 14:17 ` [PATCH 07/22] AMD IOMMU: use dev_name in iommu_enable function Joerg Roedel
2008-12-15 14:17 ` [PATCH 08/22] AMD IOMMU: add Kconfig entry for statistic collection code Joerg Roedel
2008-12-15 14:17 ` [PATCH 09/22] AMD IOMMU: add necessary header defines for stats counting Joerg Roedel
2008-12-15 14:17 ` [PATCH 10/22] AMD IOMMU: add init code for statistic collection Joerg Roedel
2008-12-15 14:17 ` Joerg Roedel [this message]
2008-12-15 14:17 ` [PATCH 12/22] AMD IOMMU: add stats counter for map_single requests Joerg Roedel
2008-12-15 14:17 ` [PATCH 13/22] AMD IOMMU: add stats counter for unmap_single requests Joerg Roedel
2008-12-15 14:17 ` [PATCH 14/22] AMD IOMMU: add stats counter for map_sg requests Joerg Roedel
2008-12-15 14:17 ` [PATCH 15/22] AMD IOMMU: add stats counter for unmap_sg requests Joerg Roedel
2008-12-15 14:17 ` [PATCH 16/22] AMD IOMMU: add stats counter for alloc_coherent requests Joerg Roedel
2008-12-15 14:18 ` [PATCH 17/22] AMD IOMMU: add stats counter for free_coherent requests Joerg Roedel
2008-12-15 14:18 ` [PATCH 18/22] AMD IOMMU: add stats counter for cross-page request Joerg Roedel
2008-12-15 14:18 ` [PATCH 19/22] AMD IOMMU: add stats counter for single iommu domain tlb flushes Joerg Roedel
2008-12-15 14:18 ` [PATCH 20/22] AMD IOMMU: add stats counter for " Joerg Roedel
2008-12-15 14:18 ` [PATCH 21/22] AMD IOMMU: add statistics about allocated io memory Joerg Roedel
2008-12-15 14:18 ` [PATCH 22/22] AMD IOMMU: add statistics about total number of map requests Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1229350685-3816-12-git-send-email-joerg.roedel@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®