[Crash-utility] [PATCH] runq: make tasks in throttled cfs_rqs/rt_rqs displayed

zhangyanfei zhangyanfei at cn.fujitsu.com
Thu Nov 1 06:06:18 UTC 2012


于 2012年10月30日 03:05, Dave Anderson 写道:
> 
> 
> ----- 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?  
> 

nop, '-g' is ok to show all rqs with group information.

I rewrote the patch by adding option '-g' to runq and not changing any behaviour of
the runq (with no argument).

TODO:
1. The help info about the -g option.

I still have a suggestion: when we dump cfs_rq, we don't dump it hierarchically,
but for the current rt_rq, we dump it hierarchically with group info. So could I
make another patch to remove the rt_rq hierarchy, just make it displayed identical
with cfs_rq display.(For -g will display group info for both rt_rq and cfs_rq)

Thanks
Zhang
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-add-g-option-for-runq.patch
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20121101/8ccd7f54/attachment.ksh>


More information about the Crash-utility mailing list