-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rv: Add option for nested monitors and include sched
Monitors describing complex systems, such as the scheduler, can easily grow to the point where they are just hard to understand because of the many possible state transitions. Often it is possible to break such descriptions into smaller monitors, sharing some or all events. Enabling those smaller monitors concurrently is, in fact, testing the system as if we had one single larger monitor. Splitting models into multiple specification is not only easier to understand, but gives some more clues when we see errors. Add the possibility to create container monitors, whose only purpose is to host other nested monitors. Enabling a container monitor enables all nested ones, but it's still possible to enable nested monitors independently. Add the sched monitor as first container, for now empty. Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Juri Lelli <juri.lelli@redhat.com> Link: https://lore.kernel.org/20250305140406.350227-3-gmonaco@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
- Loading branch information
Gabriele Monaco
authored and
Steven Rostedt (Google)
committed
Mar 24, 2025
1 parent
26f8068
commit cb85c66
Showing
11 changed files
with
217 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
# | ||
config RV_MON_SCHED | ||
depends on RV | ||
bool "sched monitor" | ||
help | ||
Collection of monitors to check the scheduler behaves according to specifications. | ||
Enable this to enable all scheduler specification supported by the current kernel. | ||
|
||
For further information, see: | ||
Documentation/trace/rv/monitor_sched.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
#include <linux/kernel.h> | ||
#include <linux/module.h> | ||
#include <linux/init.h> | ||
#include <linux/rv.h> | ||
|
||
#define MODULE_NAME "sched" | ||
|
||
#include "sched.h" | ||
|
||
struct rv_monitor rv_sched; | ||
|
||
struct rv_monitor rv_sched = { | ||
.name = "sched", | ||
.description = "container for several scheduler monitor specifications.", | ||
.enable = NULL, | ||
.disable = NULL, | ||
.reset = NULL, | ||
.enabled = 0, | ||
}; | ||
|
||
static int __init register_sched(void) | ||
{ | ||
rv_register_monitor(&rv_sched, NULL); | ||
return 0; | ||
} | ||
|
||
static void __exit unregister_sched(void) | ||
{ | ||
rv_unregister_monitor(&rv_sched); | ||
} | ||
|
||
module_init(register_sched); | ||
module_exit(unregister_sched); | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Gabriele Monaco <gmonaco@redhat.com>"); | ||
MODULE_DESCRIPTION("sched: container for several scheduler monitor specifications."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
|
||
extern struct rv_monitor rv_sched; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.