Commit Graph

19 Commits (master)

Author SHA1 Message Date
Shuxin Yang 43cc26020a Add one system-mode testing case.
Fix bunch of minior bugs exposed by this testing case.
2014-12-09 13:23:07 -08:00
Shuxin Yang 8259273340 o. clean up.
o. add support multiple-mode support: user mode mmap, kernel mode mmap, hybrid modes.
2014-12-06 11:46:44 -08:00
Shuxin Yang 8ec9bdad27 Add comment; correct comment; all about comment. 2014-10-28 11:31:01 -07:00
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 bea77ba9cb Miscellaneous minor tweaks 2014-08-24 10:42:35 -07:00
Shuxin Yang 7ba100395c This change include two parts:
1. replace misnomer "trunk" with "chunk".
2. add a stress testing and benchmark infrastructure.
2014-08-22 11:28:53 -07:00
Shuxin Yang ca0d7fa94d - Add a unit-test for lm_remap().
- Find few minor bugs.
2014-08-18 17:03:58 -07:00
Shuxin Yang de17def8a1 Add a unit-test for lm_mmap()/lm_malloc(). 2014-08-18 13:02:27 -07:00
Shuxin Yang 252b87f9fd Enable unit test 2.
Add files which should have been committed eariler.
2014-08-18 11:35:26 -07:00
Shuxin Yang c6cfc27f43 pass the 1st unit test 2014-08-15 16:04:47 -07:00
Shuxin Yang 76f82f6ad4 enable unit-test infra-structure 2014-08-15 13:06:49 -07:00
Shuxin Yang 48179af1f8 Add unit-test support. 2014-08-14 16:05:54 -07:00
Shuxin Yang b6f1258162 Divide page_alloc.c into two parts: one is still for page allocation, the other part is to implement
lm_mmap(), lm_munmap() and lm_remap().
2014-08-14 14:09:14 -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 487d022aae Introduce page "id", which is a page "index" plus a non-negative number.
The index is ranging from 0 to the number-of-page-minus-1, while the id
is used to termine related "buddy" block.
2014-08-12 17:03:39 -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