All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@mellanox.com>,
	Christoph Hellwig <hch@infradead.org>,
	Leon Romanovsky <leonro@mellanox.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	Or Gerlitz <ogerlitz@mellanox.com>,
	Yamin Friedman <yaminf@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>,
	linux-netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH rdma-next v1 2/3] RDMA/rw: Support threshold for registration vs scattering to local pages
Date: Mon, 7 Oct 2019 05:12:44 -0700	[thread overview]
Message-ID: <20191007121244.GA19843@infradead.org> (raw)
In-Reply-To: <20191007115819.9211-3-leon@kernel.org>

Sorry for nitpicking again, but..

On Mon, Oct 07, 2019 at 02:58:18PM +0300, Leon Romanovsky wrote:
> @@ -37,15 +39,15 @@ static inline bool rdma_rw_can_use_mr(struct ib_device *dev, u8 port_num)
>   * Check if the device will use memory registration for this RW operation.
>   * We currently always use memory registrations for iWarp RDMA READs, and
>   * have a debug option to force usage of MRs.
> - *
> - * XXX: In the future we can hopefully fine tune this based on HCA driver
> - * input.

The above comment needs an updated a la:

 * Check if the device will use memory registration for this RW operation.
 * For RDMA READs we must use MRs on iWarp and can optionaly use them as an
 * optimaztion otherwise.  Additionally we have a debug option to force usage
 * of MRs to help testing this code path.
	

>  	if (rdma_protocol_iwarp(dev, port_num) && dir == DMA_FROM_DEVICE)
>  		return true;
> +	if (dev->attrs.max_sgl_rd && dir == DMA_FROM_DEVICE &&
> +	    dma_nents > dev->attrs.max_sgl_rd)
> +		return true;

This can be simplified to:

	if (dir == DMA_FROM_DEVICE &&
	    (rdma_protocol_iwarp(dev, port_num) ||
	     (dev->attrs.max_sgl_rd && dma_nents > dev->attrs.max_sgl_rd)))
		return true;


  reply	other threads:[~2019-10-07 12:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07 11:58 [PATCH rdma-next v1 0/3] Optimize SGL registration Leon Romanovsky
2019-10-07 11:58 ` [PATCH mlx5-next v1 1/3] net/mlx5: Expose optimal performance scatter entries capability Leon Romanovsky
2019-10-07 11:58 ` [PATCH rdma-next v1 2/3] RDMA/rw: Support threshold for registration vs scattering to local pages Leon Romanovsky
2019-10-07 12:12   ` Christoph Hellwig [this message]
2019-10-07 12:36     ` Leon Romanovsky
2019-10-07 12:48       ` Christoph Hellwig
2019-10-07 13:17         ` Leon Romanovsky
2019-10-07 11:58 ` [PATCH rdma-next v1 3/3] RDMA/mlx5: Add capability for max sge to get optimized performance Leon Romanovsky

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=20191007121244.GA19843@infradead.org \
    --to=hch@infradead.org \
    --cc=dledford@redhat.com \
    --cc=jgg@mellanox.com \
    --cc=leon@kernel.org \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=saeedm@mellanox.com \
    --cc=yaminf@mellanox.com \
    /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.