From: Luis Chamberlain <mcgrof@kernel.org>
To: Chuck Lever <cel@kernel.org>, Daniel Gomez <da.gomez@kruces.com>,
kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 2/5] mmtests: add monitoring framework integration
Date: Thu, 4 Sep 2025 02:13:18 -0700 [thread overview]
Message-ID: <20250904091322.2499058-3-mcgrof@kernel.org> (raw)
In-Reply-To: <20250904091322.2499058-1-mcgrof@kernel.org>
Add support for the monitoring framework to mmtests workflow, matching
the implementation in fstests. This allows mmtests to leverage all
monitoring capabilities including the new eBPF fragmentation monitoring.
Changes:
- Import monitor_run tasks before test execution
- Import monitor_collect tasks after test completion
- Add monitor-results make target for interim data collection
- Make monitoring results path workflow-aware (fstests vs mmtests)
With these changes, users can simply enable monitoring options in
menuconfig and mmtests will automatically start/stop monitoring
during test execution.
Generated-by: Claude AI
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
.../roles/mmtests/tasks/install-deps/debian/main.yml | 1 +
.../roles/mmtests/tasks/install-deps/redhat/main.yml | 1 +
.../roles/mmtests/tasks/install-deps/suse/main.yml | 1 +
playbooks/roles/mmtests/tasks/main.yaml | 12 ++++++++++++
playbooks/roles/monitoring/tasks/monitor_collect.yml | 11 ++++++++++-
workflows/mmtests/Makefile | 8 ++++++++
6 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/playbooks/roles/mmtests/tasks/install-deps/debian/main.yml b/playbooks/roles/mmtests/tasks/install-deps/debian/main.yml
index 62de1e2a0c3e..7195ea527256 100644
--- a/playbooks/roles/mmtests/tasks/install-deps/debian/main.yml
+++ b/playbooks/roles/mmtests/tasks/install-deps/debian/main.yml
@@ -60,6 +60,7 @@
name:
- trace-cmd
- perf-tools-unstable
+ - python3-bpfcc
state: present
update_cache: true
tags: ["deps"]
diff --git a/playbooks/roles/mmtests/tasks/install-deps/redhat/main.yml b/playbooks/roles/mmtests/tasks/install-deps/redhat/main.yml
index debfb577c906..c62ff09fdde5 100644
--- a/playbooks/roles/mmtests/tasks/install-deps/redhat/main.yml
+++ b/playbooks/roles/mmtests/tasks/install-deps/redhat/main.yml
@@ -52,6 +52,7 @@
- kernel-tools
- trace-cmd
- perf
+ - python3-bcc
state: present
tags: ["deps"]
ignore_errors: true
diff --git a/playbooks/roles/mmtests/tasks/install-deps/suse/main.yml b/playbooks/roles/mmtests/tasks/install-deps/suse/main.yml
index 5a6c2b54c332..e357232d11a2 100644
--- a/playbooks/roles/mmtests/tasks/install-deps/suse/main.yml
+++ b/playbooks/roles/mmtests/tasks/install-deps/suse/main.yml
@@ -52,6 +52,7 @@
- kernel-default-devel
- trace-cmd
- perf
+ - python3-bcc
state: present
tags: ["deps"]
ignore_errors: true
diff --git a/playbooks/roles/mmtests/tasks/main.yaml b/playbooks/roles/mmtests/tasks/main.yaml
index 6e9593662a6b..fd05843f8b2c 100644
--- a/playbooks/roles/mmtests/tasks/main.yaml
+++ b/playbooks/roles/mmtests/tasks/main.yaml
@@ -217,6 +217,12 @@
ansible.builtin.debug:
msg: "Kernel version on {{ inventory_hostname }} : {{ kernel_version.stdout }}"
+# Start monitoring services before running tests
+- ansible.builtin.import_tasks: ../../monitoring/tasks/monitor_run.yml
+ when:
+ - enable_monitoring|default(false)|bool
+ tags: ["run_tests", "monitoring", "monitor_run"]
+
- name: Run mmtests in background
tags: ["run_tests"]
become: true
@@ -239,6 +245,12 @@
retries: 1440 # 12 hours
delay: 60 # check every 60 seconds
+# Collect monitoring data after tests complete
+- ansible.builtin.import_tasks: ../../monitoring/tasks/monitor_collect.yml
+ when:
+ - enable_monitoring|default(false)|bool
+ tags: ["run_tests", "monitoring", "monitor_collect"]
+
- name: Create local results directory
delegate_to: localhost
ansible.builtin.file:
diff --git a/playbooks/roles/monitoring/tasks/monitor_collect.yml b/playbooks/roles/monitoring/tasks/monitor_collect.yml
index f57a4e9d8106..967526b40428 100644
--- a/playbooks/roles/monitoring/tasks/monitor_collect.yml
+++ b/playbooks/roles/monitoring/tasks/monitor_collect.yml
@@ -110,7 +110,16 @@
- name: Set monitoring results path
ansible.builtin.set_fact:
- monitoring_results_path: "{{ monitoring_results_base_path | default(topdir_path + '/workflows/fstests/results/monitoring') }}"
+ monitoring_results_path: >-
+ {%- if monitoring_results_base_path is defined -%}
+ {{ monitoring_results_base_path }}
+ {%- elif kdevops_run_fstests|default(false)|bool -%}
+ {{ topdir_path }}/workflows/fstests/results/monitoring
+ {%- elif kdevops_workflow_enable_mmtests|default(false)|bool -%}
+ {{ topdir_path }}/workflows/mmtests/results/monitoring
+ {%- else -%}
+ {{ topdir_path }}/results/monitoring
+ {%- endif -%}
- name: Create local monitoring results directory
ansible.builtin.file:
diff --git a/workflows/mmtests/Makefile b/workflows/mmtests/Makefile
index 69db9505284d..c6248b95c05c 100644
--- a/workflows/mmtests/Makefile
+++ b/workflows/mmtests/Makefile
@@ -43,6 +43,12 @@ mmtests-compare:
--tags deps,compare \
$(MMTESTS_ARGS)
+monitor-results: $(KDEVOPS_EXTRA_VARS)
+ $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
+ playbooks/monitor-results.yml \
+ --extra-vars=@./extra_vars.yaml \
+ $(MMTESTS_ARGS)
+
mmtests-clean:
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
playbooks/mmtests.yml \
@@ -58,6 +64,7 @@ mmtests-help:
@echo "mmtests-tests : Run mmtests tests"
@echo "mmtests-results : Copy results from guests"
@echo "mmtests-compare : Compare baseline and dev results (AB testing)"
+ @echo "monitor-results : Collect interim monitoring data without stopping monitoring"
@echo "mmtests-clean : Clean up mmtests installation"
@echo ""
@@ -69,6 +76,7 @@ PHONY +: mmtests-dev
PHONY +: mmtests-tests
PHONY +: mmtests-results
PHONY +: mmtests-compare
+PHONY +: monitor-results
PHONY +: mmtests-clean
PHONY +: mmtests-help
.PHONY: $(PHONY)
--
2.45.2
next prev parent reply other threads:[~2025-09-04 9:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 9:13 [PATCH 0/5] add memory fragmentation automation testing Luis Chamberlain
2025-09-04 9:13 ` [PATCH 1/5] monitoring: add memory fragmentation eBPF monitoring support Luis Chamberlain
2025-09-04 9:13 ` Luis Chamberlain [this message]
2025-09-04 9:13 ` [PATCH 3/5] sysbench: add monitoring framework integration Luis Chamberlain
2025-09-04 9:13 ` [PATCH 4/5] ai milvus: add monitoring support Luis Chamberlain
2025-09-04 9:13 ` [PATCH 5/5] minio: " Luis Chamberlain
2025-09-19 3:49 ` [PATCH 0/5] add memory fragmentation automation testing Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250904091322.2499058-3-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=cel@kernel.org \
--cc=da.gomez@kruces.com \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox