From: Tom Tucker <tom@opengridcomputing.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 01/10] svcrdma: Add Fast Reg MR Data Types
Date: Thu, 25 Sep 2008 09:27:50 -0500 [thread overview]
Message-ID: <48DB9FE6.9040804@opengridcomputing.com> (raw)
In-Reply-To: <20080924191151.GL5772@fieldses.org>
J. Bruce Fields wrote:
> On Tue, Sep 16, 2008 at 06:34:30AM -0500, Tom Tucker wrote:
>> Add data types to track Fast Reg Memory Regions. The core data type is
>> svc_rdma_fastreg_mr that associates a device MR with a host kva and page
>> list. A field is added to the WR context to keep track of the FRMR
>> used to map the local memory for an RPC.
>>
>> An FRMR list and spin lock are added to the transport instance to keep
>> track of all FRMR allocated for the transport. Also added are device
>> capability flags to indicate what the memory registration
>> capabilities are for the underlying device and whether or not fast
>> memory registration is supported.
>>
>> Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
>>
>> ---
>> include/linux/sunrpc/svc_rdma.h | 27 ++++++++++++++++++++++++++-
>> 1 files changed, 26 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
>> index dc05b54..295ebbc 100644
>> --- a/include/linux/sunrpc/svc_rdma.h
>> +++ b/include/linux/sunrpc/svc_rdma.h
>> @@ -72,6 +72,7 @@ extern atomic_t rdma_stat_sq_prod;
>> */
>> struct svc_rdma_op_ctxt {
>> struct svc_rdma_op_ctxt *read_hdr;
>> + struct svc_rdma_fastreg_mr *frmr;
>> int hdr_count;
>> struct xdr_buf arg;
>> struct list_head dto_q;
>> @@ -103,16 +104,35 @@ struct svc_rdma_chunk_sge {
>> int start; /* sge no for this chunk */
>> int count; /* sge count for this chunk */
>> };
>> +struct svc_rdma_fastreg_mr {
>> + struct ib_mr *mr;
>> + void *kva;
>> + struct ib_fast_reg_page_list *page_list;
>> + int page_list_len;
>> + unsigned long access_flags;
>> + unsigned long map_len;
>> + enum dma_data_direction direction;
>> + struct list_head frmr_list;
>> +};
>> struct svc_rdma_req_map {
>> + struct svc_rdma_fastreg_mr *frmr;
>> unsigned long count;
>> union {
>> struct kvec sge[RPCSVC_MAXPAGES];
>> struct svc_rdma_chunk_sge ch[RPCSVC_MAXPAGES];
>> };
>> };
>> -
>> +#define RDMACTXT_F_FAST_UNREG 1
>> #define RDMACTXT_F_LAST_CTXT 2
>>
>> +enum svcrdma_dev_cap { /* device supports: */
>> + SVCRDMA_DEVCAP_FAST_REG = 1, /* - fast mr registration */
>> + SVCRDMA_DEVCAP_READ_W_INV = 2, /* - read w/ invalidate */
>> + SVCRDMA_DEVCAP_LCL_DMA_MR = 4, /* - lcl dma lkey */
>> + SVCRDMA_DEVCAP_LCL_WR_REQ = 8, /* - data sink requires remote */
>> + /* write */
>> +};
>
> Nit: I suppose that works, but I thought the idea of an enum was that it
> enumerated every possible value of the given type? If you're expecting
> to "or" these together I would have expected just some kind of unsigned
> int with some #define's.
>
Agreed.
> --b.
>
>> +
>> struct svcxprt_rdma {
>> struct svc_xprt sc_xprt; /* SVC transport structure */
>> struct rdma_cm_id *sc_cm_id; /* RDMA connection id */
>> @@ -136,6 +156,11 @@ struct svcxprt_rdma {
>> struct ib_cq *sc_rq_cq;
>> struct ib_cq *sc_sq_cq;
>> struct ib_mr *sc_phys_mr; /* MR for server memory */
>> + enum svcrdma_dev_cap sc_dev_caps; /* distilled device caps */
>> + u32 sc_dma_lkey; /* local dma key */
>> + unsigned int sc_frmr_pg_list_len;
>> + struct list_head sc_frmr_q;
>> + spinlock_t sc_frmr_q_lock;
>>
>> spinlock_t sc_lock; /* transport lock */
>>
next prev parent reply other threads:[~2008-09-25 14:27 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1221564879-85046-1-git-send-email-tom@opengridcomputing.com>
[not found] ` <1221564879-85046-2-git-send-email-tom@opengridcomputing.com>
2008-09-24 19:11 ` [PATCH 01/10] svcrdma: Add Fast Reg MR Data Types J. Bruce Fields
2008-09-25 14:27 ` Tom Tucker [this message]
[not found] ` <1221564879-85046-3-git-send-email-tom@opengridcomputing.com>
2008-09-24 19:45 ` [PATCH 02/10] svcrdma: Add FRMR get/put services J. Bruce Fields
2008-09-25 14:25 ` Tom Tucker
2008-09-25 14:44 ` J. Bruce Fields
2008-09-25 20:31 ` Tom Tucker
[not found] ` <1221564879-85046-4-git-send-email-tom@opengridcomputing.com>
2008-09-24 20:10 ` [PATCH 03/10] svcrdma: Query device for Fast Reg support during connection setup J. Bruce Fields
2008-09-25 14:08 ` Tom Tucker
[not found] ` <1221564879-85046-5-git-send-email-tom@opengridcomputing.com>
2008-09-24 20:25 ` [PATCH 04/10] svcrdma: Add a service to register a Fast Reg MR with the device J. Bruce Fields
2008-09-25 13:31 ` Tom Tucker
[not found] ` <1221564879-85046-6-git-send-email-tom@opengridcomputing.com>
2008-09-24 20:31 ` [PATCH 05/10] svcrdma: Modify post recv path to use local dma key J. Bruce Fields
2008-09-25 13:36 ` Tom Tucker
[not found] ` <1221564879-85046-7-git-send-email-tom@opengridcomputing.com>
[not found] ` <1221564879-85046-8-git-send-email-tom@opengridcomputing.com>
[not found] ` <1221564879-85046-9-git-send-email-tom@opengridcomputing.com>
[not found] ` <1221564879-85046-10-git-send-email-tom@opengridcomputing.com>
[not found] ` <1221564879-85046-11-git-send-email-tom@opengridcomputing.com>
2008-09-24 21:21 ` [PATCH 10/10] svcrdma: Documentation update for the FastReg memory model J. Bruce Fields
2008-09-25 13:35 ` Tom Tucker
2008-09-26 16:01 ` Talpey, Thomas
[not found] ` <RTPCLUEXC2-PRDGryWt0000003c-rtwIt2gI0FxT+ZUat5FNkAK/GNPrWCqfQQ4Iyu8u01E@public.gmane.org>
2008-09-30 2:59 ` Tom Tucker
2008-09-26 23:40 ` J. Bruce Fields
2008-09-30 3:07 ` Tom Tucker
2008-09-30 18:44 ` J. Bruce Fields
2008-09-30 18:55 ` Tom Tucker
2008-09-30 18:57 ` J. Bruce Fields
2008-09-30 20:17 ` Tom Tucker
2008-10-01 16:17 ` J. Bruce Fields
2008-10-02 0:38 ` Tom Tucker
2008-09-30 19:04 ` Talpey, Thomas
[not found] ` <RTPCLUEXC2-PRDgFrYI00000094-rtwIt2gI0FxT+ZUat5FNkAK/GNPrWCqfQQ4Iyu8u01E@public.gmane.org>
2008-10-01 18:26 ` J. Bruce Fields
2008-10-01 19:18 ` Talpey, Thomas
[not found] ` <RTPCLUEXC2-PRDVjCRG000000bb-rtwIt2gI0FxT+ZUat5FNkAK/GNPrWCqfQQ4Iyu8u01E@public.gmane.org>
2008-10-01 19:23 ` Talpey, Thomas
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=48DB9FE6.9040804@opengridcomputing.com \
--to=tom@opengridcomputing.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@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