mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
tools/sched_ext: scx_userland: fix stale data on restart
Reset all counters, tasks and vruntime_head list on restart. Signed-off-by: David Carlier <devnexen@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
cabd76bbc0
commit
0767684613
1 changed files with 8 additions and 0 deletions
|
|
@ -375,6 +375,14 @@ static void pre_bootstrap(int argc, char **argv)
|
|||
static void bootstrap(char *comm)
|
||||
{
|
||||
exit_req = 0;
|
||||
min_vruntime = 0.0;
|
||||
nr_vruntime_enqueues = 0;
|
||||
nr_vruntime_dispatches = 0;
|
||||
nr_vruntime_failed = 0;
|
||||
nr_curr_enqueued = 0;
|
||||
memset(tasks, 0, pid_max * sizeof(*tasks));
|
||||
LIST_INIT(&vruntime_head);
|
||||
|
||||
skel = SCX_OPS_OPEN(userland_ops, scx_userland);
|
||||
|
||||
skel->rodata->num_possible_cpus = libbpf_num_possible_cpus();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue