Re: [patch 1/8] fdmap v2 - fdmap core

2007-06-07 Thread Davide Libenzi
On Fri, 8 Jun 2007, Eric Dumazet wrote: > struct fd_map { > /* > * read mostly part > */ > unsigned int base; /* 0x00 */ > unsigned int size; /* 0x04 */ > struct list_head slist; /* 0x08 */ > struct list_head *slots; /* 0x18 */ > unsigned long *map; /* 0x20 */

Re: [patch 1/8] fdmap v2 - fdmap core

2007-06-07 Thread Davide Libenzi
On Fri, 8 Jun 2007, Eric Dumazet wrote: > Well, offsets are wrong but layout OK > > struct fd_map { > /* > * read mostly part > */ > unsigned int base; /* 0x00 */ > unsigned int size; /* 0x04 */ > struct list_head slist; /* 0x08 */ > struct list_head *slots; /* 0

Re: [patch 1/8] fdmap v2 - fdmap core

2007-06-07 Thread Eric Dumazet
Eric Dumazet a écrit : struct fd_map { /* * read mostly part */ unsigned int base; /* 0x00 */ unsigned int size; /* 0x04 */ struct list_head slist; /* 0x08 */ struct list_head *slots; /* 0x18 */ unsigned long *map; /* 0x28 */ void (*freecb)(void *, struc

Re: [patch 1/8] fdmap v2 - fdmap core

2007-06-07 Thread Eric Dumazet
Davide Libenzi a écrit : +struct fd_map { + struct fd_map *next; + struct rcu_head rcu; + unsigned int base; + unsigned int size; + struct list_head slist; + struct list_head *slots; + unsigned int fdnext; + unsigned long *map; + void (*freecb

Re: [patch 1/8] fdmap v2 - fdmap core

2007-06-07 Thread Davide Libenzi
On Thu, 7 Jun 2007, Eric Dumazet wrote: > Davide Libenzi a écrit : > > Core code for the fdmap implementation. Random allocation, exact allocation, > > de-allocation and lookup are all O(1) operations. It also support the > "legacy" > > sequential (compact) file descriptor allocation, that is O(N)

Re: [patch 1/8] fdmap v2 - fdmap core

2007-06-06 Thread Eric Dumazet
Davide Libenzi a écrit : > Core code for the fdmap implementation. Random allocation, exact allocation, > de-allocation and lookup are all O(1) operations. It also support the "legacy" > sequential (compact) file descriptor allocation, that is O(N) like the old > fdtable implementation. > Like the

[patch 1/8] fdmap v2 - fdmap core

2007-06-06 Thread Davide Libenzi
Core code for the fdmap implementation. Random allocation, exact allocation, de-allocation and lookup are all O(1) operations. It also support the "legacy" sequential (compact) file descriptor allocation, that is O(N) like the old fdtable implementation. Like the old "struct fdtable", fdmap is RCU