Commit Graph

8 Commits (master)

Author SHA1 Message Date
Shuxin Yang 7dbfb668f1 Fix bunch of bugs!
As of this revision. We are able to run CPU2000int with refernece input
successfully! These benchmarks are linked against ptmalloc3 (not part of
this project) and the libadaptor.so.

Running CPU2000int is just a way to stress test this work.
2014-09-02 10:30:04 -07:00
Shuxin Yang 1db717f783 some cleanup 2014-08-27 17:00:21 -07:00
Shuxin Yang f6c4ca0d94 This change introduces "block cache" to avoid the cost of TLB manipulation,
and page initialization via zero-filling.

  Suppose a allocated block B1, whose virtual address is [ad1, ad2], is going
to deallocated. One Linux, it seems the only way to deallocate the pages
associated with the block is to call madvise(..MADV_DONTNEED...) (
hereinafter, call it madvise() for short unless otherwise noted).

 madvise() *immediately* remove all the pages involved, and invalidate the
related TLB entries. So, if later on we allocate a block overlapping with
B1 in virtual address; accessing to the overlapping space will result in
re-establishing TLB entries, and zero-fill-pages, which is bit expensive.

 This cost can be reduced by keeping few blocks in memory, and re-use the
memory resident pages over and over again. This is the rationale behind the
"block cache". The "cache" here may be a misnomer; it dosen't cache any data,
it just provide a way to keep small sum of idle pages in memory to avoid
cost of TLB manipulation and page initialization via zero-filling.
2014-08-26 22:24:30 -07:00
Shuxin Yang 3e34a802c7 Fix bugs of rb-tree. The bug is about searching element with key no-less-than
or no-greater-than given key.
2014-08-14 11:49:33 -07:00
Shuxin Yang e912288905 Rudimentary implementation of lm_mremap() 2014-08-14 09:18:35 -07:00
Shuxin Yang 71f14207e8 Implement lm_unmap() features about unmapping leading or trailing partion
of mapped block. Unmapping middle portion of mapped area is not yet implemneted.

This change is not tested yet.
2014-08-13 15:14:10 -07:00
Shuxin Yang c266dd8f67 add rbt_search_variant which is able to search an element greater/less than a given key 2014-08-12 18:10:01 -07:00
Shuxin Yang 9e6507bd22 rudimentary implementation luajit mem-managment for taking full advantage of lower 2G memory 2014-08-07 11:05:29 -07:00