ia64/xen-unstable

diff tools/libxc/xc_private.h @ 14114:59b8d5168cc1

Reduce impact of saving/restoring/dumping large domains on Dom0 memory
usage by means of fadvise64() to tell the OS to discard the cache
pages used for the save/dump file.

Signed-off-by: Simon Graham <Simon.Graham@stratus.com>
author Keir Fraser <keir@xensource.com>
date Sat Feb 24 14:48:17 2007 +0000 (2007-02-24)
parents cd532c9351fc
children d66dff09338a
line diff
     1.1 --- a/tools/libxc/xc_private.h	Sat Feb 24 14:33:34 2007 +0000
     1.2 +++ b/tools/libxc/xc_private.h	Sat Feb 24 14:48:17 2007 +0000
     1.3 @@ -41,6 +41,13 @@
     1.4  #define INFO     1
     1.5  #define PROGRESS 0
     1.6  
     1.7 +/*
     1.8 +** Define max dirty page cache to permit during save/restore -- need to balance 
     1.9 +** keeping cache usage down with CPU impact of invalidating too often.
    1.10 +** (Currently 16MB)
    1.11 +*/
    1.12 +#define MAX_PAGECACHE_USAGE (4*1024)
    1.13 +
    1.14  #if INFO
    1.15  #define IPRINTF(_f, _a...) printf(_f , ## _a)
    1.16  #else
    1.17 @@ -158,4 +165,7 @@ int xc_waitdomain_core(int xc_handle, in
    1.18  void bitmap_64_to_byte(uint8_t *bp, const uint64_t *lp, int nbits);
    1.19  void bitmap_byte_to_64(uint64_t *lp, const uint8_t *bp, int nbits);
    1.20  
    1.21 +/* Optionally flush file to disk and discard page cache */
    1.22 +int discard_file_cache(int fd, int flush);
    1.23 +
    1.24  #endif /* __XC_PRIVATE_H__ */