MM: zero memory at free and deferred zero

Change-Id: Ib0055d6f2bdd10d05d749dcd1f3d5c3d318f22f3
This commit is contained in:
Masamichi Takagi
2020-12-08 11:59:08 +09:00
parent fbd121d28c
commit 100bbe6231
7 changed files with 263 additions and 18 deletions

View File

@@ -41,10 +41,17 @@ struct ihk_mc_numa_node {
struct list_head allocators;
struct node_distance *nodes_by_distance;
#ifdef IHK_RBTREE_ALLOCATOR
struct rb_root zeroed_chunks;
struct rb_root free_chunks;
mcs_lock_node_t lock;
unsigned long nr_pages;
/*
* nr_free_pages: all freed pages
* nr_zeroed_pages: zeroed free pages
* Invariant: nr_zeroed_pages <= nr_free_pages
*/
unsigned long nr_zeroed_pages;
unsigned long nr_free_pages;
unsigned long min_addr;
unsigned long max_addr;