From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: herbert@gondor.apana.org.au, netdev@vger.kernel.org
Subject: Re: [PATCH] NET : convert IP route cache garbage colleciton from softirq processing to a workqueue
Date: Wed, 12 Sep 2007 02:05:25 -0700 (PDT) [thread overview]
Message-ID: <20070912.020525.39165997.davem@davemloft.net> (raw)
In-Reply-To: <20070911145613.4762c534.dada1@cosmosbay.com>
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Tue, 11 Sep 2007 14:56:13 +0200
> When the periodic IP route cache flush is done (every 600 seconds on
> default configuration), some hosts suffer a lot and eventually trigger
> the "soft lockup" message.
>
> dst_run_gc() is doing a scan of a possibly huge list of dst_entries,
> eventually freeing some (less than 1%) of them, while holding the
> dst_lock spinlock for the whole scan.
>
> Then it rearms a timer to redo the full thing 1/10 s later...
> The slowdown can last one minute or so, depending on how active are
> the tcp sessions.
>
> This second version of the patch converts the processing from a softirq
> based one to a workqueue.
>
> Even if the list of entries in garbage_list is huge, host is still
> responsive to softirqs and can make progress.
>
> Instead of reseting gc timer to 0.1 second if one entry was freed in a
> gc run, we do this if more than 10% of entries were freed.
I like this patch a lot, some minor fix is needed though:
> + __builtin_prefetch(&next->next, 1, 0);
Please use prefetch() instead of a direct explicit
call to a gcc-specific routine :-)
next prev parent reply other threads:[~2007-09-12 9:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-11 12:56 [PATCH] NET : convert IP route cache garbage colleciton from softirq processing to a workqueue Eric Dumazet
2007-09-12 9:05 ` David Miller [this message]
2007-09-12 10:08 ` Eric Dumazet
2007-09-12 11:12 ` David Miller
2007-09-12 12:16 ` Eric Dumazet
2007-09-12 12:30 ` David Miller
2007-09-12 10:00 ` Christoph Hellwig
2007-09-12 10:18 ` Eric Dumazet
2007-09-12 11:10 ` David Miller
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=20070912.020525.39165997.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dada1@cosmosbay.com \
--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).