From: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Mike Marciniszyn
<mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 2/8] IB/rdmavt: Add post send to rdmavt
Date: Tue, 19 Jan 2016 13:46:37 -0500 [thread overview]
Message-ID: <20160119184636.GA29112@phlsvsds.ph.intel.com> (raw)
In-Reply-To: <CAG9sBKOpDfxOaPU+dJ+M42JrbCVEoNAORi8jk1KJLay-KDhSSA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Tue, Jan 19, 2016 at 06:23:14PM +0200, Moni Shoua wrote:
>> @@ -730,20 +863,46 @@ int rvt_post_recv(struct ib_qp *ibqp, struct
>> ib_recv_wr *wr,
>> int rvt_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
>> struct ib_send_wr **bad_wr)
>> {
>> + struct rvt_qp *qp = ibqp_to_rvtqp(ibqp);
>> + struct rvt_dev_info *rdi = ib_to_rvt(ibqp->device);
>> + unsigned long flags = 0;
>> + int call_send;
>> + unsigned nreq = 0;
>> + int err = 0;
>> +
>> + spin_lock_irqsave(&qp->s_lock, flags);
>> +
>> /*
>> - * VT-DRIVER-API: do_send()
>> - * Driver needs to have a do_send() call which is a single entry point
>> - * to take an already formed packet and throw it out on the wire. Once
>> - * the packet is sent the driver needs to make an upcall to rvt so the
>> - * completion queue can be notified and/or any other outstanding
>> - * work/book keeping can be finished.
>Why was this design for do_send() removed?
>This requires that each low level drivers do the packet formatting by
>themselves --> code duplication.
The packet building is still being done in the drivers right now. While the
code is similar between the existing drivers there are hardware specific
aspects which are critical to performance which will need untangled very
carefully. We do plan to move this stuff into rdmavt as well. However, I
think it makes sense to let this initial cut of rdmavt get some soak time
given the scope of the changes. So this would be a next step in the
iterative development.
>> +bail:
>> + if (nreq && !call_send)
>> + rdi->driver_f.schedule_send(qp);
>> + spin_unlock_irqrestore(&qp->s_lock, flags);
>> + if (nreq && call_send)
>> + rdi->driver_f.do_send(qp);
>> + return err;
>> }
>Wouldn't it be better if scheduling for sending packets be done in RVT?
The progress mechanism is probably a device specific thing. One
implementation may use work queues, another, something else. For this reason
we leave it down in the driver. Rdmavt has the two driver calls shown here,
one to tell the driver to schedule a packet for sending based on whatever
it's policy is. The other is to kick the driver to do a send right away, for
performance reasons.
>> /**
>> diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h
>> index f2d50b9..3d92239 100644
>> --- a/include/rdma/rdma_vt.h
>> +++ b/include/rdma/rdma_vt.h
>> @@ -230,6 +230,8 @@ struct rvt_driver_provided {
>> void * (*qp_priv_alloc)(struct rvt_dev_info *rdi, struct rvt_qp *qp);
>> void (*qp_priv_free)(struct rvt_dev_info *rdi, struct rvt_qp *qp);
>> void (*notify_qp_reset)(struct rvt_qp *qp);
>> + void (*schedule_send)(struct rvt_qp *qp);
>> + void (*do_send)(struct rvt_qp *qp);
>A proper explanation about the meaning for each driver provided
>function is required.
>This is true for the 2 new added function and for any other that was
>already there
Agree. I'll perhaps add another patch which cleans up these and other
comments. Make sure it all makes sense as a number of the original comments
were put in place to get the ball rolling and stimulate discussion.
-Denny
--
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
next prev parent reply other threads:[~2016-01-19 18:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-09 14:59 [PATCH 0/8] IB/rdmavt: Add functions for cq, qp, post send and recv Dennis Dalessandro
[not found] ` <20160109145731.8585.48926.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-01-09 15:00 ` [PATCH 1/8] IB/rdmavt: Add completion queue functions Dennis Dalessandro
2016-01-09 15:00 ` [PATCH 2/8] IB/rdmavt: Add post send to rdmavt Dennis Dalessandro
[not found] ` <20160109150007.8585.76575.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-01-19 16:23 ` Moni Shoua
[not found] ` <CAG9sBKOpDfxOaPU+dJ+M42JrbCVEoNAORi8jk1KJLay-KDhSSA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-19 18:46 ` Dennis Dalessandro [this message]
2016-01-09 15:00 ` [PATCH 3/8] IB/rdmavt: Add support for tracing events Dennis Dalessandro
2016-01-09 15:00 ` [PATCH 4/8] IB/rdmavt: Add modify qp Dennis Dalessandro
2016-01-09 15:00 ` [PATCH 5/8] IB/rdmavt: Add destroy qp verb Dennis Dalessandro
2016-01-09 15:00 ` [PATCH 6/8] IB/rdmavt: Add post receive to rdmavt Dennis Dalessandro
2016-01-09 15:00 ` [PATCH 7/8] IB/rdmavt: Add multicast functions Dennis Dalessandro
2016-01-09 15:00 ` [PATCH 8/8] IB/rdmavt: Add misc dev register functionality Dennis Dalessandro
2016-01-19 16:44 ` [PATCH 0/8] IB/rdmavt: Add functions for cq, qp, post send and recv Moni Shoua
[not found] ` <CAG9sBKMNm1bMtjoUsGjj+FVL3ZmBw--tK-6iXYMW+0N5j2VE2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-19 18:53 ` Dennis Dalessandro
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=20160119184636.GA29112@phlsvsds.ph.intel.com \
--to=dennis.dalessandro-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=monis-VPRAkNaXOzVWk0Htik3J/w@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 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).