netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@oracle.com>
To: netdev@vger.kernel.org, davem@davemloft.net
Cc: linux-kernel@vger.kernel.org,
	Santosh Shilimkar <santosh.shilimkar@oracle.com>
Subject: [net-next][PATCH v2 10/13] RDS: IB: add mr reused stats
Date: Sat, 27 Feb 2016 18:19:47 -0800	[thread overview]
Message-ID: <1456625990-4739-11-git-send-email-santosh.shilimkar@oracle.com> (raw)
In-Reply-To: <1456625990-4739-1-git-send-email-santosh.shilimkar@oracle.com>

Add MR reuse statistics to RDS IB transport.

Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
---
 net/rds/ib.h       | 2 ++
 net/rds/ib_rdma.c  | 7 ++++++-
 net/rds/ib_stats.c | 2 ++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/net/rds/ib.h b/net/rds/ib.h
index c88cb22..62fe7d5 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -259,6 +259,8 @@ struct rds_ib_statistics {
 	uint64_t	s_ib_rdma_mr_1m_pool_flush;
 	uint64_t	s_ib_rdma_mr_1m_pool_wait;
 	uint64_t	s_ib_rdma_mr_1m_pool_depleted;
+	uint64_t	s_ib_rdma_mr_8k_reused;
+	uint64_t	s_ib_rdma_mr_1m_reused;
 	uint64_t	s_ib_atomic_cswp;
 	uint64_t	s_ib_atomic_fadd;
 };
diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c
index 0e84843..ec7ea32 100644
--- a/net/rds/ib_rdma.c
+++ b/net/rds/ib_rdma.c
@@ -188,8 +188,13 @@ struct rds_ib_mr *rds_ib_reuse_mr(struct rds_ib_mr_pool *pool)
 	flag = this_cpu_ptr(&clean_list_grace);
 	set_bit(CLEAN_LIST_BUSY_BIT, flag);
 	ret = llist_del_first(&pool->clean_list);
-	if (ret)
+	if (ret) {
 		ibmr = llist_entry(ret, struct rds_ib_mr, llnode);
+		if (pool->pool_type == RDS_IB_MR_8K_POOL)
+			rds_ib_stats_inc(s_ib_rdma_mr_8k_reused);
+		else
+			rds_ib_stats_inc(s_ib_rdma_mr_1m_reused);
+	}
 
 	clear_bit(CLEAN_LIST_BUSY_BIT, flag);
 	preempt_enable();
diff --git a/net/rds/ib_stats.c b/net/rds/ib_stats.c
index d77e044..7e78dca 100644
--- a/net/rds/ib_stats.c
+++ b/net/rds/ib_stats.c
@@ -73,6 +73,8 @@ static const char *const rds_ib_stat_names[] = {
 	"ib_rdma_mr_1m_pool_flush",
 	"ib_rdma_mr_1m_pool_wait",
 	"ib_rdma_mr_1m_pool_depleted",
+	"ib_rdma_mr_8k_reused",
+	"ib_rdma_mr_1m_reused",
 	"ib_atomic_cswp",
 	"ib_atomic_fadd",
 };
-- 
1.9.1

  parent reply	other threads:[~2016-02-28  2:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-28  2:19 [net-next][PATCH v2 00/13] RDS: Major clean-up with couple of new features for 4.6 Santosh Shilimkar
2016-02-28  2:19 ` [net-next][PATCH v2 01/13] RDS: Drop stale iWARP RDMA transport Santosh Shilimkar
2016-02-28  9:05   ` Christoph Hellwig
2016-02-28 10:11     ` santosh.shilimkar
2016-02-28 19:51   ` Or Gerlitz
2016-02-29  0:26     ` santosh.shilimkar
2016-03-02 10:54       ` Or Gerlitz
2016-02-28  2:19 ` [net-next][PATCH v2 02/13] RDS: Add support for SO_TIMESTAMP for incoming messages Santosh Shilimkar
2016-02-28  2:19 ` [net-next][PATCH v2 03/13] MAINTAINERS: update RDS entry Santosh Shilimkar
2016-02-28  2:19 ` [net-next][PATCH v2 04/13] RDS: IB: Remove the RDS_IB_SEND_OP dependency Santosh Shilimkar
2016-02-28  2:19 ` [net-next][PATCH v2 05/13] RDS: IB: Re-organise ibmr code Santosh Shilimkar
2016-02-28  2:19 ` [net-next][PATCH v2 06/13] RDS: IB: create struct rds_ib_fmr Santosh Shilimkar
2016-02-28  2:19 ` [net-next][PATCH v2 07/13] RDS: IB: move FMR code to its own file Santosh Shilimkar
2016-02-28  2:19 ` [net-next][PATCH v2 08/13] RDS: IB: add connection info to ibmr Santosh Shilimkar
2016-02-28  2:19 ` [net-next][PATCH v2 09/13] RDS: IB: handle the RDMA CM time wait event Santosh Shilimkar
2016-02-28  2:19 ` Santosh Shilimkar [this message]
2016-02-28  2:19 ` [net-next][PATCH v2 11/13] RDS: IB: add Fastreg MR (FRMR) detection support Santosh Shilimkar
2016-02-28  9:08   ` Christoph Hellwig
2016-02-28 10:26     ` santosh.shilimkar
2016-02-28  2:19 ` [net-next][PATCH v2 12/13] RDS: IB: allocate extra space on queues for FRMR support Santosh Shilimkar
2016-02-28  2:19 ` [net-next][PATCH v2 13/13] RDS: IB: Support Fastreg MR (FRMR) memory registration mode Santosh Shilimkar
2016-03-01 22:33 ` [net-next][PATCH v2 00/13] RDS: Major clean-up with couple of new features for 4.6 David Miller
2016-03-01 23:09   ` santosh shilimkar

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=1456625990-4739-11-git-send-email-santosh.shilimkar@oracle.com \
    --to=santosh.shilimkar@oracle.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).