----- Original Message -----
>
> Now, your patch adds signficant complexity to the runq handling code
> and to its future maintainability. I'm wondering whether your patch
> can be modified such that the task_group info would only be displayed
> via a new flag, let's say "runq -g". It seems that there has been
> considerable churn in the kernel code in this area, and it worries me
> that this patch will potentially and unnecessarily cause the breakage
> of the simple display of the queued tasks.
>
Currently, rt_rq is displayed hierarchically, while the cfs_rq is displayed
like that. So I made the first patch to make tasks in cfs_rq displayed
hierarchically so that we could see which task belongs to which cfs_rq
easily, just like rt_rq.
The second patch is used to display tasks in throttled cfs_rqs/rt_rqs.
To display tasks in throttled cfs_rqs/rt_rqs is easy, but to display them
sorted in the current runqueue is kind of difficult, so the patch2 looks
complex. I think I will implement the patch2 by two ways, one is just the fix
version of the current patch2, the other is to use the new flag '-g'.
You can decide which one to apply.
The attachment is the patch1.
The latest patch1 seems to test OK, although your change to dump_task_runq_entry()
that removes the leading spaces breaks the output format of "runq -d". But
adding
an INDENT(5) to dump_on_rq_tasks() fixes that.
My suggestion re: a new -g flag would have it applicable to both CFS and RT
run queues (even though the RT groups are currently being shown). I was
thinking that it might be safest to have "runq" (with no argument) to just
display a simple list of tasks, and only show group information with -g.
Are you suggesting that -g would only apply to throttled cfs_rqs/rt_rqs?
Dave