All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Anna Schumaker <Anna.Schumaker-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org>
Cc: List Linux RDMA Mailing
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Linux NFS Mailing List
	<linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v2 04/13] xprtrdma: Rename rpcrdma_req::rl_free
Date: Fri, 9 Jun 2017 15:03:44 -0400	[thread overview]
Message-ID: <5332A4D9-ADC4-4DA4-A20E-ACC6019F83BF@oracle.com> (raw)
In-Reply-To: <7ee9b1fd-9628-2767-444e-90c6736d63f9-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org>


> On Jun 9, 2017, at 2:58 PM, Anna Schumaker <Anna.Schumaker-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org> wrote:
> 
> Hi Chuck,
> 
> On 06/08/2017 11:52 AM, Chuck Lever wrote:
>> Clean up: I'm about to use the rl_free field for purposes other than
>> a free list. So use a more generic name.
>> 
>> This is a refactoring change only.
>> 
>> BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=305
>> Fixes: 68791649a725 ('xprtrdma: Invalidate in the RPC reply ... ')
>> Signed-off-by: Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
>> ---
>> net/sunrpc/xprtrdma/verbs.c     |    9 ++++-----
>> net/sunrpc/xprtrdma/xprt_rdma.h |    2 +-
>> 2 files changed, 5 insertions(+), 6 deletions(-)
>> 
>> diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
>> index a8be66d..df72224 100644
>> --- a/net/sunrpc/xprtrdma/verbs.c
>> +++ b/net/sunrpc/xprtrdma/verbs.c
>> @@ -971,7 +971,6 @@ struct rpcrdma_req *
>> 	if (req == NULL)
>> 		return ERR_PTR(-ENOMEM);
>> 
>> -	INIT_LIST_HEAD(&req->rl_free);
> 
> Does rl_list still need to get initialized somewhere?

rl_free/rl_list isn't the anchor of a list. It is only
ever a member of a list. So this INIT_LIST_HEAD is actually
unnecessary.


