Thread (15 messages) flat view 15 messages, 5 authors, 2011-10-17

Re: [PATCH] dev: use ifindex hash for dev_seq_ops

From: Stephen Hemminger <hidden>
Date: 2011-10-17 15:12:12
Also in: lkml

On Mon, 17 Oct 2011 11:03:54 +0300
Daniel Baluta [off-list ref] wrote:
quoted
This assumes device ifindexes are contained in a small range
[N .. N + X]

I understand this can help some benchmarks, but in real world this wont
help that much once ifindexes are 'fragmented' (If really this multi
thousand devices stuff is for real)

Listen, we currently have 256 slots in the hash table.

Can we try to make 'offset' something like  (slot_number<<24) +
(position in hash chain [slot_number]), instead of (position in devices
global list)

Eric, we can refine the idea of our first patch [1], where we recorded
the (bucket, offset) pair. Stephen, do you agree with this?


thanks,
Daniel.

[1] http://patchwork.ozlabs.org/patch/118331/
Using buckets is fine, my idea about ifindex was just to try and
preserve the order, but it doesn't matter.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help