Linux Container Development
 help / color / mirror / Atom feed
* Re: [PATCH] cgroup: Fix indent for /proc/cgroups
       [not found] ` <4A4DBBC2.8010805-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
@ 2009-07-03  8:20   ` Li Zefan
  0 siblings, 0 replies; 4+ messages in thread
From: Li Zefan @ 2009-07-03  8:20 UTC (permalink / raw)
  To: Gui Jianfeng
  Cc: Linux Containers, Paul Menage,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

CC: container list

Gui Jianfeng wrote:
> Currently, /proc/cgroups outputs is fairly ugly as following,
> #subsys_name    hierarchy       num_cgroups     enabled
> cpuset  0       1       1
> debug   0       1       1
> ns      0       1       1
> 
> indent it in a good-looking way.
> #subsys_name    hierarchy       num_cgroups     enabled
> cpuset          0               1               1
> debug           0               1               1
> ns              0               1               1
> 

But if there's a subsystem with name length >= 8,
it won't be aligned properly..

> 
> Signed-off-by: Gui Jianfeng <guijianfeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
> ---
>  kernel/cgroup.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index 3737a68..99fc160 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -2963,7 +2963,7 @@ static int proc_cgroupstats_show(struct seq_file *m, void *v)
>  	mutex_lock(&cgroup_mutex);
>  	for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
>  		struct cgroup_subsys *ss = subsys[i];
> -		seq_printf(m, "%s\t%lu\t%d\t%d\n",
> +		seq_printf(m, "%s\t\t%lu\t\t%d\t\t%d\n",
>  			   ss->name, ss->root->subsys_bits,
>  			   ss->root->number_of_cgroups, !ss->disabled);
>  	}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cgroup: Fix indent for /proc/cgroups
       [not found]   ` <4A4DBF50.8090408-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
@ 2009-07-03  8:37     ` Gui Jianfeng
  0 siblings, 0 replies; 4+ messages in thread
From: Gui Jianfeng @ 2009-07-03  8:37 UTC (permalink / raw)
  To: Li Zefan; +Cc: Linux Containers, Paul Menage,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Li Zefan wrote:
> CC: container list
> 
> Gui Jianfeng wrote:
>> Currently, /proc/cgroups outputs is fairly ugly as following,
>> #subsys_name    hierarchy       num_cgroups     enabled
>> cpuset  0       1       1
>> debug   0       1       1
>> ns      0       1       1
>>
>> indent it in a good-looking way.
>> #subsys_name    hierarchy       num_cgroups     enabled
>> cpuset          0               1               1
>> debug           0               1               1
>> ns              0               1               1
>>
> 
> But if there's a subsystem with name length >= 8,
> it won't be aligned properly..

  Yeap, but there isn't such a case at least by now.

> 
>> Signed-off-by: Gui Jianfeng <guijianfeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
>> ---
>>  kernel/cgroup.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
>> index 3737a68..99fc160 100644
>> --- a/kernel/cgroup.c
>> +++ b/kernel/cgroup.c
>> @@ -2963,7 +2963,7 @@ static int proc_cgroupstats_show(struct seq_file *m, void *v)
>>  	mutex_lock(&cgroup_mutex);
>>  	for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
>>  		struct cgroup_subsys *ss = subsys[i];
>> -		seq_printf(m, "%s\t%lu\t%d\t%d\n",
>> +		seq_printf(m, "%s\t\t%lu\t\t%d\t\t%d\n",
>>  			   ss->name, ss->root->subsys_bits,
>>  			   ss->root->number_of_cgroups, !ss->disabled);
>>  	}
> 
> 
> 
> 

-- 
Regards
Gui Jianfeng

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cgroup: Fix indent for /proc/cgroups
       [not found]     ` <4A4DC358.7030900-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
@ 2009-07-03  8:43       ` Li Zefan
  0 siblings, 0 replies; 4+ messages in thread
From: Li Zefan @ 2009-07-03  8:43 UTC (permalink / raw)
  To: Gui Jianfeng
  Cc: Linux Containers, Paul Menage,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Gui Jianfeng wrote:
> Li Zefan wrote:
>> CC: container list
>>
>> Gui Jianfeng wrote:
>>> Currently, /proc/cgroups outputs is fairly ugly as following,
>>> #subsys_name    hierarchy       num_cgroups     enabled
>>> cpuset  0       1       1
>>> debug   0       1       1
>>> ns      0       1       1
>>>
>>> indent it in a good-looking way.
>>> #subsys_name    hierarchy       num_cgroups     enabled
>>> cpuset          0               1               1
>>> debug           0               1               1
>>> ns              0               1               1
>>>
>> But if there's a subsystem with name length >= 8,
>> it won't be aligned properly..
> 
>   Yeap, but there isn't such a case at least by now.
> 

This is not a good reason.

We'll probably have such a subsystem. Actually there's a
proposed subsystem named "maxdepth" which is of length 8.

See:
http://lkml.org/lkml/2009/7/1/581

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cgroup: Fix indent for /proc/cgroups
       [not found]       ` <4A4DC4CF.4020808-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
@ 2009-07-03  9:00         ` Gui Jianfeng
  0 siblings, 0 replies; 4+ messages in thread
From: Gui Jianfeng @ 2009-07-03  9:00 UTC (permalink / raw)
  To: Li Zefan; +Cc: Linux Containers, Paul Menage,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Li Zefan wrote:
> Gui Jianfeng wrote:
>> Li Zefan wrote:
>>> CC: container list
>>>
>>> Gui Jianfeng wrote:
>>>> Currently, /proc/cgroups outputs is fairly ugly as following,
>>>> #subsys_name    hierarchy       num_cgroups     enabled
>>>> cpuset  0       1       1
>>>> debug   0       1       1
>>>> ns      0       1       1
>>>>
>>>> indent it in a good-looking way.
>>>> #subsys_name    hierarchy       num_cgroups     enabled
>>>> cpuset          0               1               1
>>>> debug           0               1               1
>>>> ns              0               1               1
>>>>
>>> But if there's a subsystem with name length >= 8,
>>> it won't be aligned properly..
>>   Yeap, but there isn't such a case at least by now.
>>
> 
> This is not a good reason.
> 
> We'll probably have such a subsystem. Actually there's a
> proposed subsystem named "maxdepth" which is of length 8.
> 
> See:
> http://lkml.org/lkml/2009/7/1/581

  yes, this is a case. But at least others can be aligned 
  properly, right? Anyway, please ignore it if you don't
  like this change.

> 
> 
> 
> 

-- 
Regards
Gui Jianfeng

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-03  9:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4A4DBBC2.8010805@cn.fujitsu.com>
     [not found] ` <4A4DBBC2.8010805-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-07-03  8:20   ` [PATCH] cgroup: Fix indent for /proc/cgroups Li Zefan
     [not found] ` <4A4DBF50.8090408@cn.fujitsu.com>
     [not found]   ` <4A4DBF50.8090408-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-07-03  8:37     ` Gui Jianfeng
     [not found]   ` <4A4DC358.7030900@cn.fujitsu.com>
     [not found]     ` <4A4DC358.7030900-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-07-03  8:43       ` Li Zefan
     [not found]     ` <4A4DC4CF.4020808@cn.fujitsu.com>
     [not found]       ` <4A4DC4CF.4020808-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-07-03  9:00         ` Gui Jianfeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox