|
|
About
TODO
Blog
RSS
Old blog
Projects
Gallery
Notes
Mon, 07 Aug 2006
Network tree allocator.
Additional 100 milliards of allocations have been done for
network tree allocator. It's time to move it into the kernel.
While hacking on NTA I've created special SLAB-like 3 layer cache for
struct avl_container - special structures used to store
pointers to free chunks inside special crafted FIFO lists.
Now there is only following allocation being done using Linux memory allocation
primitives:
- initial storage structures for AVL trees (i.e. pages of data (which will be reused by tree allocator) and tree nodes) and array of
lists of free chunks
- container cache layers (l1 and l2 are pages, l3 is element of the list, which should be allocated very rarely),
which are only allocated when appropriate layer is empty
So in run-time there are no allocations from main memory except rare page-sized allocations
to refill container cache. As expected after some short period of time container cache stopped to grow.
Interesting note that after switching to cache allocator from usual malloc()/free() for containers
general allocation speeds has increased.
/devel/networking/nta :: Link / Comments (0)
Please solve this captcha to be allowed to post (need to reload in a minute): 33 * 2
|