Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Branch HEAD
[fs/lustre-release.git]
/
libcfs
/
include
/
libcfs
/
linux
/
linux-mem.h
diff --git
a/libcfs/include/libcfs/linux/linux-mem.h
b/libcfs/include/libcfs/linux/linux-mem.h
index
19dec15
..
8fb2184
100644
(file)
--- a/
libcfs/include/libcfs/linux/linux-mem.h
+++ b/
libcfs/include/libcfs/linux/linux-mem.h
@@
-110,6
+110,10
@@
extern void __cfs_free_pages(cfs_page_t *page, unsigned int order);
#define __cfs_free_page(page) __cfs_free_pages(page, 0)
#define cfs_free_page(p) __free_pages(p, 0)
#define __cfs_free_page(page) __cfs_free_pages(page, 0)
#define cfs_free_page(p) __free_pages(p, 0)
+#define libcfs_memory_pressure_get() (current->flags & PF_MEMALLOC)
+#define libcfs_memory_pressure_set() do { current->flags |= PF_MEMALLOC; } while (0)
+#define libcfs_memory_pressure_clr() do { current->flags &= ~PF_MEMALLOC; } while (0)
+
/*
* In Linux there is no way to determine whether current execution context is
* blockable.
/*
* In Linux there is no way to determine whether current execution context is
* blockable.