From: Eric Dumazet <dada1@cosmosbay.com>
To: Simon Horman <horms@verge.net.au>
Cc: David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] IPV4 : Move ip route cache flush (secret_rebuild) from softirq to workqueue
Date: Fri, 16 Nov 2007 22:23:58 +0100 [thread overview]
Message-ID: <473E0A6E.6070808@cosmosbay.com> (raw)
In-Reply-To: <20071116194959.GE8971@verge.net.au>
Simon Horman a écrit :
> Is it ever neccessary to call cond_resched() if rt_hash_table[i].chain
> is NULL? If not, the following looks cleaner to my eyes:
>
> for (i = 0; i <= rt_hash_mask; i++) {
> rth = rt_hash_table[i].chain;
> if (!rth)
> continue;
>
> spin_lock_bh(rt_hash_lock_addr(i));
> rth = rt_hash_table[i].chain;
> rt_hash_table[i].chain = NULL;
> spin_unlock_bh(rt_hash_lock_addr(i));
>
> ...
>
Well, it depends if the table is empty or not, and its size.
Some RT tasks want to to be wakeup every ms for example.
With a 8MB hash table (one million slots on x86_64), the full scan is longer
than 1 ms, even if no IRQ came and stole the cpu...
next prev parent reply other threads:[~2007-11-16 21:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-16 16:40 [PATCH] IPV4 : Move ip route cache flush (secret_rebuild) from softirq to workqueue Eric Dumazet
2007-11-16 19:50 ` Simon Horman
2007-11-16 21:23 ` Eric Dumazet [this message]
2007-11-17 0:54 ` David Miller
2007-11-17 9:41 ` Eric Dumazet
2007-11-17 14:36 ` Herbert Xu
2007-11-17 16:18 ` Eric Dumazet
2007-11-17 16:29 ` Herbert Xu
2007-11-18 0:45 ` David Miller
2007-11-18 2:07 ` Herbert Xu
2007-11-18 2:13 ` David Miller
2007-11-20 6:43 ` 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=473E0A6E.6070808@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=davem@davemloft.net \
--cc=horms@verge.net.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.