netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: walt@holmansrus.com
Cc: David Miller <davem@davemloft.net>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: Strange network timeouts w/ 2.6.30.5
Date: Thu, 20 Aug 2009 11:03:09 +0200	[thread overview]
Message-ID: <m3my5ueu2a.fsf@intrepid.localdomain> (raw)
In-Reply-To: <20090819.211736.222582824.davem@davemloft.net> (David Miller's message of "Wed\, 19 Aug 2009 21\:17\:36 -0700 \(PDT\)")

> Since patching to 2.6.30.5 I'm experiencing periodic timeouts on my
> e100 which is used as my WAN interface on a server/router box. Nothing
> is reported in any logs and eventually the traffic resumes. It seems
> to happen at fairly regular intervals, although I've not timed them.
> The timeouts last for approx. 60-120 seconds and then traffic resumes
> normally with no hint of what happened.

x86-64, intel P965...

Can you provide "dmesg" output, please?

I wonder what additional side effect did the patch cause. Streaming
allocs on such x86 should already be coherent, no?

Perhaps you have more than 2 GB RAM (or so) and swiotlb has to provide
buffering? I think of something like:

- the driver does "sync for CPU" and examines status
- the descriptor is tested to be still empty
- meanwhile e100 chip changes the status in the descriptor
- the driver does "sync for device" (it's what the patch added)
- at this point swiotlb doesn't know the descriptor is clean and writes
  it out, thus dropping the change done by the e100 chip.

Does the above seem plausible? I admit I'm not swiotlb expert, it's
a pure guess that it simply and blindly moves data in and out.

If that's the case, I don't really know how could it work without the
patch in question. Perhaps the timings were just right?

What can we do with it? Rewriting to use consistent allocs, of course.
Temporarily adding #ifdef CONFIG_ARM around the
pci_dma_sync_single_for_device()? Not sure if other archs were affected.

The root problem is that the driver shouldn't use streaming allocations
for its descriptors (they are written from both sides simultaneously).
Only skb->data can be streaming.
-- 
Krzysztof Halasa

  reply	other threads:[~2009-08-20  9:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1762204735.01250727555803.JavaMail.root@mail.holmansrus.com>
     [not found] ` <2087985663.21250727676944.JavaMail.root@mail.holmansrus.com>
2009-08-20  4:17   ` Strange network timeouts w/ 2.6.30.5 David Miller
2009-08-20  9:03     ` Krzysztof Halasa [this message]
2009-08-20  9:13       ` David Miller
2009-08-20  9:22         ` Krzysztof Halasa
     [not found] <1359163732.51250769223038.JavaMail.root@mail.holmansrus.com>
2009-08-20 11:54 ` Walt Holman
2009-08-20 13:45   ` Krzysztof Halasa
2009-08-20 19:28     ` David Miller
2009-08-20 20:28       ` Krzysztof Halasa
2009-08-20 22:21     ` Walt Holman
2009-08-21  9:44       ` Krzysztof Halasa
2009-08-23 19:18     ` Aviv Greenberg
2009-08-23 20:02       ` Krzysztof Halasa
     [not found] <1489093361.01250869377567.JavaMail.root@mail.holmansrus.com>
2009-08-21 15:45 ` Walt Holman
2009-08-22 20:26   ` Krzysztof Halasa

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=m3my5ueu2a.fsf@intrepid.localdomain \
    --to=khc@pm.waw.pl \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=walt@holmansrus.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;
as well as URLs for NNTP newsgroup(s).