diff options
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r-- | include/linux/swap.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index cd28ad206dae..7cee73ef4f15 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -28,7 +28,14 @@ static inline int current_is_kswapd(void) | |||
28 | * the type/offset into the pte as 5/27 as well. | 28 | * the type/offset into the pte as 5/27 as well. |
29 | */ | 29 | */ |
30 | #define MAX_SWAPFILES_SHIFT 5 | 30 | #define MAX_SWAPFILES_SHIFT 5 |
31 | #ifndef CONFIG_MIGRATION | ||
31 | #define MAX_SWAPFILES (1 << MAX_SWAPFILES_SHIFT) | 32 | #define MAX_SWAPFILES (1 << MAX_SWAPFILES_SHIFT) |
33 | #else | ||
34 | /* Use last two entries for page migration swap entries */ | ||
35 | #define MAX_SWAPFILES ((1 << MAX_SWAPFILES_SHIFT)-2) | ||
36 | #define SWP_MIGRATION_READ MAX_SWAPFILES | ||
37 | #define SWP_MIGRATION_WRITE (MAX_SWAPFILES + 1) | ||
38 | #endif | ||
32 | 39 | ||
33 | /* | 40 | /* |
34 | * Magic header for a swap area. The first part of the union is | 41 | * Magic header for a swap area. The first part of the union is |