lkml.org 
[lkml]   [2012]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] splitting cgroup.c
Hello,

On Thu, Jan 19, 2012 at 10:13:59AM +0800, Li Zefan wrote:
> While working on cgroup xattr, it appeared to me it's better to
> create a cgroup_xattr.c instead of stuffing things into cgroup.c.
>
> Then I took a look at how big it is.
>
> $ ls -l -S kernel/*.c
> -rw-rw-r-- 1 lizf lizf 142717 Jan 18 10:15 cgroup.c
> -rw-rw-r-- 1 lizf lizf 106498 Jan 18 10:15 workqueue.c
> -rw-rw-r-- 1 lizf lizf 105206 Jan 18 10:15 lockdep.c
> -rw-rw-r-- 1 lizf lizf 91321 Jan 18 10:16 module.c
>
> $ wc -l kernel/*.c | sort -n -r
> 90397 total
> 5289 cgroup.c
> 4206 lockdep.c
> 3840 workqueue.c
> 3507 module.c

Yeah, cgroup.c one giant file.

> So I think for the sake of readability and maintainability, we'd
> better split cgroup.c into smaller pieces:

I agree that splitting is necessary but IMHO splitting usually tends
to go too far. Maybe we can split it into two and think about further
splitting later on? e.g. internal logic vs. userland interfacing.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2012-01-19 03:27    [W:0.098 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site