All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] rds: Reintroduce statistics counting
@ 2017-08-08  9:13 ` Håkon Bugge
  0 siblings, 0 replies; 6+ messages in thread
From: Håkon Bugge @ 2017-08-08  9:13 UTC (permalink / raw)
  To: Santosh Shilimkar, David S . Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	rds-devel-N0ozoZBvEnrZJqsBc5GL+g,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	knut.omang-QHcLZuEGTsvQT0dZR+AlfA,
	wei.lin-guay-QHcLZuEGTsvQT0dZR+AlfA

In commit 7e3f2952eeb1 ("rds: don't let RDS shutdown a connection
while senders are present"), refilling the receive queue was removed
from rds_ib_recv(), along with the increment of
s_ib_rx_refill_from_thread.

Commit 73ce4317bf98 ("RDS: make sure we post recv buffers")
re-introduces filling the receive queue from rds_ib_recv(), but does
not add the statistics counter. rds_ib_recv() was later renamed to
rds_ib_recv_path().

This commit reintroduces the statistics counting of
s_ib_rx_refill_from_thread and s_ib_rx_refill_from_cq.

Signed-off-by: Håkon Bugge <haakon.bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Wei Lin Guay <wei.lin.guay-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 net/rds/ib_recv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index e10624a..9722bf8 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -1015,8 +1015,10 @@ void rds_ib_recv_cqe_handler(struct rds_ib_connection *ic,
 	if (rds_ib_ring_empty(&ic->i_recv_ring))
 		rds_ib_stats_inc(s_ib_rx_ring_empty);
 
-	if (rds_ib_ring_low(&ic->i_recv_ring))
+	if (rds_ib_ring_low(&ic->i_recv_ring)) {
 		rds_ib_recv_refill(conn, 0, GFP_NOWAIT);
+		rds_ib_stats_inc(s_ib_rx_refill_from_cq);
+	}
 }
 
 int rds_ib_recv_path(struct rds_conn_path *cp)
@@ -1029,6 +1031,7 @@ int rds_ib_recv_path(struct rds_conn_path *cp)
 	if (rds_conn_up(conn)) {
 		rds_ib_attempt_ack(ic);
 		rds_ib_recv_refill(conn, 0, GFP_KERNEL);
+		rds_ib_stats_inc(s_ib_rx_refill_from_thread);
 	}
 
 	return ret;
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net] rds: Reintroduce statistics counting
@ 2017-08-08  9:13 ` Håkon Bugge
  0 siblings, 0 replies; 6+ messages in thread
From: Håkon Bugge @ 2017-08-08  9:13 UTC (permalink / raw)
  To: Santosh Shilimkar, David S . Miller
  Cc: netdev, linux-rdma, rds-devel, linux-kernel, knut.omang, wei.lin-guay

In commit 7e3f2952eeb1 ("rds: don't let RDS shutdown a connection
while senders are present"), refilling the receive queue was removed
from rds_ib_recv(), along with the increment of
s_ib_rx_refill_from_thread.

Commit 73ce4317bf98 ("RDS: make sure we post recv buffers")
re-introduces filling the receive queue from rds_ib_recv(), but does
not add the statistics counter. rds_ib_recv() was later renamed to
rds_ib_recv_path().

This commit reintroduces the statistics counting of
s_ib_rx_refill_from_thread and s_ib_rx_refill_from_cq.

Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Knut Omang <knut.omang@oracle.com>
Reviewed-by: Wei Lin Guay <wei.lin.guay@oracle.com>
---
 net/rds/ib_recv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index e10624a..9722bf8 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -1015,8 +1015,10 @@ void rds_ib_recv_cqe_handler(struct rds_ib_connection *ic,
 	if (rds_ib_ring_empty(&ic->i_recv_ring))
 		rds_ib_stats_inc(s_ib_rx_ring_empty);
 
-	if (rds_ib_ring_low(&ic->i_recv_ring))
+	if (rds_ib_ring_low(&ic->i_recv_ring)) {
 		rds_ib_recv_refill(conn, 0, GFP_NOWAIT);
+		rds_ib_stats_inc(s_ib_rx_refill_from_cq);
+	}
 }
 
 int rds_ib_recv_path(struct rds_conn_path *cp)
@@ -1029,6 +1031,7 @@ int rds_ib_recv_path(struct rds_conn_path *cp)
 	if (rds_conn_up(conn)) {
 		rds_ib_attempt_ack(ic);
 		rds_ib_recv_refill(conn, 0, GFP_KERNEL);
+		rds_ib_stats_inc(s_ib_rx_refill_from_thread);
 	}
 
 	return ret;
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net] rds: Reintroduce statistics counting
  2017-08-08  9:13 ` Håkon Bugge
@ 2017-08-08 13:20     ` Shamir Rabinovitch
  -1 siblings, 0 replies; 6+ messages in thread
