All of lore.kernel.org
 help / color / mirror / Atom feed
From: leonro@mellanox.com (Leon Romanovsky)
Subject: [PATCH RFC] nvme-rdma: support devices with queue size < 32
Date: Thu, 6 Apr 2017 16:02:07 +0300	[thread overview]
Message-ID: <20170406130207.GI2269@mtr-leonro.local> (raw)
In-Reply-To: <1224897571.353404199.1491481743295.JavaMail.zimbra@kalray.eu>

On Thu, Apr 06, 2017@02:29:03PM +0200, Marta Rybczynska wrote:
> >>>> You say above "we post *up to* 2 work requests", unless you wish to
> >>>> change that to "we always post at least 2 work requests per queue
> >>>> entry", Jason is right, your frequency of signaling needs to be X/2
> >>>> regardless of your CQ size, you need the signaling to control the queue
> >>>> depth tracking.
> >>>
> >>> If you would like to spread things out farther between signaling, then
> >>> you can modify your send routine to only increment the send counter for
> >>> actual send requests, ignoring registration WQEs and invalidate WQES,
> >>> and then signal every X/2 sends.
> >>
> >> Yea, you're right, and not only I got it wrong, I even contradicted my
> >> own suggestion that was exactly what you and Jason suggested (where is
> >> the nearest rat-hole...)
> >>
> >> So I suggested to signal every X/2 and Marta reported SQ overflows for
> >> high queue-dpeth. Marta, at what queue-depth have you seen this?
> >
> > The remote side had queue depth of 16 or 32 and that's the WQ on the
> > initiator side that overflows (mlx5_wq_overflow). We're testing with
> > signalling X/2 and it seems to work.
>
> Update on the situation: the signalling on X/2 seems to work fine in
> practice. To clarify more that's the send queue that overflows
> (mlx5_wq_overflow in begin_wqe of drivers/infiniband/hw/mlx5/qp.c).
>
> However, I have still doubt how it's going to work in the case of
> higher queue depths (i.e. the typical case). If we signal every X/2
> we'll do it much more rarely than today (every 32 messages). I'm not
> sure on the system effect this would have.
>
> Mellanox guys, do you have an idea what it might do?

It will continue to work as expected with long depths too.
All that you need is do not to forget to issue signal if queue is terminated.

Thanks

>
> Marta
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20170406/98715074/attachment-0001.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Marta Rybczynska <mrybczyn-FNhOzJFKnXGHXe+LvDLADg@public.gmane.org>
Cc: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
	Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>,
	linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	keith busch <keith.busch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	axboe-b10kYP2dOMg@public.gmane.org,
	Samuel Jones
	<samuel.jones-FNhOzJFKnXGHXe+LvDLADg@public.gmane.org>,
	Max Gurtovoy <maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH RFC] nvme-rdma: support devices with queue size < 32
Date: Thu, 6 Apr 2017 16:02:07 +0300	[thread overview]
Message-ID: <20170406130207.GI2269@mtr-leonro.local> (raw)
In-Reply-To: <1224897571.353404199.1491481743295.JavaMail.zimbra-FNhOzJFKnXGHXe+LvDLADg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2100 bytes --]

On Thu, Apr 06, 2017 at 02:29:03PM +0200, Marta Rybczynska wrote:
> >>>> You say above "we post *up to* 2 work requests", unless you wish to
> >>>> change that to "we always post at least 2 work requests per queue
> >>>> entry", Jason is right, your frequency of signaling needs to be X/2
> >>>> regardless of your CQ size, you need the signaling to control the queue
> >>>> depth tracking.
> >>>
> >>> If you would like to spread things out farther between signaling, then
> >>> you can modify your send routine to only increment the send counter for
> >>> actual send requests, ignoring registration WQEs and invalidate WQES,
> >>> and then signal every X/2 sends.
> >>
> >> Yea, you're right, and not only I got it wrong, I even contradicted my
> >> own suggestion that was exactly what you and Jason suggested (where is
> >> the nearest rat-hole...)
> >>
> >> So I suggested to signal every X/2 and Marta reported SQ overflows for
> >> high queue-dpeth. Marta, at what queue-depth have you seen this?
> >
> > The remote side had queue depth of 16 or 32 and that's the WQ on the
> > initiator side that overflows (mlx5_wq_overflow). We're testing with
> > signalling X/2 and it seems to work.
>
> Update on the situation: the signalling on X/2 seems to work fine in
> practice. To clarify more that's the send queue that overflows
> (mlx5_wq_overflow in begin_wqe of drivers/infiniband/hw/mlx5/qp.c).
>
> However, I have still doubt how it's going to work in the case of
> higher queue depths (i.e. the typical case). If we signal every X/2
> we'll do it much more rarely than today (every 32 messages). I'm not
> sure on the system effect this would have.
>
> Mellanox guys, do you have an idea what it might do?

It will continue to work as expected with long depths too.
All that you need is do not to forget to issue signal if queue is terminated.

Thanks

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-04-06 13:02 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23  9:04 [PATCH RFC] nvme-rdma: support devices with queue size < 32 Marta Rybczynska
2017-03-23  9:04 ` Marta Rybczynska
2017-03-23  9:24 ` Marta Rybczynska
2017-03-23 14:00 ` Christoph Hellwig
2017-03-23 14:00   ` Christoph Hellwig
2017-03-23 14:36   ` Marta Rybczynska
2017-03-23 14:36     ` Marta Rybczynska
2017-03-28 11:09     ` Sagi Grimberg
2017-03-28 11:09       ` Sagi Grimberg
2017-03-28 11:20       ` Marta Rybczynska
2017-03-28 11:20         ` Marta Rybczynska
2017-03-28 11:30         ` Sagi Grimberg
2017-03-28 11:30           ` Sagi Grimberg
2017-03-29  9:36           ` Marta Rybczynska
2017-03-29  9:36             ` Marta Rybczynska
2017-03-29 13:29           ` Jason Gunthorpe
2017-03-29 13:29             ` Jason Gunthorpe
2017-03-29 15:47             ` Sagi Grimberg
2017-03-29 15:47               ` Sagi Grimberg
2017-03-29 16:27               ` Jason Gunthorpe
2017-03-29 16:27                 ` Jason Gunthorpe
2017-03-29 16:39                 ` Sagi Grimberg
2017-03-29 16:39                   ` Sagi Grimberg
2017-03-29 16:44                   ` Doug Ledford
2017-03-29 16:44                     ` Doug Ledford
2017-03-29 16:47                     ` Doug Ledford
2017-03-29 16:47                       ` Doug Ledford
2017-03-29 16:59                       ` Sagi Grimberg
2017-03-29 16:59                         ` Sagi Grimberg
2017-03-29 22:19                         ` Jason Gunthorpe
2017-03-29 22:19                           ` Jason Gunthorpe
2017-03-30 14:23                         ` Marta Rybczynska
2017-03-30 14:23                           ` Marta Rybczynska
2017-04-06 12:29                           ` Marta Rybczynska
2017-04-06 12:29                             ` Marta Rybczynska
2017-04-06 13:02                             ` Leon Romanovsky [this message]
2017-04-06 13:02                               ` Leon Romanovsky
2017-04-07 13:31                               ` Marta Rybczynska
2017-04-07 13:31                                 ` Marta Rybczynska
2017-04-09 12:31                                 ` Sagi Grimberg
2017-04-09 12:31                                   ` Sagi Grimberg
2017-04-10 11:29                                   ` Marta Rybczynska
2017-04-10 11:29                                     ` Marta Rybczynska

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=20170406130207.GI2269@mtr-leonro.local \
    --to=leonro@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.