David Miller <[EMAIL PROTECTED]> wrote:
>
> +static struct rt_hash_bucket *rt_get_bucket(u32 daddr, u32 saddr, unsigned
> int *hp)
> +{
> + struct rt_hash_bucket *r;
> + unsigned long seq;
> +
> + do {
> + unsigned int hash;
> +
> + seq = read_seqbegin(&rt_hash_seq);
> + *hp = hash = __rt_hash_code(daddr, saddr, __rt_hash_mask);
> + r = &__rt_hash_table[hash];
> + } while (read_seqretry(&rt_hash_seq, seq));
If we hit a writer just as they begin resizing, we could be here for
quite a while.
In fact because we expect each writer to stick around for a relatively
long time, we could use a new seqlock primitive that just spun until
the LSB becomes zero again.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html