|
@@ -130,10 +130,8 @@ static void torture_lock_busted_write_delay(struct torture_random_state *trsp)
|
|
if (!(torture_random(trsp) %
|
|
if (!(torture_random(trsp) %
|
|
(cxt.nrealwriters_stress * 2000 * longdelay_ms)))
|
|
(cxt.nrealwriters_stress * 2000 * longdelay_ms)))
|
|
mdelay(longdelay_ms);
|
|
mdelay(longdelay_ms);
|
|
-#ifdef CONFIG_PREEMPT
|
|
|
|
if (!(torture_random(trsp) % (cxt.nrealwriters_stress * 20000)))
|
|
if (!(torture_random(trsp) % (cxt.nrealwriters_stress * 20000)))
|
|
- preempt_schedule(); /* Allow test to be preempted. */
|
|
|
|
-#endif
|
|
|
|
|
|
+ torture_preempt_schedule(); /* Allow test to be preempted. */
|
|
}
|
|
}
|
|
|
|
|
|
static void torture_lock_busted_write_unlock(void)
|
|
static void torture_lock_busted_write_unlock(void)
|
|
@@ -179,10 +177,8 @@ static void torture_spin_lock_write_delay(struct torture_random_state *trsp)
|
|
if (!(torture_random(trsp) %
|
|
if (!(torture_random(trsp) %
|
|
(cxt.nrealwriters_stress * 2 * shortdelay_us)))
|
|
(cxt.nrealwriters_stress * 2 * shortdelay_us)))
|
|
udelay(shortdelay_us);
|
|
udelay(shortdelay_us);
|
|
-#ifdef CONFIG_PREEMPT
|
|
|
|
if (!(torture_random(trsp) % (cxt.nrealwriters_stress * 20000)))
|
|
if (!(torture_random(trsp) % (cxt.nrealwriters_stress * 20000)))
|
|
- preempt_schedule(); /* Allow test to be preempted. */
|
|
|
|
-#endif
|
|
|
|
|
|
+ torture_preempt_schedule(); /* Allow test to be preempted. */
|
|
}
|
|
}
|
|
|
|
|
|
static void torture_spin_lock_write_unlock(void) __releases(torture_spinlock)
|
|
static void torture_spin_lock_write_unlock(void) __releases(torture_spinlock)
|
|
@@ -352,10 +348,8 @@ static void torture_mutex_delay(struct torture_random_state *trsp)
|
|
mdelay(longdelay_ms * 5);
|
|
mdelay(longdelay_ms * 5);
|
|
else
|
|
else
|
|
mdelay(longdelay_ms / 5);
|
|
mdelay(longdelay_ms / 5);
|
|
-#ifdef CONFIG_PREEMPT
|
|
|
|
if (!(torture_random(trsp) % (cxt.nrealwriters_stress * 20000)))
|
|
if (!(torture_random(trsp) % (cxt.nrealwriters_stress * 20000)))
|
|
- preempt_schedule(); /* Allow test to be preempted. */
|
|
|
|
-#endif
|
|
|
|
|
|
+ torture_preempt_schedule(); /* Allow test to be preempted. */
|
|
}
|
|
}
|
|
|
|
|
|
static void torture_mutex_unlock(void) __releases(torture_mutex)
|
|
static void torture_mutex_unlock(void) __releases(torture_mutex)
|
|
@@ -507,10 +501,8 @@ static void torture_rtmutex_delay(struct torture_random_state *trsp)
|
|
if (!(torture_random(trsp) %
|
|
if (!(torture_random(trsp) %
|
|
(cxt.nrealwriters_stress * 2 * shortdelay_us)))
|
|
(cxt.nrealwriters_stress * 2 * shortdelay_us)))
|
|
udelay(shortdelay_us);
|
|
udelay(shortdelay_us);
|
|
-#ifdef CONFIG_PREEMPT
|
|
|
|
if (!(torture_random(trsp) % (cxt.nrealwriters_stress * 20000)))
|
|
if (!(torture_random(trsp) % (cxt.nrealwriters_stress * 20000)))
|
|
- preempt_schedule(); /* Allow test to be preempted. */
|
|
|
|
-#endif
|
|
|
|
|
|
+ torture_preempt_schedule(); /* Allow test to be preempted. */
|
|
}
|
|
}
|
|
|
|
|
|
static void torture_rtmutex_unlock(void) __releases(torture_rtmutex)
|
|
static void torture_rtmutex_unlock(void) __releases(torture_rtmutex)
|
|
@@ -547,10 +539,8 @@ static void torture_rwsem_write_delay(struct torture_random_state *trsp)
|
|
mdelay(longdelay_ms * 10);
|
|
mdelay(longdelay_ms * 10);
|
|
else
|
|
else
|
|
mdelay(longdelay_ms / 10);
|
|
mdelay(longdelay_ms / 10);
|
|
-#ifdef CONFIG_PREEMPT
|
|
|
|
if (!(torture_random(trsp) % (cxt.nrealwriters_stress * 20000)))
|
|
if (!(torture_random(trsp) % (cxt.nrealwriters_stress * 20000)))
|
|
- preempt_schedule(); /* Allow test to be preempted. */
|
|
|
|
-#endif
|
|
|
|
|
|
+ torture_preempt_schedule(); /* Allow test to be preempted. */
|
|
}
|
|
}
|
|
|
|
|
|
static void torture_rwsem_up_write(void) __releases(torture_rwsem)
|
|
static void torture_rwsem_up_write(void) __releases(torture_rwsem)
|
|
@@ -574,10 +564,8 @@ static void torture_rwsem_read_delay(struct torture_random_state *trsp)
|
|
mdelay(longdelay_ms * 2);
|
|
mdelay(longdelay_ms * 2);
|
|
else
|
|
else
|
|
mdelay(longdelay_ms / 2);
|
|
mdelay(longdelay_ms / 2);
|
|
-#ifdef CONFIG_PREEMPT
|
|
|
|
if (!(torture_random(trsp) % (cxt.nrealreaders_stress * 20000)))
|
|
if (!(torture_random(trsp) % (cxt.nrealreaders_stress * 20000)))
|
|
- preempt_schedule(); /* Allow test to be preempted. */
|
|
|
|
-#endif
|
|
|
|
|
|
+ torture_preempt_schedule(); /* Allow test to be preempted. */
|
|
}
|
|
}
|
|
|
|
|
|
static void torture_rwsem_up_read(void) __releases(torture_rwsem)
|
|
static void torture_rwsem_up_read(void) __releases(torture_rwsem)
|