trial implementation of private file mapping

for review only.  will soon be reverted.
This commit is contained in:
NAKAMURA Gou
2013-07-17 16:19:39 +09:00
parent 70e46dcd4b
commit abe57218c4
23 changed files with 1756 additions and 173 deletions

View File

@@ -2,16 +2,25 @@
#define __HEADER_PAGE_H
struct page {
struct list_head list;
uint64_t flags;
int64_t count;
struct list_head list;
uint8_t mode;
uint8_t padding[3];
int32_t count;
off_t offset;
};
/* flags */
#define PAGE_IN_LIST 0x0001UL
/* mode */
enum page_mode {
PM_NONE = 0x00,
PM_PENDING_FREE = 0x01,
PM_PAGEIO = 0x02,
PM_MAPPED = 0x03,
PM_ANON_COW = 0x04,
};
struct page *phys_to_page(uintptr_t phys);
uintptr_t page_to_phys(struct page *page);
int page_unmap(struct page *page);
void *allocate_pages(int npages, enum ihk_mc_ap_flag flag);
void free_pages(void *va, int npages);