From: David Miller <davem@davemloft.net>
To: gerd.rausch@oracle.com
Cc: santosh.shilimkar@oracle.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/7] net/rds: Give fr_state a chance to transition to FRMR_IS_FREE
Date: Mon, 01 Jul 2019 11:27:51 -0700 (PDT) [thread overview]
Message-ID: <20190701.112751.509316780582361121.davem@davemloft.net> (raw)
In-Reply-To: <44f1794c-7c9c-35bc-dc64-a2a993d06a6e@oracle.com>
From: Gerd Rausch <gerd.rausch@oracle.com>
Date: Mon, 1 Jul 2019 09:39:44 -0700
> + /* Memory regions make it onto the "clean_list" via
> + * "rds_ib_flush_mr_pool", after the memory region has
> + * been posted for invalidation via "rds_ib_post_inv".
> + *
> + * At that point in time, "fr_state" may still be
> + * in state "FRMR_IS_INUSE", since the only place where
> + * "fr_state" transitions to "FRMR_IS_FREE" is in
> + * is in "rds_ib_mr_cqe_handler", which is
> + * triggered by a tasklet.
> + *
> + * So in case we notice that
> + * "fr_state != FRMR_IS_FREE" (see below), * we wait for
> + * "fr_inv_done" to trigger with a maximum of 10msec.
> + * Then we check again, and only put the memory region
> + * onto the drop_list (via "rds_ib_free_frmr")
> + * in case the situation remains unchanged.
> + *
> + * This avoids the problem of memory-regions bouncing
> + * between "clean_list" and "drop_list" before they
> + * even have a chance to be properly invalidated.
> + */
> + frmr = &ibmr->u.frmr;
> + wait_event_timeout(frmr->fr_inv_done,
> + frmr->fr_state == FRMR_IS_FREE,
> + msecs_to_jiffies(10));
> + if (frmr->fr_state == FRMR_IS_FREE)
> + break;
If we see FRMR_IS_FREE after the timeout, what cleans this up?
Also, why 10msec? Why that specific value and not some other value? Why
not wait for however long it takes for the tasklet to run and clean it up?
next prev parent reply other threads:[~2019-07-01 18:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 16:39 [PATCH net-next 1/7] net/rds: Give fr_state a chance to transition to FRMR_IS_FREE Gerd Rausch
2019-07-01 18:27 ` David Miller [this message]
2019-07-01 20:50 ` Gerd Rausch
2019-07-01 20:53 ` santosh.shilimkar
2019-07-01 20:58 ` Gerd Rausch
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=20190701.112751.509316780582361121.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=gerd.rausch@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=santosh.shilimkar@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox