Few cleanups and RT updates to sched_debug
cover Few cleanups and RT updates to sched_debug
Hi,
The following 3 patches,
o Modify the names of several fields in the rt_rq, to be consistent with the general naming convention. For eg, s/rt_nr_running/nr_running in the rt_rq, 'rt' being implied by being associated with the rt_rq.
o Initialize rt.nr_running and rt.nr_uninterruptible fields explicitly.
o Update sched_debug to print values of the recently added fields to rt_rq.
Some of these changes are not rt specific. But there are bits which are missing from sched-devel latest, like rt_nr_uniterruptible, which is added by preempt-realtime-sched.patch. I am not sure how to write patches in this scenario. Pl do let me know if I need to generate patch against the git tree instead, wherever possible.
Signature · 5 lines
Regards, Ankita Garg ([email protected]) Linux Technology Center IBM India Systems & Technology Labs, Bangalore, India
PATCH 1/3 Change the names of rt_rq fields for
Hi,
o Modify the names of several fields in the rt_rq, to be consistent with the general naming convention. For eg, s/rt_nr_running/nr_running in the rt_rq, 'rt' being implied by being associated with the rt_rq.
kernel/sched.c +3 -3
@@ -319,9 +319,9 @@struct rt_prio_array active;int rt_load_balance_idx;struct list_head *rt_load_balance_head, *rt_load_balance_curr; -unsigned long rt_nr_running; -unsigned long rt_nr_migratory; -unsigned long rt_nr_uninterruptible; +unsigned long nr_running; +unsigned long nr_migratory; +unsigned long nr_uninterruptible;/* highest queued rt task prio */ int highest_prio;int overloaded;
kernel/sched_debug.c +2 -2
@@ -188,8 +188,8 @@P (cpu_load[4 ]);#ifdef CONFIG_PREEMPT_RT /* Print rt related rq stats */ -P (rt.rt_nr_running); -P (rt.rt_nr_uninterruptible); +P (rt.nr_running); +P (rt.nr_uninterruptible);# ifdef CONFIG_SCHEDSTATS P (rto_schedule);P (rto_schedule_tail);
kernel/sched_rt.c +21 -21
137 lines not on this page · raw message
Signature · 5 lines
Regards, Ankita Garg ([email protected]) Linux Technology Center IBM India Systems & Technology Labs, Bangalore, India
PATCH 2/3 Initialize rt.nr_running & rt.nr_unterruptible
In reply to Ankita GargHi,
o Initialize rt.nr_running and rt.nr_uninterruptible fields explicitly.
kernel/sched.c +2 -0
@@ -7333,6 +7333,8 @@ rq->cpu = i; rq->migration_thread =NULL ;INIT_LIST_HEAD (&rq->migration_queue); + rq->rt.nr_running =0 ; + rq->rt.nr_uninterruptible =0 ; rq->rt.highest_prio =MAX_RT_PRIO ; rq->rt.overloaded =0 ;rq_attach_root (rq, &def_root_domain);
Signature · 5 lines
Regards, Ankita Garg ([email protected]) Linux Technology Center IBM India Systems & Technology Labs, Bangalore, India
PATCH 3/3 Update sched_debug with new RT related stats
In reply to Ankita GargHi,
o Update sched_debug to print values of the recently added fields to rt_rq.
kernel/sched_debug.c +4 -0
@@ -188,8 +188,12 @@P (cpu_load[4 ]);#ifdef CONFIG_PREEMPT_RT /* Print rt related rq stats */ +SEQ_printf (m,"\nrt_rq\n" );P (rt.nr_running);P (rt.nr_uninterruptible); +P (rt.nr_migratory); +P (rt.highest_prio); +P (rt.overloaded);# ifdef CONFIG_SCHEDSTATS P (rto_schedule);P (rto_schedule_tail);
Signature · 5 lines
Regards, Ankita Garg ([email protected]) Linux Technology Center IBM India Systems & Technology Labs, Bangalore, India