From: "Edgar E. Iglesias" <edgar.iglesias@axis.com>
To: Jamal Hadi Salim <hadi@znyx.com>
Cc: netdev@vger.kernel.org, auke-jan.h.kok@intel.com,
jesse.brandeburg@intel.com, mchan@broadcom.com,
shemminger@osdl.org, David Miller <davem@davemloft.net>,
Herbert Xu <herbert@gondor.apana.org.au>,
Jesse Brandeburg <jesse.brandeburg@gmail.com>
Subject: Re: [PATCH] [e1000]: Remove unnecessary tx_lock
Date: Mon, 7 Aug 2006 19:04:03 +0200 [thread overview]
Message-ID: <20060807170403.GA10818@edgar.underground.se.axis.com> (raw)
In-Reply-To: <1154968319.5446.30.camel@jzny2>
On Mon, Aug 07, 2006 at 12:31:59PM -0400, Jamal Hadi Salim wrote:
> On Mon, 2006-07-08 at 17:59 +0200, Edgar E. Iglesias wrote:
>
> > Ok, I thought you wanted the code inside the ifdefs to be considered. If not,
> > I guess there is no problem. Yes, the forwarding case does not suffer from
> > any deadlocks issues that I am aware of.
> >
>
> >From my tests:
> It does _not_ provide any performance improvements and at some point i decided
> i didnt want to add more variables to analyze, so i got rid of it; I would have
> had to hand edit the patch to totally remove it; so that why you still see the
> ifdefed out variant.
>
> > No, the deadlock happens only if you don't prune the descriptors. If the host
> > sends some data and then goes quite, fdesc < tx_ring->prunet might not be
> > true for a long time and skbs will end up sitting in the tx ring indefinitely,
> > charging the socket's sndbuf.
> >
>
> Note: I didnt get rid of the rx path pruning. i.e that is still on. It
> just prunes lesser descriptors with that change on the tx. So not very
> different from before.
>
> I think i may be getting a gist now of the discussion after a re-read;
> while packets are still charged to TCP may have been transmitted they may sit
> on the tx ring forever. They will only be pruned if we had netif_stopped
> (and even that is not good enough with Jesse's threshold check) or if a
> new packet comes in destined for us.
> Did i understand correctly? If yes, i didnt introduce this challenge it
> has always been there. I think i understand the suggestion now from
> Dave/Herbert to orphan those skbs...
I'll give you an example.
A TCP flow sends X data and later waits for a response, host is now quietly
waiting. Assume fdesc >= tx_ring->prunet, so we dont free any skbs, right?
Now assume that some part of X data gets lost, our retransmit timer hits and
we want to retransmit but our socket is charged with too much data sitting on
the nics tx-ring, so we don't send anything. By orphaning, those skbs won't
charge the socket and the flow can retransmit.
Best regards
--
Programmer
Edgar E. Iglesias <edgar.iglesias@axis.com> 46.46.272.1946
next prev parent reply other threads:[~2006-08-07 17:04 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-03 13:15 [PATCH] [e1000]: Remove unnecessary tx_lock jamal
2006-08-03 14:02 ` Herbert Xu
2006-08-03 14:24 ` jamal
2006-08-03 16:36 ` Brandeburg, Jesse
2006-08-03 18:05 ` Michael Chan
2006-08-03 22:08 ` jamal
2006-08-04 0:09 ` Michael Chan
2006-08-04 1:10 ` Herbert Xu
2006-08-04 8:37 ` Herbert Xu
2006-08-04 10:10 ` Herbert Xu
2006-08-04 10:16 ` jamal
2006-08-04 10:25 ` Herbert Xu
2006-08-04 10:45 ` jamal
2006-08-05 23:04 ` jamal
2006-08-05 23:06 ` Herbert Xu
2006-08-05 23:21 ` jamal
2006-08-05 23:30 ` Herbert Xu
2006-08-05 16:45 ` jamal
2006-08-04 17:12 ` Stephen Hemminger
2006-08-04 17:28 ` Michael Chan
2006-08-04 18:08 ` Stephen Hemminger
2006-08-04 23:31 ` David Miller
2006-08-05 16:56 ` jamal
2006-08-05 23:05 ` Herbert Xu
2006-08-05 23:17 ` jamal
2006-08-05 23:19 ` Herbert Xu
2006-08-05 23:36 ` jamal
2006-08-06 2:51 ` Herbert Xu
2006-08-06 7:14 ` Edgar E. Iglesias
2006-08-06 7:24 ` Herbert Xu
2006-08-06 7:30 ` Edgar E. Iglesias
2006-08-06 7:26 ` David Miller
2006-08-06 7:36 ` Herbert Xu
2006-08-06 8:06 ` Edgar E. Iglesias
2006-08-06 8:27 ` Herbert Xu
2006-08-06 9:03 ` Edgar E. Iglesias
2006-08-06 9:10 ` Herbert Xu
2006-08-06 9:18 ` Edgar E. Iglesias
2006-08-06 8:35 ` David Miller
2006-08-06 12:24 ` jamal
2006-08-06 12:33 ` jamal
2006-08-06 23:16 ` Jesse Brandeburg
2006-08-07 12:50 ` jamal
2006-08-07 15:21 ` Edgar E. Iglesias
2006-08-07 15:40 ` jamal
2006-08-07 15:59 ` Edgar E. Iglesias
2006-08-07 16:31 ` Jamal Hadi Salim
2006-08-07 17:04 ` Edgar E. Iglesias [this message]
2006-08-07 18:00 ` jamal
2006-08-07 18:47 ` Edgar E. Iglesias
2006-08-07 19:03 ` jamal
2006-08-07 19:14 ` Edgar E. Iglesias
2006-08-07 19:34 ` jamal
2006-08-07 20:28 ` Edgar E. Iglesias
2006-08-08 0:52 ` jamal
2006-08-07 20:53 ` Brandeburg, Jesse
2006-08-08 1:07 ` jamal
2006-08-07 23:23 ` Herbert Xu
2006-08-07 23:35 ` Brandeburg, Jesse
2006-08-07 23:40 ` Herbert Xu
2006-08-07 16:29 ` Edgar E. Iglesias
2006-08-07 16:36 ` jamal
2006-08-06 19:22 ` jamal
2006-08-08 1:19 ` jamal
2006-08-08 1:22 ` Herbert Xu
2006-08-08 1:33 ` jamal
2006-08-08 2:17 ` Herbert Xu
2006-08-08 3:10 ` jamal
2006-08-08 12:21 ` jamal
2006-08-08 12:39 ` Herbert Xu
2006-08-06 17:20 ` Michael Chan
2006-08-06 23:04 ` Herbert Xu
2006-08-07 3:56 ` Michael Chan
2006-08-07 4:21 ` Herbert Xu
2006-08-08 17:04 ` Benjamin LaHaise
2006-08-08 22:06 ` David Miller
2006-08-08 23:21 ` Benjamin LaHaise
2006-08-09 0:25 ` Herbert Xu
2006-08-09 1:25 ` Benjamin LaHaise
2006-08-04 1:16 ` jamal
2006-08-04 1:18 ` Herbert Xu
2006-08-04 1:25 ` jamal
2006-08-04 4:06 ` Michael Chan
2006-08-03 22:06 ` jamal
-- strict thread matches above, loose matches on Subject: below --
2006-08-08 5:43 Brandeburg, Jesse
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=20060807170403.GA10818@edgar.underground.se.axis.com \
--to=edgar.iglesias@axis.com \
--cc=auke-jan.h.kok@intel.com \
--cc=davem@davemloft.net \
--cc=hadi@znyx.com \
--cc=herbert@gondor.apana.org.au \
--cc=jesse.brandeburg@gmail.com \
--cc=jesse.brandeburg@intel.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@osdl.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;
as well as URLs for NNTP newsgroup(s).