From: Shamir Rabinovitch @ 2017-08-08 13:20 UTC (permalink / raw)
  To: Håkon Bugge
  Cc: Santosh Shilimkar, David S . Miller,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	rds-devel-N0ozoZBvEnrZJqsBc5GL+g,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	knut.omang-QHcLZuEGTsvQT0dZR+AlfA,
	wei.lin-guay-QHcLZuEGTsvQT0dZR+AlfA

On Tue, Aug 08, 2017 at 11:13:32AM +0200, Håkon Bugge wrote:
> In commit 7e3f2952eeb1 ("rds: don't let RDS shutdown a connection
> while senders are present"), refilling the receive queue was removed
> from rds_ib_recv(), along with the increment of
> s_ib_rx_refill_from_thread.
> 
> Commit 73ce4317bf98 ("RDS: make sure we post recv buffers")
> re-introduces filling the receive queue from rds_ib_recv(), but does
> not add the statistics counter. rds_ib_recv() was later renamed to
> rds_ib_recv_path().
> 
> This commit reintroduces the statistics counting of
> s_ib_rx_refill_from_thread and s_ib_rx_refill_from_cq.
> 
> Signed-off-by: Håkon Bugge <haakon.bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Wei Lin Guay <wei.lin.guay-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>  net/rds/ib_recv.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
> index e10624a..9722bf8 100644
> --- a/net/rds/ib_recv.c
> +++ b/net/rds/ib_recv.c
> @@ -1015,8 +1015,10 @@ void rds_ib_recv_cqe_handler(struct rds_ib_connection *ic,
>  	if (rds_ib_ring_empty(&ic->i_recv_ring))
>  		rds_ib_stats_inc(s_ib_rx_ring_empty);
>  
> -	if (rds_ib_ring_low(&ic->i_recv_ring))
> +	if (rds_ib_ring_low(&ic->i_recv_ring)) {
>  		rds_ib_recv_refill(conn, 0, GFP_NOWAIT);
> +		rds_ib_stats_inc(s_ib_rx_refill_from_cq);
> +	}
>  }
>  
>  int rds_ib_recv_path(struct rds_conn_path *cp)
> @@ -1029,6 +1031,7 @@ int rds_ib_recv_path(struct rds_conn_path *cp)
>  	if (rds_conn_up(conn)) {
>  		rds_ib_attempt_ack(ic);
>  		rds_ib_recv_refill(conn, 0, GFP_KERNEL);
> +		rds_ib_stats_inc(s_ib_rx_refill_from_thread);
>  	}
>  
>  	return ret;
> -- 
> 2.9.3
> 

Reviewed-by: Shamir Rabinovitch <shamir.rabinovitch-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net] rds: Reintroduce statistics counting
@ 2017-08-08 13:20     ` Shamir Rabinovitch
  0 siblings, 0 replies; 6+ messages in thread
From: Shamir Rabinovitch @ 2017-08-08 13:20 UTC (permalink / raw)
  To: Håkon Bugge
  Cc: Santosh Shilimkar, David S . Miller, netdev, linux-rdma,
	rds-devel, linux-kernel, knut.omang, wei.lin-guay

On Tue, Aug 08, 2017 at 11:13:32AM +0200, Håkon Bugge wrote:
> In commit 7e3f2952eeb1 ("rds: don't let RDS shutdown a connection
> while senders are present"), refilling the receive queue was removed
> from rds_ib_recv(), along with the increment of
> s_ib_rx_refill_from_thread.
> 
> Commit 73ce4317bf98 ("RDS: make sure we post recv buffers")
> re-introduces filling the receive queue from rds_ib_recv(), but does
> not add the statistics counter. rds_ib_recv() was later renamed to
> rds_ib_recv_path().
> 
> This commit reintroduces the statistics counting of
> s_ib_rx_refill_from_thread and s_ib_rx_refill_from_cq.
> 
> Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
> Reviewed-by: Knut Omang <knut.omang@oracle.com>
> Reviewed-by: Wei Lin Guay <wei.lin.guay@oracle.com>
> ---
>  net/rds/ib_recv.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
> index e10624a..9722bf8 100644
> --- a/net/rds/ib_recv.c
> +++ b/net/rds/ib_recv.c
> @@ -1015,8 +1015,10 @@ void rds_ib_recv_cqe_handler(struct rds_ib_connection *ic,
>  	if (rds_ib_ring_empty(&ic->i_recv_ring))
>  		rds_ib_stats_inc(s_ib_rx_ring_empty);
>  
> -	if (rds_ib_ring_low(&ic->i_recv_ring))
> +	if (rds_ib_ring_low(&ic->i_recv_ring)) {
>  		rds_ib_recv_refill(conn, 0, GFP_NOWAIT);
> +		rds_ib_stats_inc(s_ib_rx_refill_from_cq);
> +	}
>  }
>  
>  int rds_ib_recv_path(struct rds_conn_path *cp)
> @@ -1029,6 +1031,7 @@ int rds_ib_recv_path(struct rds_conn_path *cp)
>  	if (rds_conn_up(conn)) {
>  		rds_ib_attempt_ack(ic);
>  		rds_ib_recv_refill(conn, 0, GFP_KERNEL);
> +		rds_ib_stats_inc(s_ib_rx_refill_from_thread);
>  	}
>  
>  	return ret;
> -- 
> 2.9.3
> 

Reviewed-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net] rds: Reintroduce statistics counting
  2017-08-08  9:13 ` Håkon Bugge
  (?)
  (?)
