Re: [PATCH, RFC] RCU : OOM avoidance and lower latency
From: Eric Dumazet
Date: Sat Jan 07 2006 - 03:29:14 EST
David S. Miller a écrit :
Eric, how important do you honestly think the per-hashchain spinlocks
are? That's the big barrier from making rt_secret_rebuild() a simple
rehash instead of flushing the whole table as it does now.
No problem for me in going to a single spinlock.
I did the hashed spinlock patch in order to reduce the size of the route hash
table and not hurting big NUMA machines. If you think a single spinlock is OK,
that's even better !
The lock is only grabbed for updates, and the access to these locks is
random and as such probably non-local when taken anyways. Back before
we used RCU for reads, this array-of-spinlock thing made a lot more
sense.
I mean something like this patch:
+static DEFINE_SPINLOCK(rt_hash_lock);
Just one point : This should be cache_line aligned, and use one full cache
line to avoid false sharing at least. (If a cpu takes the lock, no need to
invalidate *rt_hash_table for all other cpus)
Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/