* Dealing with limited resources and DMA Engine copies
@ 2008-02-14 2:38 Olof Johansson
0 siblings, 0 replies; 2+ messages in thread
From: Olof Johansson @ 2008-02-14 2:38 UTC (permalink / raw)
To: shannon.nelson, dan.j.williams; +Cc: netdev
Hi,
My DMA Engine has a limited resource: It's got a descriptor ring, so
it's not always possible to add a new descriptor to it (i.e. it might be
full). While allocating a huge ring will help, eventually I'm sure I
will hit a case where it'll overflow.
I thought this was going to be taken care of automatically by the fact
that you return your max(?) number of descriptors in the channel
allocation function, but it looks like that value is discarded in
dma_client_chan_alloc().
So, I just got a couple of spurious:
dma_cookie < 0
dma_cookie < 0
...on the console and the connection terminated. Looks like that came
from tcp_recvmsg(). Ouch.
How about falling back to the cpu-based copy in case of failure? Or would
you prefer that I sleep locally in my driver and wait on a descriptor
slot to open up?
-Olof
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: Dealing with limited resources and DMA Engine copies
[not found] <f12847240802200440u3542c2a0vaf82312435ddafe9@mail.gmail.com>
@ 2008-02-20 13:01 ` Sosnowski, Maciej
0 siblings, 0 replies; 2+ messages in thread
From: Sosnowski, Maciej @ 2008-02-20 13:01 UTC (permalink / raw)
To: olof; +Cc: netdev, Nelson, Shannon, Williams, Dan J
>---------- Original message ----------
>From: Olof Johansson <olof@lixom.net>
>Date: Feb 14, 2008 3:38 AM
>Subject: Dealing with limited resources and DMA Engine copies
>To: shannon.nelson@intel.com, dan.j.williams@intel.com
>Cc: netdev@vger.kernel.org
>
>Hi,
>
>My DMA Engine has a limited resource: It's got a descriptor ring, so
>it's not always possible to add a new descriptor to it (i.e. it might
be
>full). While allocating a huge ring will help, eventually I'm sure I
>will hit a case where it'll overflow.
>
>I thought this was going to be taken care of automatically by the fact
>that you return your max(?) number of descriptors in the channel
>allocation function, but it looks like that value is discarded in
>dma_client_chan_alloc().
>
>So, I just got a couple of spurious:
>dma_cookie < 0
>dma_cookie < 0
>
>...on the console and the connection terminated. Looks like that came
>from tcp_recvmsg(). Ouch.
>
>How about falling back to the cpu-based copy in case of failure? Or
would
>you prefer that I sleep locally in my driver and wait on a descriptor
>slot to open up?
>
I have taken a closer look at this in the code. It seems to be a good
idea to withdraw for a while from ioat-dma copy in case of "dma_cookie <
0" error to let the ring free some descriptors.
I will be able to work on it next week probably. As soon as I have some
stable results, I will get back to you with it.
Maciej
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
z siedziba w Gdansku
ul. Slowackiego 173
80-298 Gdansk
Sad Rejonowy Gdansk Polnoc w Gdansku,
VII Wydzial Gospodarczy Krajowego Rejestru Sadowego,
numer KRS 101882
NIP 957-07-52-316
Kapital zakladowy 200.000 zl
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-20 13:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-14 2:38 Dealing with limited resources and DMA Engine copies Olof Johansson
[not found] <f12847240802200440u3542c2a0vaf82312435ddafe9@mail.gmail.com>
2008-02-20 13:01 ` Sosnowski, Maciej
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).