> Thanks,
> Anna
> 
>> 	spin_lock(&buffer->rb_reqslock);
>> 	list_add(&req->rl_all, &buffer->rb_allreqs);
>> 	spin_unlock(&buffer->rb_reqslock);
>> @@ -1055,7 +1054,7 @@ struct rpcrdma_rep *
>> 			goto out;
>> 		}
>> 		req->rl_backchannel = false;
>> -		list_add(&req->rl_free, &buf->rb_send_bufs);
>> +		list_add(&req->rl_list, &buf->rb_send_bufs);
>> 	}
>> 
>> 	INIT_LIST_HEAD(&buf->rb_recv_bufs);
>> @@ -1084,8 +1083,8 @@ struct rpcrdma_rep *
>> 	struct rpcrdma_req *req;
>> 
>> 	req = list_first_entry(&buf->rb_send_bufs,
>> -			       struct rpcrdma_req, rl_free);
>> -	list_del(&req->rl_free);
>> +			       struct rpcrdma_req, rl_list);
>> +	list_del(&req->rl_list);
>> 	return req;
>> }
>> 
>> @@ -1268,7 +1267,7 @@ struct rpcrdma_req *
>> 
>> 	spin_lock(&buffers->rb_lock);
>> 	buffers->rb_send_count--;
>> -	list_add_tail(&req->rl_free, &buffers->rb_send_bufs);
>> +	list_add_tail(&req->rl_list, &buffers->rb_send_bufs);
>> 	if (rep) {
>> 		buffers->rb_recv_count--;
>> 		list_add_tail(&rep->rr_list, &buffers->rb_recv_bufs);
>> diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h
>> index 1c23117..ad918c8 100644
>> --- a/net/sunrpc/xprtrdma/xprt_rdma.h
>> +++ b/net/sunrpc/xprtrdma/xprt_rdma.h
>> @@ -340,7 +340,7 @@ enum {
>> 
>> struct rpcrdma_buffer;
>> struct rpcrdma_req {
>> -	struct list_head	rl_free;
>> +	struct list_head	rl_list;
>> 	unsigned int		rl_mapped_sges;
>> 	unsigned int		rl_connect_cookie;
>> 	struct rpcrdma_buffer	*rl_buffer;
>> 
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> 
> --
> 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

--
Chuck Lever



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

WARNING: multiple messages have this Message-ID (diff)
From: Chuck Lever <chuck.lever@oracle.com>
To: Anna Schumaker <Anna.Schumaker@Netapp.com>
Cc: List Linux RDMA Mailing <linux-rdma@vger.kernel.org>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v2 04/13] xprtrdma: Rename rpcrdma_req::rl_free
Date: Fri, 9 Jun 2017 15:03:44 -0400	[thread overview]
Message-ID: <5332A4D9-ADC4-4DA4-A20E-ACC6019F83BF@oracle.com> (raw)
In-Reply-To: <7ee9b1fd-9628-2767-444e-90c6736d63f9@Netapp.com>


> On Jun 9, 2017, at 2:58 PM, Anna Schumaker <Anna.Schumaker@Netapp.com> wrote:
> 
> Hi Chuck,
> 
> On 06/08/2017 11:52 AM, Chuck Lever wrote:
>> Clean up: I'm about to use the rl_free field for purposes other than
>> a free list. So use a more generic name.
>> 
>> This is a refactoring change only.
>> 
>> BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=305
>> Fixes: 68791649a725 ('xprtrdma: Invalidate in the RPC reply ... ')
>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>> ---
>> net/sunrpc/xprtrdma/verbs.c     |    9 ++++-----
>> net/sunrpc/xprtrdma/xprt_rdma.h |    2 +-
>> 2 files changed, 5 insertions(+), 6 deletions(-)
>> 
>> diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
>> index a8be66d..df72224 100644
>> --- a/net/sunrpc/xprtrdma/verbs.c
>> +++ b/net/sunrpc/xprtrdma/verbs.c
>> @@ -971,7 +971,6 @@ struct rpcrdma_req *
>> 	if (req == NULL)
>> 		return ERR_PTR(-ENOMEM);
>> 
>> -	INIT_LIST_HEAD(&req->rl_free);
> 
> Does rl_list still need to get initialized somewhere?

rl_free/rl_list isn't the anchor of a list. It is only
ever a member of a list. So this INIT_LIST_HEAD is actually
unnecessary.


> Thanks,
> Anna
> 
>> 	spin_lock(&buffer->rb_reqslock);
>> 	list_add(&req->rl_all, &buffer->rb_allreqs);
>> 	spin_unlock(&buffer->rb_reqslock);
>> @@ -1055,7 +1054,7 @@ struct rpcrdma_rep *
>> 			goto out;
>> 		}
>> 		req->rl_backchannel = false;
>> -		list_add(&req->rl_free, &buf->rb_send_bufs);
>> +		list_add(&req->rl_list, &buf->rb_send_bufs);
>> 	}
>> 
>> 	INIT_LIST_HEAD(&buf->rb_recv_bufs);
>> @@ -1084,8 +1083,8 @@ struct rpcrdma_rep *
>> 	struct rpcrdma_req *req;
>> 
>> 	req = list_first_entry(&buf->rb_send_bufs,
>> -			       struct rpcrdma_req, rl_free);
>> -	list_del(&req->rl_free);
>> +			       struct rpcrdma_req, rl_list);
>> +	list_del(&req->rl_list);
>> 	return req;
>> }
>> 
>> @@ -1268,7 +1267,7 @@ struct rpcrdma_req *
>> 
>> 	spin_lock(&buffers->rb_lock);
>> 	buffers->rb_send_count--;
>> -	list_add_tail(&req->rl_free, &buffers->rb_send_bufs);
>> +	list_add_tail(&req->rl_list, &buffers->rb_send_bufs);
>> 	if (rep) {
>> 		buffers->rb_recv_count--;
>> 		list_add_tail(&rep->rr_list, &buffers->rb_recv_bufs);
>> diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h
>> index 1c23117..ad918c8 100644
>> --- a/net/sunrpc/xprtrdma/xprt_rdma.h
>> +++ b/net/sunrpc/xprtrdma/xprt_rdma.h
>> @@ -340,7 +340,7 @@ enum {
>> 
>> struct rpcrdma_buffer;
>> struct rpcrdma_req {
>> -	struct list_head	rl_free;
>> +	struct list_head	rl_list;
>> 	unsigned int		rl_mapped_sges;
>> 	unsigned int		rl_connect_cookie;
>> 	struct rpcrdma_buffer	*rl_buffer;
>> 
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
Chuck Lever




  parent reply	other threads:[~2017-06-09 19:03 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08 15:51 [PATCH v2 00/13] NFS/RDMA client-side patches proposed for v4.13 Chuck Lever
2017-06-08 15:51 ` Chuck Lever
     [not found] ` <20170608154339.18945.5500.stgit-FYjufvaPoItvLzlybtyyYzGyq/o6K9yX@public.gmane.org>
2017-06-08 15:51   ` [PATCH v2 01/13] xprtrdma: On invalidation failure, remove MWs from rl_registered Chuck Lever
2017-06-08 15:51     ` Chuck Lever
2017-06-08 15:51   ` [PATCH v2 02/13] xprtrdma: Pre-mark remotely invalidated MRs Chuck Lever
2017-06-08 15:51     ` Chuck Lever
2017-06-08 15:52   ` [PATCH v2 03/13] xprtrdma: Pass only the list of registered MRs to ro_unmap_sync Chuck Lever
2017-06-08 15:52     ` Chuck Lever
2017-06-08 15:52   ` [PATCH v2 04/13] xprtrdma: Rename rpcrdma_req::rl_free Chuck Lever
2017-06-08 15:52     ` Chuck Lever
     [not found]     ` <20170608155212.18945.37327.stgit-FYjufvaPoItvLzlybtyyYzGyq/o6K9yX@public.gmane.org>
2017-06-09 18:58       ` Anna Schumaker
2017-06-09 18:58         ` Anna Schumaker
     [not found]         ` <7ee9b1fd-9628-2767-444e-90c6736d63f9-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org>
2017-06-09 19:03           ` Chuck Lever [this message]
2017-06-09 19:03             ` Chuck Lever
     [not found]             ` <5332A4D9-ADC4-4DA4-A20E-ACC6019F83BF-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-06-09 19:12               ` Chuck Lever
2017-06-09 19:12                 ` Chuck Lever
     [not found]                 ` <C0C5BD8B-9D97-48F4-A0AD-C7FC17DA9C00-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-06-09 19:15                   ` Anna Schumaker
2017-06-09 19:15                     ` Anna Schumaker
2017-06-08 15:52   ` [PATCH v2 05/13] xprtrdma: Fix client lock-up after application signal fires Chuck Lever
2017-06-08 15:52     ` Chuck Lever
2017-06-08 15:52   ` [PATCH v2 06/13] xprtrdma: Fix FRWR invalidation error recovery Chuck Lever
2017-06-08 15:52     ` Chuck Lever
2017-06-08 15:52   ` [PATCH v2 07/13] xprtrdma: Don't defer MR recovery if ro_map fails Chuck Lever
2017-06-08 15:52     ` Chuck Lever
2017-06-08 15:52   ` [PATCH v2 08/13] NFSv4.1: Handle EXCHGID4_FLAG_CONFIRMED_R during NFSv4.1 migration Chuck Lever
2017-06-08 15:52     ` Chuck Lever
2017-06-08 15:52   ` [PATCH v2 09/13] NFSv4.1: Use seqid returned by EXCHANGE_ID after state migration Chuck Lever
2017-06-08 15:52     ` Chuck Lever
2017-06-08 15:53   ` [PATCH v2 10/13] xprtrdma: Demote "connect" log messages Chuck Lever
2017-06-08 15:53     ` Chuck Lever
2017-06-08 15:53   ` [PATCH v2 11/13] xprtrdma: FMR does not need list_del_init() Chuck Lever
2017-06-08 15:53     ` Chuck Lever
2017-06-08 15:53   ` [PATCH v2 12/13] xprtrdma: Replace PAGE_MASK with offset_in_page() Chuck Lever
2017-06-08 15:53     ` Chuck Lever
2017-06-08 15:53   ` [PATCH v2 13/13] xprtrdma: Fix documenting comments in frwr_ops.c Chuck Lever
2017-06-08 15:53     ` Chuck Lever

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=5332A4D9-ADC4-4DA4-A20E-ACC6019F83BF@oracle.com \
    --to=chuck.lever-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=Anna.Schumaker-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org \
    --cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 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.