@@ -137,9 +137,13 @@ module_param(log_stats, int, 0644);
/*
* Once a memory pressure is detected, keep aggressive shrinking of the free
- * page pools for this time (msec)
+ * page pools for this time (milliseconds)
*/
-#define AGGRESSIVE_SHRINKING_DURATION 1
+static int xen_blkif_aggressive_shrinking_duration = 1;
+module_param_named(aggressive_shrinking_duration,
+ xen_blkif_aggressive_shrinking_duration, int, 0644);
+MODULE_PARM_DESC(aggressive_shrinking_duration,
+"Duration to do aggressive shrinking when a memory pressure is detected");
static unsigned long xen_blk_mem_pressure_end;
@@ -147,7 +151,7 @@ static unsigned long blkif_shrink_count(struct shrinker *shrinker,
struct shrink_control *sc)
{
xen_blk_mem_pressure_end = jiffies +
- msecs_to_jiffies(AGGRESSIVE_SHRINKING_DURATION);
+ msecs_to_jiffies(xen_blkif_aggressive_shrinking_duration);
return 0;
}