Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
zbud.h
Go to the documentation of this file.
1 /*
2  * zbud.h
3  *
4  * Copyright (c) 2010-2012, Dan Magenheimer, Oracle Corp.
5  *
6  */
7 
8 #ifndef _ZBUD_H_
9 #define _ZBUD_H_
10 
11 #include "tmem.h"
12 
13 struct zbudref;
14 
15 extern unsigned int zbud_max_buddy_size(void);
16 extern struct zbudref *zbud_match_prep(struct tmem_handle *th, bool eph,
17  void *cdata, unsigned size);
18 extern struct zbudref *zbud_create_prep(struct tmem_handle *th, bool eph,
19  void *cdata, unsigned size,
20  struct page *newpage);
21 extern void zbud_create_finish(struct zbudref *, bool);
22 extern int zbud_decompress(struct page *, struct zbudref *, bool,
23  void (*func)(char *, unsigned int, char *));
24 extern int zbud_copy_from_zbud(char *, struct zbudref *, size_t *, bool);
25 extern int zbud_copy_to_zbud(struct zbudref *, char *, bool);
26 extern struct page *zbud_free_and_delist(struct zbudref *, bool eph,
27  unsigned int *, unsigned int *);
28 extern struct page *zbud_evict_pageframe_lru(unsigned int *, unsigned int *);
29 extern unsigned int zbud_make_zombie_lru(struct tmem_handle *, unsigned char **,
30  unsigned int *, bool);
31 extern void zbud_init(void);
32 
33 #endif /* _ZBUD_H_ */