Re: [PATCH] cgroup: don't show pid list on tasks/procs in ascending order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/15/2013 02:34 PM, Serge Hallyn wrote:
> Quoting Jeff Liu (jeff.liu@xxxxxxxxxx):
>> On 01/15/2013 02:25 PM, Serge Hallyn wrote:
>>> Quoting Jeff Liu (jeff.liu@xxxxxxxxxx):
>>>> Hello,
>>>>
>>>> Currently, the pid list shown on cgroup->procs & tasks is in ascending order.  However, this list is not
>>>> guaranteed to be sorted according to the following records mentioned at Documentation/cgroups/cgroups.txt.
>>>>
>>>>  - tasks: list of tasks (by PID) attached to that cgroup.  This list
>>>>    is not guaranteed to be sorted. 
>>>>  - cgroup.procs: list of thread group IDs in the cgroup.  This list is
>>>>    not guaranteed to be sorted or free of duplicate TGIDs, and userspace
>>>>    should sort/uniquify the list if this property is required.
>>>>
>>>> This patch remove the sorting function to make the default behavior of pid list be consistent with
>>>> the document.
> 
> ...
> 
> I've gotta say, as someone who tends to play with those files by hand, I
> don't mind not having to type | sort | uniq every time.

I did this for two reasons, one is for the documents, another is per
Cgroup TODO list from Tejun -- https://lkml.org/lkml/2012/9/13/542

. Misc issues

  * Sort & unique when listing tasks.  Even the documentation says it
    doesn't happen but we have a good hunk of code doing it in
    cgroup.c.  I'm gonna rip it out at some point.  Again, if you
    don't like it, scream.

So that we can clean out around 70-lines source code as well as shrink
the cgroup.o a bit.

Thanks,
-Jeff
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux