Gabriele Monaco
fbe6c09b7e
rv: Add scpd, snep and sncid per-cpu monitors
...
Add 3 per-cpu monitors as part of the sched model:
* scpd: schedule called with preemption disabled
Monitor to ensure schedule is called with preemption disabled
* snep: schedule does not enable preempt
Monitor to ensure schedule does not enable preempt
* sncid: schedule not called with interrupt disabled
Monitor to ensure schedule is not called with interrupt disabled
To: Ingo Molnar <[email protected] >
To: Peter Zijlstra <[email protected] >
Cc: Juri Lelli <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: John Kacur <[email protected] >
Cc: Clark Williams <[email protected] >
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Gabriele Monaco <[email protected] >
Signed-off-by: Steven Rostedt (Google) <[email protected] >
2025-03-24 17:27:39 -04:00
Gabriele Monaco
93bac9cf35
rv: Add snroc per-task monitor
...
Add a per-task monitor as part of the sched model:
* snroc: set non runnable on its own context
Monitor to ensure set_state happens only in the respective task's context
To: Ingo Molnar <[email protected] >
To: Peter Zijlstra <[email protected] >
Cc: Juri Lelli <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: John Kacur <[email protected] >
Cc: Clark Williams <[email protected] >
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Gabriele Monaco <[email protected] >
Signed-off-by: Steven Rostedt (Google) <[email protected] >
2025-03-24 17:27:39 -04:00
Gabriele Monaco
9fd420abc4
rv: Add sco and tss per-cpu monitors
...
Add 2 per-cpu monitors as part of the sched model:
* sco: scheduling context operations
Monitor to ensure sched_set_state happens only in thread context
* tss: task switch while scheduling
Monitor to ensure sched_switch happens only in scheduling context
To: Ingo Molnar <[email protected] >
To: Peter Zijlstra <[email protected] >
Cc: Juri Lelli <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: John Kacur <[email protected] >
Cc: Clark Williams <[email protected] >
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Gabriele Monaco <[email protected] >
Signed-off-by: Steven Rostedt (Google) <[email protected] >
2025-03-24 17:27:39 -04:00
Daniel Bristot de Oliveira
ccc319dcb4
rv/monitor: Add the wwnr monitor
...
Per task wakeup while not running (wwnr) monitor.
This model is broken, the reason is that a task can be running in the
processor without being set as RUNNABLE. Think about a task about to
sleep:
1: set_current_state(TASK_UNINTERRUPTIBLE);
2: schedule();
And then imagine an IRQ happening in between the lines one and two,
waking the task up. BOOM, the wakeup will happen while the task is
running.
Q: Why do we need this model, so?
A: To test the reactors.
Link: https://lkml.kernel.org/r/473c0fc39967250fdebcff8b620311c11dccad30.1659052063.git.bristot@kernel.org
Cc: Wim Van Sebroeck <[email protected] >
Cc: Guenter Roeck <[email protected] >
Cc: Jonathan Corbet <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Thomas Gleixner <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Will Deacon <[email protected] >
Cc: Catalin Marinas <[email protected] >
Cc: Marco Elver <[email protected] >
Cc: Dmitry Vyukov <[email protected] >
Cc: "Paul E. McKenney" <[email protected] >
Cc: Shuah Khan <[email protected] >
Cc: Gabriele Paoloni <[email protected] >
Cc: Juri Lelli <[email protected] >
Cc: Clark Williams <[email protected] >
Cc: Tao Zhou <[email protected] >
Cc: Randy Dunlap <[email protected] >
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Daniel Bristot de Oliveira <[email protected] >
Signed-off-by: Steven Rostedt (Google) <[email protected] >
2022-07-30 14:01:30 -04:00
Daniel Bristot de Oliveira
10bde81c74
rv/monitor: Add the wip monitor
...
The wakeup in preemptive (wip) monitor verifies if the
wakeup events always take place with preemption disabled:
|
|
v
#==================#
H preemptive H <+
#==================# |
| |
| preempt_disable | preempt_enable
v |
sched_waking +------------------+ |
+--------------- | | |
| | non_preemptive | |
+--------------> | | -+
+------------------+
The wakeup event always takes place with preemption disabled because
of the scheduler synchronization. However, because the preempt_count
and its trace event are not atomic with regard to interrupts, some
inconsistencies might happen.
The documentation illustrates one of these cases.
Link: https://lkml.kernel.org/r/c98ca678df81115fddc04921b3c79720c836b18f.1659052063.git.bristot@kernel.org
Cc: Wim Van Sebroeck <[email protected] >
Cc: Guenter Roeck <[email protected] >
Cc: Jonathan Corbet <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Thomas Gleixner <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Will Deacon <[email protected] >
Cc: Catalin Marinas <[email protected] >
Cc: Marco Elver <[email protected] >
Cc: Dmitry Vyukov <[email protected] >
Cc: "Paul E. McKenney" <[email protected] >
Cc: Shuah Khan <[email protected] >
Cc: Gabriele Paoloni <[email protected] >
Cc: Juri Lelli <[email protected] >
Cc: Clark Williams <[email protected] >
Cc: Tao Zhou <[email protected] >
Cc: Randy Dunlap <[email protected] >
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Daniel Bristot de Oliveira <[email protected] >
Signed-off-by: Steven Rostedt (Google) <[email protected] >
2022-07-30 14:01:30 -04:00