From: "Allen Hubbe" <Allen.Hubbe@emc.com>
To: 'Dave Jiang' <dave.jiang@intel.com>, jdmason@kudzu.us
Cc: linux-ntb@googlegroups.com
Subject: RE: [PATCH] NTB: Address out of DMA descriptor issue with NTB
Date: Fri, 8 Jan 2016 09:57:30 -0500 [thread overview]
Message-ID: <000c01d14a24$e6514960$b2f3dc20$@emc.com> (raw)
In-Reply-To: <20160107231454.49862.22907.stgit@djiang5-desk3.ch.intel.com>
From: Dave Jiang <dave.jiang@intel.com>
> The transport right now does not handle the case where we run out of DMA
> descriptors. We just fail when we do not succeed. Adding code to retry
> for
> a bit attempting to use the DMA engine instead of instantly fail to CPU
> copy.
> @@ -1263,11 +1276,20 @@ static void ntb_async_rx(struct ntb_queue_entry
> *entry, void *offset)
> + do {
> + txd = device->device_prep_dma_memcpy(chan, unmap->addr[1],
> + unmap->addr[0], len,
> + DMA_PREP_INTERRUPT);
> + if (!txd) {
> + set_current_state(TASK_INTERRUPTIBLE);
> + schedule_timeout(DMA_OUT_RESOURCE_TO);
> + }
> + } while (!txd && (++retries < DMA_RETRIES));
!txd is tested twice per loop.
How about:
for (retries = 0; retries < DMA_RETRIES; ++retries) {
txd = prep_dma_memcpy();
if (txd)
break;
set_current_state();
schedule_timeout();
}
> @@ -1494,10 +1517,19 @@ static void ntb_async_tx(struct ntb_transport_qp
Also here.
Allen
prev parent reply other threads:[~2016-01-08 14:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 23:14 [PATCH] NTB: Address out of DMA descriptor issue with NTB Dave Jiang
2016-01-08 14:57 ` Allen Hubbe [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='000c01d14a24$e6514960$b2f3dc20$@emc.com' \
--to=allen.hubbe@emc.com \
--cc=dave.jiang@intel.com \
--cc=jdmason@kudzu.us \
--cc=linux-ntb@googlegroups.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