All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH RFC 2/3] svcrdma: Use device rdma_read_access_flags
Date: Tue, 10 Nov 2015 11:25:46 -0700	[thread overview]
Message-ID: <20151110182546.GI12667@obsidianresearch.com> (raw)
In-Reply-To: <20151110120432.GA8230-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>

On Tue, Nov 10, 2015 at 04:04:32AM -0800, Christoph Hellwig wrote:
> On Tue, Nov 10, 2015 at 01:46:40PM +0200, Sagi Grimberg wrote:
> > 
> > 
> > On 10/11/2015 13:41, Christoph Hellwig wrote:
> > >Oh, and while we're at it.  Can someone explain why we're even
> > >using rdma_read_chunk_frmr for IB?  It seems to work around the
> > >fact tat iWarp only allow a single RDMA READ SGE, but it's used
> > >whenever the device has IB_DEVICE_MEM_MGT_EXTENSIONS, which seems
> > >wrong.
> > 
> > I think Steve can answer it better than I can. I think that it is
> > just to have a single code path for both IB and iWARP. I agree that
> > the condition seems wrong and for small transfers rdma_read_chunk_frmr
> > is really a performance loss.
> 
> Well, the code path already exists, but only is used fi
> IB_DEVICE_MEM_MGT_EXTENSIONS isn't set.  Below is an untested patch
> that demonstrates how I think svcrdma should setup the reads.  Note
> that this also allows to entirely remove it's allphys MR.
> 
> Note that as a followon this would also allow to remove the
> non-READ_W_INV code path from rdma_read_chunk_frmr as a future
> step.

I like this, my only comment is we should have a rdma_cap for this
behavior, rdma_cap_needs_rdma_read_mr(pd) or something?

> +	if (rdma_protocol_iwarp(dev, newxprt->sc_cm_id->port_num)) {

Use here

> +		/*
> +		 * iWARP requires remote write access for the data sink, and
> +		 * only supports a single SGE for RDMA_READ requests, so we'll
> +		 * have to use a memory registration for each RDMA_READ.
> +		 */
> +		if (!(dev->device_cap_flags &
> IB_DEVICE_MEM_MGT_EXTENSIONS)) {

Lets enforce this in the core, if rdma_cap_needs_rdma_read_mr is set
the the device must also set IB_DEVICE_MEM_MGT_EXTENSIONS, check at
device creation time.

> +	} else if (rdma_ib_or_roce(dev, newxprt->sc_cm_id->port_num)) {
> +		/*
> +		 * For IB or RoCE life is easy, no unsafe write access is
> +		 * required and multiple SGEs are supported, so we don't need
> +		 * to use MRs.
> +		 */
> +		newxprt->sc_reader = rdma_read_chunk_lcl;
> +	} else {
> +		/*
> +		 * Neither iWarp nor IB-ish, we're out of luck.
> +		 */
>  		goto errout;

No need for the else, !rdma_cap_needs_rdma_read_mr means pd->local_dma_lkey is okay
to use.

Jason
--
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

  parent reply	other threads:[~2015-11-10 18:25 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 10:44 [PATCH RFC 0/3] Introduce device attribute rdma_read_access_flags Sagi Grimberg
     [not found] ` <1447152255-28231-1-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-10 10:44   ` [PATCH RFC 1/3] IB/core: Expose a device attribute for rdma_read access flags Sagi Grimberg
     [not found]     ` <1447152255-28231-2-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-10 11:25       ` Christoph Hellwig
     [not found]         ` <20151110112537.GA8991-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-10 11:36           ` Sagi Grimberg
2015-11-10 11:51       ` Yann Droneaud
     [not found]         ` <1447156270.7089.3.camel-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2015-11-10 12:28           ` Sagi Grimberg
     [not found]             ` <5641E2D1.8070209-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-11-10 12:39               ` Sagi Grimberg
2015-11-10 12:36           ` Tom Talpey
     [not found]             ` <5641E4C9.7000206-CLs1Zie5N5HQT0dZR+AlfA@public.gmane.org>
2015-11-10 12:42               ` Sagi Grimberg
     [not found]                 ` <5641E644.7080101-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-10 13:06                   ` Christoph Hellwig
     [not found]                     ` <20151110130648.GA10682-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-10 13:41                       ` Christoph Hellwig
     [not found]                         ` <20151110134147.GA12814-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-10 18:36                           ` Jason Gunthorpe
     [not found]                             ` <20151110183627.GJ12667-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-11  8:03                               ` Christoph Hellwig
2015-11-11  9:07                           ` Sagi Grimberg
     [not found]                             ` <56430542.5090008-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-11-11 10:25                               ` Christoph Hellwig
2015-11-10 18:06           ` Jason Gunthorpe
2015-11-10 18:01       ` Jason Gunthorpe
     [not found]         ` <20151110180156.GE12667-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-11  8:08           ` Christoph Hellwig
     [not found]             ` <20151111080837.GA14662-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-11  9:09               ` Sagi Grimberg
     [not found]                 ` <564305AF.3020903-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-11-11 10:26                   ` Christoph Hellwig
2015-11-10 10:44   ` [PATCH RFC 2/3] svcrdma: Use device rdma_read_access_flags Sagi Grimberg
     [not found]     ` <1447152255-28231-3-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-10 11:38       ` Christoph Hellwig
     [not found]         ` <20151110113839.GA32523-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-10 11:42           ` Sagi Grimberg
2015-11-10 17:03           ` Chuck Lever
2015-11-10 11:41       ` Christoph Hellwig
     [not found]         ` <20151110114145.GA2810-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-10 11:46           ` Sagi Grimberg
     [not found]             ` <5641D920.5000409-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-10 12:04               ` Christoph Hellwig
     [not found]                 ` <20151110120432.GA8230-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-10 14:34                   ` Chuck Lever
     [not found]                     ` <F60E8BA6-D728-44E4-9331-0C23AB96E634-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-11-10 15:16                       ` Tom Talpey
2015-11-10 18:25                   ` Jason Gunthorpe [this message]
     [not found]                     ` <20151110182546.GI12667-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-10 21:00                       ` Tom Talpey
     [not found]                         ` <56425AFB.30202-CLs1Zie5N5HQT0dZR+AlfA@public.gmane.org>
2015-11-10 21:17                           ` Jason Gunthorpe
     [not found]                             ` <20151110211716.GA21631-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-10 21:30                               ` Tom Talpey
     [not found]                                 ` <564261EF.4000008-CLs1Zie5N5HQT0dZR+AlfA@public.gmane.org>
2015-11-10 23:01                                   ` Chuck Lever
     [not found]                                     ` <54CF0111-E9C4-4196-BF92-7E134A6A329A-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-11-10 23:55                                       ` Jason Gunthorpe
     [not found]                                         ` <20151110235551.GA12795-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-11  8:07                                           ` Christoph Hellwig
2015-11-11  9:28                                       ` Sagi Grimberg
     [not found]                                         ` <56430A20.6040600-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-11-11 16:19                                           ` Chuck Lever
     [not found]                                             ` <D4228973-6DFA-4181-9848-41BFE8E75200-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-11-11 16:29                                               ` Sagi Grimberg
     [not found]                                                 ` <56436CDB.6090305-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-11-11 20:50                                                   ` Chuck Lever
2015-11-11  9:25                               ` Sagi Grimberg
     [not found]                                 ` <56430972.8080703-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-11-11 17:39                                   ` Jason Gunthorpe
2015-11-11  8:02                       ` Christoph Hellwig
     [not found]                         ` <20151111080225.GA31508-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-11 17:23                           ` Jason Gunthorpe
2015-11-10 16:12               ` Steve Wise
2015-11-10 10:44   ` [PATCH RFC 3/3] RDS_IW: " Sagi Grimberg
     [not found]     ` <1447152255-28231-4-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-10 11:26       ` Christoph Hellwig
     [not found]         ` <20151110112638.GB8991-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-10 11:35           ` Sagi Grimberg
2015-11-10 11:31   ` [PATCH RFC 0/3] Introduce device attribute rdma_read_access_flags Christoph Hellwig
     [not found]     ` <20151110113141.GA23093-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-11-10 11:40       ` Sagi Grimberg
2015-11-10 16:18       ` Steve Wise

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=20151110182546.GI12667@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sagig-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 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.