diff --git a/mm/swap_ratio.c b/mm/swap_ratio.c index c5355545fc4b..bfff30864b6c 100644 --- a/mm/swap_ratio.c +++ b/mm/swap_ratio.c @@ -17,8 +17,9 @@ #define SWAP_RATIO_GROUP_START (SWAP_FLAG_PRIO_MASK - 9) /* 32758 */ #define SWAP_RATIO_GROUP_END (SWAP_FLAG_PRIO_MASK) /* 32767 */ -#define SWAP_FAST_WRITES (SWAPFILE_CLUSTER * (SWAP_CLUSTER_MAX / 8)) -#define SWAP_SLOW_WRITES SWAPFILE_CLUSTER +#define SWAP_FAST_WRITES \ + ((SWAPFILE_CLUSTER * (SWAP_CLUSTER_MAX / 8)) / SWAP_BATCH) +#define SWAP_SLOW_WRITES (SWAPFILE_CLUSTER / SWAP_BATCH) /* * The fast/slow swap write ratio.