@ 2017-08-08 16:41 ` Santosh Shilimkar
  -1 siblings, 0 replies; 6+ messages in thread
From: Santosh Shilimkar @ 2017-08-08 16:41 UTC (permalink / raw)
  To: Håkon Bugge, David S . Miller
  Cc: netdev, linux-rdma, rds-devel, linux-kernel, knut.omang, wei.lin-guay

On 8/8/2017 2:13 AM, Håkon Bugge wrote:
> In commit 7e3f2952eeb1 ("rds: don't let RDS shutdown a connection
> while senders are present"), refilling the receive queue was removed
> from rds_ib_recv(), along with the increment of
> s_ib_rx_refill_from_thread.
> 
> Commit 73ce4317bf98 ("RDS: make sure we post recv buffers")
> re-introduces filling the receive queue from rds_ib_recv(), but does
> not add the statistics counter. rds_ib_recv() was later renamed to
> rds_ib_recv_path().
> 
> This commit reintroduces the statistics counting of
> s_ib_rx_refill_from_thread and s_ib_rx_refill_from_cq.
> 
> Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
> Reviewed-by: Knut Omang <knut.omang@oracle.com>
> Reviewed-by: Wei Lin Guay <wei.lin.guay@oracle.com>
> ---
Looks fine.
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net] rds: Reintroduce statistics counting
  2017-08-08  9:13 ` Håkon Bugge
                   ` (2 preceding siblings ...)
  (?)
@ 2017-08-09  4:04 ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2017-08-09  4:04 UTC (permalink / raw)
  To: Haakon.Bugge
  Cc: santosh.shilimkar, netdev, linux-rdma, rds-devel, linux-kernel,
	knut.omang, wei.lin-guay

From: Håkon Bugge <Haakon.Bugge@oracle.com>
Date: Tue,  8 Aug 2017 11:13:32 +0200

> In commit 7e3f2952eeb1 ("rds: don't let RDS shutdown a connection
> while senders are present"), refilling the receive queue was removed
> from rds_ib_recv(), along with the increment of
> s_ib_rx_refill_from_thread.
> 
> Commit 73ce4317bf98 ("RDS: make sure we post recv buffers")
> re-introduces filling the receive queue from rds_ib_recv(), but does
> not add the statistics counter. rds_ib_recv() was later renamed to
> rds_ib_recv_path().
> 
> This commit reintroduces the statistics counting of
> s_ib_rx_refill_from_thread and s_ib_rx_refill_from_cq.
> 
> Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
> Reviewed-by: Knut Omang <knut.omang@oracle.com>
> Reviewed-by: Wei Lin Guay <wei.lin.guay@oracle.com>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-08-09  4:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-08  9:13 [PATCH net] rds: Reintroduce statistics counting Håkon Bugge
2017-08-08  9:13 ` Håkon Bugge
     [not found] ` <20170808091332.5413-1-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-08-08 13:20   ` Shamir Rabinovitch
2017-08-08 13:20     ` Shamir Rabinovitch
2017-08-08 16:41 ` Santosh Shilimkar
2017-08-09  4:04 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.