Thread (5 messages) 5 messages, 3 authors, 2004-09-27

Re: [5/6]: Dynamic neigh hash table growth

From: "David S. Miller" <davem@davemloft.net>
Date: 2004-09-27 19:11:20

On Mon, 27 Sep 2004 21:33:34 +1000
Herbert Xu [off-list ref] wrote:
David S. Miller [off-list ref] wrote:
quoted
+static void neigh_hash_grow(struct neigh_table *tbl, unsigned long new_entries)
+{
+       struct neighbour **new_hash, **old_hash;
+       unsigned int i, new_hash_mask, old_entries;
+
+       BUG_ON(new_entries & (new_entries - 1));
+       new_hash = neigh_hash_alloc(new_entries);
Perhaps it'd be better to bound it based on MAX_ORDER rather than waiting
for neigh_hash_alloc() to fail?
After reading this email I was about to add the check,
but then again, __get_free_pages() handles this case
not all that suboptimally.

I don't think it'll be a problem in practice.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help