Netdev List
 help / color / mirror / Atom feed
From: santosh.shilimkar@oracle.com
To: Gerd Rausch <gerd.rausch@oracle.com>, netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>
Subject: Re: [PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV
Date: Tue, 2 Jul 2019 15:47:26 -0700	[thread overview]
Message-ID: <5b98d27b-c6e8-0c35-97ba-ea65f9835655@oracle.com> (raw)
In-Reply-To: <74255414-7e5c-e490-4745-9a8b9a73488d@oracle.com>

On 7/2/19 3:12 PM, Gerd Rausch wrote:
> On 02/07/2019 14.18, santosh.shilimkar@oracle.com wrote:
>> On 7/2/19 2:05 PM, Gerd Rausch wrote:
>>> What do you call "RDS_GET_MR" semantics?
>>>
>> Its a blocking socket call. Meaning after this call return to the
>> user, the key must be valid. With async registration that can't be
>> guaranteed.
>>
> 
> If the "IB_WR_REG_MR" operation does not complete successfully within
> the given (to-be-discussed?) timeout, "rds_ib_post_reg_frmr" will return
> "-EBUSY".
> 
> And that should propagate up the entire stack and make its way into
> "setsockopt" returning "-1" with "errno == EBUSY".

This is an easy case and this doesn't need any waiting since call just
came back without posting work request.
> 
> Do you see a problem with this approach?
> Did you observe a situation where this did not work?
>
Calling rds_ib_post_reg_frmr() and looking at return value doesn't
grantee that the work request postred is gping to be successful.

> Are you saying that no timeout, no matter how large, is large enough?
> If that's the case, we can consider turning the "wait_event_timeout"
> into a "wait_event".
>
Yep. Basically till the ceq handler reports successful completion of
reg_mr or inval_mr, mr is not guaranteed to be registered or
invalidated.

>>> Are you suggesting to
>>> a) Not fix this bug right now and wait until some later point in time
>> When did I say that ? I said have you explored alternate approach to
>> fix the issue and if not could you try it out.
>>
> 
> Why explore an alternate approach?
> Do you see a problem with the proposed patch (other than the choice of timeout)?
> 
Yes the timeout based proceeding isn't safe. wait_event without timeout
would make it guaranteed and give sync like behavior. This is the
behavior with FMR reg and inval calls. If you make that as
wait_event then am fine with the change.

Regards,
Santosh

      reply	other threads:[~2019-07-03  0:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 16:39 [PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV Gerd Rausch
2019-07-01 20:41 ` santosh.shilimkar
2019-07-01 20:55   ` Gerd Rausch
2019-07-01 21:00     ` santosh.shilimkar
2019-07-01 21:06       ` Gerd Rausch
2019-07-02  2:28         ` santosh.shilimkar
2019-07-02  5:11           ` Gerd Rausch
2019-07-02 16:49             ` santosh.shilimkar
2019-07-02 21:05               ` Gerd Rausch
2019-07-02 21:18                 ` santosh.shilimkar
2019-07-02 22:12                   ` Gerd Rausch
2019-07-02 22:47                     ` santosh.shilimkar [this message]

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=5b98d27b-c6e8-0c35-97ba-ea65f9835655@oracle.com \
    --to=santosh.shilimkar@oracle.com \
    --cc=davem@davemloft.net \
    --cc=gerd.rausch@oracle.com \
    --cc=netdev@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