From: Chunsheng Luo <luochunsheng@ustc.edu>
To: williams@redhat.com, wander@redhat.com
Cc: linux-rt-users@vger.kernel.org, debarbos@redhat.com,
jkacur@redhat.com, luochunsheng@ustc.edu,
luffyluo <luffyluo@tencent.com>
Subject: [PATCH] Fix typo: rename 'merge_taks_info' to 'merge_tasks_info'
Date: Tue, 18 Nov 2025 19:31:53 +0800 [thread overview]
Message-ID: <20251118113202.16-1-luochunsheng@ustc.edu> (raw)
From: luffyluo <luffyluo@tencent.com>
---
.claude/CLAUDE.md | 6 +++---
src/queue_track.c | 2 +-
src/sched_debug.c | 2 +-
src/stalld.c | 2 +-
src/stalld.h | 2 +-
tests/TODO.md | 2 +-
tests/functional/test_task_merging.sh | 4 ++--
7 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md
index 718b704..2cd84ba 100644
--- a/.claude/CLAUDE.md
+++ b/.claude/CLAUDE.md
@@ -73,7 +73,7 @@ stalld/
- Entry point: `main()` at line 1121
- Boosting logic: `boost_with_deadline()`, `boost_with_fifo()` (lines 438-563)
- Threading modes: `single_threaded_main()`, `conservative_main()`, `aggressive_main()`
-- Task merging: `merge_taks_info()` preserves starvation timestamps (lines 370-397)
+- Task merging: `merge_tasks_info()` preserves starvation timestamps (lines 370-397)
**src/utils.c** - Utilities
- Command-line parsing: `parse_args()`
@@ -311,7 +311,7 @@ Tests use `parse_test_options()` from `test_helpers.sh` to handle backend and th
**Known Issues:**
- **queue_track backend limitation**: BPF backend cannot detect SCHED_FIFO tasks waiting on runqueue due to `task_running()` check in `stalld.bpf.c:273` only tracking `__state == TASK_RUNNING`. Tests using `starvation_gen` (SCHED_FIFO workloads) pass on sched_debug but fail on queue_track.
-- **Segfault fix**: Fixed critical bug in `merge_taks_info()` that caused crashes in adaptive/aggressive modes (commit 7af4f55a5765)
+- **Segfault fix**: Fixed critical bug in `merge_tasks_info()` that caused crashes in adaptive/aggressive modes (commit 7af4f55a5765)
🔄 **Phase 4 Planned** (Advanced Features):
- Threading modes (adaptive vs aggressive)
@@ -521,7 +521,7 @@ Check: `/proc/sys/kernel/sched_rt_runtime_us` should be `-1`.
## Important Code Patterns
### Task Merging (src/stalld.c:370-397)
-When re-parsing tasks, `merge_taks_info()` preserves starvation timestamps for tasks that haven't made progress (same PID, same context switch count).
+When re-parsing tasks, `merge_tasks_info()` preserves starvation timestamps for tasks that haven't made progress (same PID, same context switch count).
### Denylist/Ignore Feature
- `-i` flag: Ignore threads/processes matching regex patterns
diff --git a/src/queue_track.c b/src/queue_track.c
index dbae1b1..167e8ce 100644
--- a/src/queue_track.c
+++ b/src/queue_track.c
@@ -190,7 +190,7 @@ static int queue_track_parse(struct cpu_info *cpu_info, char *buffer, size_t buf
cpu_info->nr_waiting_tasks = nr_running - 1;
if (old_tasks) {
- merge_taks_info(cpu_info->id, old_tasks, nr_old_tasks, cpu_info->starving, cpu_info->nr_waiting_tasks);
+ merge_tasks_info(cpu_info->id, old_tasks, nr_old_tasks, cpu_info->starving, cpu_info->nr_waiting_tasks);
free(old_tasks);
}
diff --git a/src/sched_debug.c b/src/sched_debug.c
index 102a4e0..3754b56 100644
--- a/src/sched_debug.c
+++ b/src/sched_debug.c
@@ -594,7 +594,7 @@ static int sched_debug_parse(struct cpu_info *cpu_info, char *buffer, size_t buf
cpu_info->nr_waiting_tasks = fill_waiting_task(cpu_buffer, cpu_info);
if (old_tasks) {
- merge_taks_info(cpu_info->id, old_tasks, nr_old_tasks, cpu_info->starving, cpu_info->nr_waiting_tasks);
+ merge_tasks_info(cpu_info->id, old_tasks, nr_old_tasks, cpu_info->starving, cpu_info->nr_waiting_tasks);
free(old_tasks);
}
diff --git a/src/stalld.c b/src/stalld.c
index 854e76d..b9372db 100644
--- a/src/stalld.c
+++ b/src/stalld.c
@@ -377,7 +377,7 @@ void update_cpu_starving_vector(int cpu, const struct task_info *task)
}
}
-void merge_taks_info(int cpu, struct task_info *old_tasks, int nr_old, struct task_info *new_tasks, int nr_new)
+void merge_tasks_info(int cpu, struct task_info *old_tasks, int nr_old, struct task_info *new_tasks, int nr_new)
{
static const struct task_info notask = {};
diff --git a/src/stalld.h b/src/stalld.h
index fd219bc..706e3ef 100644
--- a/src/stalld.h
+++ b/src/stalld.h
@@ -205,7 +205,7 @@ void cleanup_regex(unsigned int *nr_task, regex_t **compiled_expr);
void find_sched_debug_path(void);
int set_reservation(int period, int reservation);
int get_tgid(int pid);
-void merge_taks_info(int cpu, struct task_info *old_tasks, int nr_old, struct task_info *new_tasks, int nr_new);
+void merge_tasks_info(int cpu, struct task_info *old_tasks, int nr_old, struct task_info *new_tasks, int nr_new);
int set_cpu_affinity(char *cpu_list);
int check_dl_server_dir_exists(void);
diff --git a/tests/TODO.md b/tests/TODO.md
index 57a7a16..a872254 100644
--- a/tests/TODO.md
+++ b/tests/TODO.md
@@ -624,7 +624,7 @@ Follow test_boost_period.sh and test_starvation_threshold.sh rewrites:
### 2025-10-13 - Critical Segfault Fix and Backend Limitation Documentation
- **Fixed critical segfault in adaptive/aggressive modes**
- - **Root cause**: `merge_taks_info()` unconditionally called `update_cpu_starving_vector()` at line 389
+ - **Root cause**: `merge_tasks_info()` unconditionally called `update_cpu_starving_vector()` at line 389
- **Problem**: `cpu_starving_vector` only allocated in `single_threaded_main()` (line 1007)
- **Impact**: Adaptive/aggressive modes crashed when parsing tasks (any backend)
- **Fix**: Added `if (config_single_threaded)` guards before both `update_cpu_starving_vector()` calls
diff --git a/tests/functional/test_task_merging.sh b/tests/functional/test_task_merging.sh
index daa3eab..053c648 100755
--- a/tests/functional/test_task_merging.sh
+++ b/tests/functional/test_task_merging.sh
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Test: Task Merging Logic
-# Verify stalld's merge_taks_info() correctly preserves starvation timestamps
+# Verify stalld's merge_tasks_info() correctly preserves starvation timestamps
# for tasks that make no progress (same PID + same context switches)
#
# Copyright (C) 2025 Red Hat Inc
@@ -362,7 +362,7 @@ log ""
log "=========================================="
log "Test Summary"
log "=========================================="
-log "Task merging function: merge_taks_info() in stalld.c:370-397"
+log "Task merging function: merge_tasks_info() in stalld.c:370-397"
log "Merge logic: if (PID == PID && ctxsw == ctxsw) preserve timestamp"
log ""
log "Total failures: ${TEST_FAILED}"
--
2.41.0
reply other threads:[~2025-11-18 11:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20251118113202.16-1-luochunsheng@ustc.edu \
--to=luochunsheng@ustc.edu \
--cc=debarbos@redhat.com \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=luffyluo@tencent.com \
--cc=wander@redhat.com \
--cc=williams@redhat.com \
/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