From: Eric Dumazet <dada1@cosmosbay.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Andrew Morton <akpm@linux-foundation.org>,
davem@davemloft.net, netdev@vger.kernel.org,
bugme-daemon@bugzilla.kernel.org, andsve@gmail.com
Subject: Re: [Bugme-new] [Bug 8536] New: Kernel drops UDP packets silently when reading from certain proc file entries
Date: Fri, 25 May 2007 08:50:20 +0200 [thread overview]
Message-ID: <4656872C.9000701@cosmosbay.com> (raw)
In-Reply-To: <E1HrTDQ-0006qu-00@gondolin.me.apana.org.au>
Herbert Xu a écrit :
> Andrew Morton <akpm@linux-foundation.org> wrote:
>>> It is possible to introduce UDP packet losses by reading
>>> the proc file entry /proc/net/tcp. The really strange thing is that
>>> the error counters for packet drops are not increased.
>
> Please try this patch and let us know if it helps.
>
> [TCPv4]: Improve BH latency in /proc/net/tcp
>
> Currently the code for /proc/net/tcp disable BH while iterating
> over the entire established hash table. Even though we call
> cond_resched_softirq for each entry, we still won't process
> softirq's as regularly as we would otherwise do which results
> in poor performance when the system is loaded near capacity.
>
> This anomaly comes from the 2.4 code where this was all in a
> single function and the local_bh_disable might have made sense
> as a small optimisation.
>
> The cost of each local_bh_disable is so small when compared
> against the increased latency in keeping it disabled over a
> large but mostly empty TCP established hash table that we
> should just move it to the individual read_lock/read_unlock
> calls as we do in inet_diag.
>
But its not really true : cond_resched_softirq() is called for
each bucket in hash table, empty or not.
If this patch really helps, this means cond_resched_softirq()
doesnt work at all and should be fixed, or just zapped as it
is seldom used.
next prev parent reply other threads:[~2007-05-25 6:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200705241948.l4OJmTAe031670@fire-2.osdl.org>
2007-05-24 19:59 ` [Bugme-new] [Bug 8536] New: Kernel drops UDP packets silently when reading from certain proc file entries Andrew Morton
2007-05-25 6:23 ` Herbert Xu
2007-05-25 6:50 ` Eric Dumazet [this message]
2007-05-25 6:57 ` Herbert Xu
2007-05-25 7:15 ` Eric Dumazet
2007-05-25 7:17 ` Herbert Xu
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=4656872C.9000701@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=akpm@linux-foundation.org \
--cc=andsve@gmail.com \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.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).