zbud.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. /*
  2. * zbud.c
  3. *
  4. * Copyright (C) 2013, Seth Jennings, IBM
  5. *
  6. * Concepts based on zcache internal zbud allocator by Dan Magenheimer.
  7. *
  8. * zbud is an special purpose allocator for storing compressed pages. Contrary
  9. * to what its name may suggest, zbud is not a buddy allocator, but rather an
  10. * allocator that "buddies" two compressed pages together in a single memory
  11. * page.
  12. *
  13. * While this design limits storage density, it has simple and deterministic
  14. * reclaim properties that make it preferable to a higher density approach when
  15. * reclaim will be used.
  16. *
  17. * zbud works by storing compressed pages, or "zpages", together in pairs in a
  18. * single memory page called a "zbud page". The first buddy is "left
  19. * justified" at the beginning of the zbud page, and the last buddy is "right
  20. * justified" at the end of the zbud page. The benefit is that if either
  21. * buddy is freed, the freed buddy space, coalesced with whatever slack space
  22. * that existed between the buddies, results in the largest possible free region
  23. * within the zbud page.
  24. *
  25. * zbud also provides an attractive lower bound on density. The ratio of zpages
  26. * to zbud pages can not be less than 1. This ensures that zbud can never "do
  27. * harm" by using more pages to store zpages than the uncompressed zpages would
  28. * have used on their own.
  29. *
  30. * zbud pages are divided into "chunks". The size of the chunks is fixed at
  31. * compile time and determined by NCHUNKS_ORDER below. Dividing zbud pages
  32. * into chunks allows organizing unbuddied zbud pages into a manageable number
  33. * of unbuddied lists according to the number of free chunks available in the
  34. * zbud page.
  35. *
  36. * The zbud API differs from that of conventional allocators in that the
  37. * allocation function, zbud_alloc(), returns an opaque handle to the user,
  38. * not a dereferenceable pointer. The user must map the handle using
  39. * zbud_map() in order to get a usable pointer by which to access the
  40. * allocation data and unmap the handle with zbud_unmap() when operations
  41. * on the allocation data are complete.
  42. */
  43. #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  44. #include <linux/atomic.h>
  45. #include <linux/list.h>
  46. #include <linux/mm.h>
  47. #include <linux/module.h>
  48. #include <linux/preempt.h>
  49. #include <linux/slab.h>
  50. #include <linux/spinlock.h>
  51. #include <linux/zbud.h>
  52. #include <linux/zpool.h>
  53. /*****************
  54. * Structures
  55. *****************/
  56. /*
  57. * NCHUNKS_ORDER determines the internal allocation granularity, effectively
  58. * adjusting internal fragmentation. It also determines the number of
  59. * freelists maintained in each pool. NCHUNKS_ORDER of 6 means that the
  60. * allocation granularity will be in chunks of size PAGE_SIZE/64. As one chunk
  61. * in allocated page is occupied by zbud header, NCHUNKS will be calculated to
  62. * 63 which shows the max number of free chunks in zbud page, also there will be
  63. * 63 freelists per pool.
  64. */
  65. #define NCHUNKS_ORDER 6
  66. #define CHUNK_SHIFT (PAGE_SHIFT - NCHUNKS_ORDER)
  67. #define CHUNK_SIZE (1 << CHUNK_SHIFT)
  68. #define ZHDR_SIZE_ALIGNED CHUNK_SIZE
  69. #define NCHUNKS ((PAGE_SIZE - ZHDR_SIZE_ALIGNED) >> CHUNK_SHIFT)
  70. /**
  71. * struct zbud_pool - stores metadata for each zbud pool
  72. * @lock: protects all pool fields and first|last_chunk fields of any
  73. * zbud page in the pool
  74. * @unbuddied: array of lists tracking zbud pages that only contain one buddy;
  75. * the lists each zbud page is added to depends on the size of
  76. * its free region.
  77. * @buddied: list tracking the zbud pages that contain two buddies;
  78. * these zbud pages are full
  79. * @lru: list tracking the zbud pages in LRU order by most recently
  80. * added buddy.
  81. * @pages_nr: number of zbud pages in the pool.
  82. * @ops: pointer to a structure of user defined operations specified at
  83. * pool creation time.
  84. *
  85. * This structure is allocated at pool creation time and maintains metadata
  86. * pertaining to a particular zbud pool.
  87. */
  88. struct zbud_pool {
  89. spinlock_t lock;
  90. struct list_head unbuddied[NCHUNKS];
  91. struct list_head buddied;
  92. struct list_head lru;
  93. u64 pages_nr;
  94. struct zbud_ops *ops;
  95. };
  96. /*
  97. * struct zbud_header - zbud page metadata occupying the first chunk of each
  98. * zbud page.
  99. * @buddy: links the zbud page into the unbuddied/buddied lists in the pool
  100. * @lru: links the zbud page into the lru list in the pool
  101. * @first_chunks: the size of the first buddy in chunks, 0 if free
  102. * @last_chunks: the size of the last buddy in chunks, 0 if free
  103. */
  104. struct zbud_header {
  105. struct list_head buddy;
  106. struct list_head lru;
  107. unsigned int first_chunks;
  108. unsigned int last_chunks;
  109. bool under_reclaim;
  110. };
  111. /*****************
  112. * zpool
  113. ****************/
  114. #ifdef CONFIG_ZPOOL
  115. static int zbud_zpool_evict(struct zbud_pool *pool, unsigned long handle)
  116. {
  117. return zpool_evict(pool, handle);
  118. }
  119. static struct zbud_ops zbud_zpool_ops = {
  120. .evict = zbud_zpool_evict
  121. };
  122. static void *zbud_zpool_create(char *name, gfp_t gfp,
  123. struct zpool_ops *zpool_ops)
  124. {
  125. return zbud_create_pool(gfp, zpool_ops ? &zbud_zpool_ops : NULL);
  126. }
  127. static void zbud_zpool_destroy(void *pool)
  128. {
  129. zbud_destroy_pool(pool);
  130. }
  131. static int zbud_zpool_malloc(void *pool, size_t size, gfp_t gfp,
  132. unsigned long *handle)
  133. {
  134. return zbud_alloc(pool, size, gfp, handle);
  135. }
  136. static void zbud_zpool_free(void *pool, unsigned long handle)
  137. {
  138. zbud_free(pool, handle);
  139. }
  140. static int zbud_zpool_shrink(void *pool, unsigned int pages,
  141. unsigned int *reclaimed)
  142. {
  143. unsigned int total = 0;
  144. int ret = -EINVAL;
  145. while (total < pages) {
  146. ret = zbud_reclaim_page(pool, 8);
  147. if (ret < 0)
  148. break;
  149. total++;
  150. }
  151. if (reclaimed)
  152. *reclaimed = total;
  153. return ret;
  154. }
  155. static void *zbud_zpool_map(void *pool, unsigned long handle,
  156. enum zpool_mapmode mm)
  157. {
  158. return zbud_map(pool, handle);
  159. }
  160. static void zbud_zpool_unmap(void *pool, unsigned long handle)
  161. {
  162. zbud_unmap(pool, handle);
  163. }
  164. static u64 zbud_zpool_total_size(void *pool)
  165. {
  166. return zbud_get_pool_size(pool) * PAGE_SIZE;
  167. }
  168. static struct zpool_driver zbud_zpool_driver = {
  169. .type = "zbud",
  170. .owner = THIS_MODULE,
  171. .create = zbud_zpool_create,
  172. .destroy = zbud_zpool_destroy,
  173. .malloc = zbud_zpool_malloc,
  174. .free = zbud_zpool_free,
  175. .shrink = zbud_zpool_shrink,
  176. .map = zbud_zpool_map,
  177. .unmap = zbud_zpool_unmap,
  178. .total_size = zbud_zpool_total_size,
  179. };
  180. MODULE_ALIAS("zpool-zbud");
  181. #endif /* CONFIG_ZPOOL */
  182. /*****************
  183. * Helpers
  184. *****************/
  185. /* Just to make the code easier to read */
  186. enum buddy {
  187. FIRST,
  188. LAST
  189. };
  190. /* Converts an allocation size in bytes to size in zbud chunks */
  191. static int size_to_chunks(size_t size)
  192. {
  193. return (size + CHUNK_SIZE - 1) >> CHUNK_SHIFT;
  194. }
  195. #define for_each_unbuddied_list(_iter, _begin) \
  196. for ((_iter) = (_begin); (_iter) < NCHUNKS; (_iter)++)
  197. /* Initializes the zbud header of a newly allocated zbud page */
  198. static struct zbud_header *init_zbud_page(struct page *page)
  199. {
  200. struct zbud_header *zhdr = page_address(page);
  201. zhdr->first_chunks = 0;
  202. zhdr->last_chunks = 0;
  203. INIT_LIST_HEAD(&zhdr->buddy);
  204. INIT_LIST_HEAD(&zhdr->lru);
  205. zhdr->under_reclaim = 0;
  206. return zhdr;
  207. }
  208. /* Resets the struct page fields and frees the page */
  209. static void free_zbud_page(struct zbud_header *zhdr)
  210. {
  211. __free_page(virt_to_page(zhdr));
  212. }
  213. /*
  214. * Encodes the handle of a particular buddy within a zbud page
  215. * Pool lock should be held as this function accesses first|last_chunks
  216. */
  217. static unsigned long encode_handle(struct zbud_header *zhdr, enum buddy bud)
  218. {
  219. unsigned long handle;
  220. /*
  221. * For now, the encoded handle is actually just the pointer to the data
  222. * but this might not always be the case. A little information hiding.
  223. * Add CHUNK_SIZE to the handle if it is the first allocation to jump
  224. * over the zbud header in the first chunk.
  225. */
  226. handle = (unsigned long)zhdr;
  227. if (bud == FIRST)
  228. /* skip over zbud header */
  229. handle += ZHDR_SIZE_ALIGNED;
  230. else /* bud == LAST */
  231. handle += PAGE_SIZE - (zhdr->last_chunks << CHUNK_SHIFT);
  232. return handle;
  233. }
  234. /* Returns the zbud page where a given handle is stored */
  235. static struct zbud_header *handle_to_zbud_header(unsigned long handle)
  236. {
  237. return (struct zbud_header *)(handle & PAGE_MASK);
  238. }
  239. /* Returns the number of free chunks in a zbud page */
  240. static int num_free_chunks(struct zbud_header *zhdr)
  241. {
  242. /*
  243. * Rather than branch for different situations, just use the fact that
  244. * free buddies have a length of zero to simplify everything.
  245. */
  246. return NCHUNKS - zhdr->first_chunks - zhdr->last_chunks;
  247. }
  248. /*****************
  249. * API Functions
  250. *****************/
  251. /**
  252. * zbud_create_pool() - create a new zbud pool
  253. * @gfp: gfp flags when allocating the zbud pool structure
  254. * @ops: user-defined operations for the zbud pool
  255. *
  256. * Return: pointer to the new zbud pool or NULL if the metadata allocation
  257. * failed.
  258. */
  259. struct zbud_pool *zbud_create_pool(gfp_t gfp, struct zbud_ops *ops)
  260. {
  261. struct zbud_pool *pool;
  262. int i;
  263. pool = kmalloc(sizeof(struct zbud_pool), gfp);
  264. if (!pool)
  265. return NULL;
  266. spin_lock_init(&pool->lock);
  267. for_each_unbuddied_list(i, 0)
  268. INIT_LIST_HEAD(&pool->unbuddied[i]);
  269. INIT_LIST_HEAD(&pool->buddied);
  270. INIT_LIST_HEAD(&pool->lru);
  271. pool->pages_nr = 0;
  272. pool->ops = ops;
  273. return pool;
  274. }
  275. /**
  276. * zbud_destroy_pool() - destroys an existing zbud pool
  277. * @pool: the zbud pool to be destroyed
  278. *
  279. * The pool should be emptied before this function is called.
  280. */
  281. void zbud_destroy_pool(struct zbud_pool *pool)
  282. {
  283. kfree(pool);
  284. }
  285. /**
  286. * zbud_alloc() - allocates a region of a given size
  287. * @pool: zbud pool from which to allocate
  288. * @size: size in bytes of the desired allocation
  289. * @gfp: gfp flags used if the pool needs to grow
  290. * @handle: handle of the new allocation
  291. *
  292. * This function will attempt to find a free region in the pool large enough to
  293. * satisfy the allocation request. A search of the unbuddied lists is
  294. * performed first. If no suitable free region is found, then a new page is
  295. * allocated and added to the pool to satisfy the request.
  296. *
  297. * gfp should not set __GFP_HIGHMEM as highmem pages cannot be used
  298. * as zbud pool pages.
  299. *
  300. * Return: 0 if success and handle is set, otherwise -EINVAL if the size or
  301. * gfp arguments are invalid or -ENOMEM if the pool was unable to allocate
  302. * a new page.
  303. */
  304. int zbud_alloc(struct zbud_pool *pool, size_t size, gfp_t gfp,
  305. unsigned long *handle)
  306. {
  307. int chunks, i, freechunks;
  308. struct zbud_header *zhdr = NULL;
  309. enum buddy bud;
  310. struct page *page;
  311. if (!size || (gfp & __GFP_HIGHMEM))
  312. return -EINVAL;
  313. if (size > PAGE_SIZE - ZHDR_SIZE_ALIGNED - CHUNK_SIZE)
  314. return -ENOSPC;
  315. chunks = size_to_chunks(size);
  316. spin_lock(&pool->lock);
  317. /* First, try to find an unbuddied zbud page. */
  318. zhdr = NULL;
  319. for_each_unbuddied_list(i, chunks) {
  320. if (!list_empty(&pool->unbuddied[i])) {
  321. zhdr = list_first_entry(&pool->unbuddied[i],
  322. struct zbud_header, buddy);
  323. list_del(&zhdr->buddy);
  324. if (zhdr->first_chunks == 0)
  325. bud = FIRST;
  326. else
  327. bud = LAST;
  328. goto found;
  329. }
  330. }
  331. /* Couldn't find unbuddied zbud page, create new one */
  332. spin_unlock(&pool->lock);
  333. page = alloc_page(gfp);
  334. if (!page)
  335. return -ENOMEM;
  336. spin_lock(&pool->lock);
  337. pool->pages_nr++;
  338. zhdr = init_zbud_page(page);
  339. bud = FIRST;
  340. found:
  341. if (bud == FIRST)
  342. zhdr->first_chunks = chunks;
  343. else
  344. zhdr->last_chunks = chunks;
  345. if (zhdr->first_chunks == 0 || zhdr->last_chunks == 0) {
  346. /* Add to unbuddied list */
  347. freechunks = num_free_chunks(zhdr);
  348. list_add(&zhdr->buddy, &pool->unbuddied[freechunks]);
  349. } else {
  350. /* Add to buddied list */
  351. list_add(&zhdr->buddy, &pool->buddied);
  352. }
  353. /* Add/move zbud page to beginning of LRU */
  354. if (!list_empty(&zhdr->lru))
  355. list_del(&zhdr->lru);
  356. list_add(&zhdr->lru, &pool->lru);
  357. *handle = encode_handle(zhdr, bud);
  358. spin_unlock(&pool->lock);
  359. return 0;
  360. }
  361. /**
  362. * zbud_free() - frees the allocation associated with the given handle
  363. * @pool: pool in which the allocation resided
  364. * @handle: handle associated with the allocation returned by zbud_alloc()
  365. *
  366. * In the case that the zbud page in which the allocation resides is under
  367. * reclaim, as indicated by the PG_reclaim flag being set, this function
  368. * only sets the first|last_chunks to 0. The page is actually freed
  369. * once both buddies are evicted (see zbud_reclaim_page() below).
  370. */
  371. void zbud_free(struct zbud_pool *pool, unsigned long handle)
  372. {
  373. struct zbud_header *zhdr;
  374. int freechunks;
  375. spin_lock(&pool->lock);
  376. zhdr = handle_to_zbud_header(handle);
  377. /* If first buddy, handle will be page aligned */
  378. if ((handle - ZHDR_SIZE_ALIGNED) & ~PAGE_MASK)
  379. zhdr->last_chunks = 0;
  380. else
  381. zhdr->first_chunks = 0;
  382. if (zhdr->under_reclaim) {
  383. /* zbud page is under reclaim, reclaim will free */
  384. spin_unlock(&pool->lock);
  385. return;
  386. }
  387. /* Remove from existing buddy list */
  388. list_del(&zhdr->buddy);
  389. if (zhdr->first_chunks == 0 && zhdr->last_chunks == 0) {
  390. /* zbud page is empty, free */
  391. list_del(&zhdr->lru);
  392. free_zbud_page(zhdr);
  393. pool->pages_nr--;
  394. } else {
  395. /* Add to unbuddied list */
  396. freechunks = num_free_chunks(zhdr);
  397. list_add(&zhdr->buddy, &pool->unbuddied[freechunks]);
  398. }
  399. spin_unlock(&pool->lock);
  400. }
  401. #define list_tail_entry(ptr, type, member) \
  402. list_entry((ptr)->prev, type, member)
  403. /**
  404. * zbud_reclaim_page() - evicts allocations from a pool page and frees it
  405. * @pool: pool from which a page will attempt to be evicted
  406. * @retires: number of pages on the LRU list for which eviction will
  407. * be attempted before failing
  408. *
  409. * zbud reclaim is different from normal system reclaim in that the reclaim is
  410. * done from the bottom, up. This is because only the bottom layer, zbud, has
  411. * information on how the allocations are organized within each zbud page. This
  412. * has the potential to create interesting locking situations between zbud and
  413. * the user, however.
  414. *
  415. * To avoid these, this is how zbud_reclaim_page() should be called:
  416. * The user detects a page should be reclaimed and calls zbud_reclaim_page().
  417. * zbud_reclaim_page() will remove a zbud page from the pool LRU list and call
  418. * the user-defined eviction handler with the pool and handle as arguments.
  419. *
  420. * If the handle can not be evicted, the eviction handler should return
  421. * non-zero. zbud_reclaim_page() will add the zbud page back to the
  422. * appropriate list and try the next zbud page on the LRU up to
  423. * a user defined number of retries.
  424. *
  425. * If the handle is successfully evicted, the eviction handler should
  426. * return 0 _and_ should have called zbud_free() on the handle. zbud_free()
  427. * contains logic to delay freeing the page if the page is under reclaim,
  428. * as indicated by the setting of the PG_reclaim flag on the underlying page.
  429. *
  430. * If all buddies in the zbud page are successfully evicted, then the
  431. * zbud page can be freed.
  432. *
  433. * Returns: 0 if page is successfully freed, otherwise -EINVAL if there are
  434. * no pages to evict or an eviction handler is not registered, -EAGAIN if
  435. * the retry limit was hit.
  436. */
  437. int zbud_reclaim_page(struct zbud_pool *pool, unsigned int retries)
  438. {
  439. int i, ret, freechunks;
  440. struct zbud_header *zhdr;
  441. unsigned long first_handle = 0, last_handle = 0;
  442. spin_lock(&pool->lock);
  443. if (!pool->ops || !pool->ops->evict || list_empty(&pool->lru) ||
  444. retries == 0) {
  445. spin_unlock(&pool->lock);
  446. return -EINVAL;
  447. }
  448. for (i = 0; i < retries; i++) {
  449. zhdr = list_tail_entry(&pool->lru, struct zbud_header, lru);
  450. list_del(&zhdr->lru);
  451. list_del(&zhdr->buddy);
  452. /* Protect zbud page against free */
  453. zhdr->under_reclaim = true;
  454. /*
  455. * We need encode the handles before unlocking, since we can
  456. * race with free that will set (first|last)_chunks to 0
  457. */
  458. first_handle = 0;
  459. last_handle = 0;
  460. if (zhdr->first_chunks)
  461. first_handle = encode_handle(zhdr, FIRST);
  462. if (zhdr->last_chunks)
  463. last_handle = encode_handle(zhdr, LAST);
  464. spin_unlock(&pool->lock);
  465. /* Issue the eviction callback(s) */
  466. if (first_handle) {
  467. ret = pool->ops->evict(pool, first_handle);
  468. if (ret)
  469. goto next;
  470. }
  471. if (last_handle) {
  472. ret = pool->ops->evict(pool, last_handle);
  473. if (ret)
  474. goto next;
  475. }
  476. next:
  477. spin_lock(&pool->lock);
  478. zhdr->under_reclaim = false;
  479. if (zhdr->first_chunks == 0 && zhdr->last_chunks == 0) {
  480. /*
  481. * Both buddies are now free, free the zbud page and
  482. * return success.
  483. */
  484. free_zbud_page(zhdr);
  485. pool->pages_nr--;
  486. spin_unlock(&pool->lock);
  487. return 0;
  488. } else if (zhdr->first_chunks == 0 ||
  489. zhdr->last_chunks == 0) {
  490. /* add to unbuddied list */
  491. freechunks = num_free_chunks(zhdr);
  492. list_add(&zhdr->buddy, &pool->unbuddied[freechunks]);
  493. } else {
  494. /* add to buddied list */
  495. list_add(&zhdr->buddy, &pool->buddied);
  496. }
  497. /* add to beginning of LRU */
  498. list_add(&zhdr->lru, &pool->lru);
  499. }
  500. spin_unlock(&pool->lock);
  501. return -EAGAIN;
  502. }
  503. /**
  504. * zbud_map() - maps the allocation associated with the given handle
  505. * @pool: pool in which the allocation resides
  506. * @handle: handle associated with the allocation to be mapped
  507. *
  508. * While trivial for zbud, the mapping functions for others allocators
  509. * implementing this allocation API could have more complex information encoded
  510. * in the handle and could create temporary mappings to make the data
  511. * accessible to the user.
  512. *
  513. * Returns: a pointer to the mapped allocation
  514. */
  515. void *zbud_map(struct zbud_pool *pool, unsigned long handle)
  516. {
  517. return (void *)(handle);
  518. }
  519. /**
  520. * zbud_unmap() - maps the allocation associated with the given handle
  521. * @pool: pool in which the allocation resides
  522. * @handle: handle associated with the allocation to be unmapped
  523. */
  524. void zbud_unmap(struct zbud_pool *pool, unsigned long handle)
  525. {
  526. }
  527. /**
  528. * zbud_get_pool_size() - gets the zbud pool size in pages
  529. * @pool: pool whose size is being queried
  530. *
  531. * Returns: size in pages of the given pool. The pool lock need not be
  532. * taken to access pages_nr.
  533. */
  534. u64 zbud_get_pool_size(struct zbud_pool *pool)
  535. {
  536. return pool->pages_nr;
  537. }
  538. static int __init init_zbud(void)
  539. {
  540. /* Make sure the zbud header will fit in one chunk */
  541. BUILD_BUG_ON(sizeof(struct zbud_header) > ZHDR_SIZE_ALIGNED);
  542. pr_info("loaded\n");
  543. #ifdef CONFIG_ZPOOL
  544. zpool_register_driver(&zbud_zpool_driver);
  545. #endif
  546. return 0;
  547. }
  548. static void __exit exit_zbud(void)
  549. {
  550. #ifdef CONFIG_ZPOOL
  551. zpool_unregister_driver(&zbud_zpool_driver);
  552. #endif
  553. pr_info("unloaded\n");
  554. }
  555. module_init(init_zbud);
  556. module_exit(exit_zbud);
  557. MODULE_LICENSE("GPL");
  558. MODULE_AUTHOR("Seth Jennings <sjennings@variantweb.net>");
  559. MODULE_DESCRIPTION("Buddy Allocator for Compressed Pages");