Maintain all the dirty runs in a linked list for each arena

This commit is contained in:
Qinfan Wu
2014-07-18 14:21:17 -07:00
parent dd03242da9
commit 04d60a132b
2 changed files with 53 additions and 0 deletions

View File

@@ -89,6 +89,9 @@ struct arena_chunk_map_s {
}; /* union { ... }; */
#endif
/* Linkage for list of dirty runs. */
ql_elm(arena_chunk_map_t) dr_link;
/*
* Run address (or size) and various flags are stored together. The bit
* layout looks like (assuming 32-bit system):
@@ -333,6 +336,9 @@ struct arena_s {
/* Tree of dirty-page-containing chunks this arena manages. */
arena_chunk_tree_t chunks_dirty;
/* List of dirty runs this arena manages. */
arena_chunk_mapelms_t runs_dirty;
/*
* In order to avoid rapid chunk allocation/deallocation when an arena
* oscillates right on the cusp of needing a new chunk, cache the most