* [PATCH -mm 0/3] cgroup: use hash table for css_set
@ 2008-04-02 2:16 Li Zefan
0 siblings, 0 replies; 2+ messages in thread
From: Li Zefan @ 2008-04-02 2:16 UTC (permalink / raw)
To: Andrew Morton; +Cc: Paul Menage, LKML, containers
When we attach a process to a different cgroup, the css_set linked-list
will be run through to find a suitable existing css_set to use. This
patch set uses a hash table for better performance.
As we add the hash table, we can totally remove the css_set linked-list.
When we have to run through the linked-list, we can run through the
hash table instead.
I tested the following benmarks:
For N in 1, 5, 10, 50, 100, 500, 1000, create N cgroups with one sleeping
task in each, and then move an additional task through each cgroup in
turn.
Here is a test result:
N Loop orig - Time(s) hash - Time(s)
----------------------------------------------
1 10000 1.201231728 1.196311177
5 2000 1.065743872 1.040566424
10 1000 0.991054735 0.986876440
50 200 0.976554203 0.969608733
100 100 0.998504680 0.969218270
500 20 1.157347764 0.962602963
1000 10 1.619521852 1.085140172
Those patches are based on 2.6.25-rc5-mm1.
Regards,
Li Zefan
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH -mm 0/3] cgroup: use hash table for css_set
@ 2008-04-03 5:52 Li Zefan
0 siblings, 0 replies; 2+ messages in thread
From: Li Zefan @ 2008-04-03 5:52 UTC (permalink / raw)
To: Andrew Morton; +Cc: Paul Menage, LKML, containers
(rebase on 2.6.25-rc8-mm1)
hen we attach a process to a different cgroup, the css_set linked-list
will be run through to find a suitable existing css_set to use. This
patch set uses a hash table for better performance.
As we add the hash table, we can totally remove the css_set linked-list.
When we have to run through the linked-list, we can run through the
hash table instead.
I tested the following benmarks:
For N in 1, 5, 10, 50, 100, 500, 1000, create N cgroups with one sleeping
task in each, and then move an additional task through each cgroup in
turn.
Here is a test result:
N Loop orig - Time(s) hash - Time(s)
----------------------------------------------
1 10000 1.201231728 1.196311177
5 2000 1.065743872 1.040566424
10 1000 0.991054735 0.986876440
50 200 0.976554203 0.969608733
100 100 0.998504680 0.969218270
500 20 1.157347764 0.962602963
1000 10 1.619521852 1.085140172
Regards,
Li Zefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-03 5:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-03 5:52 [PATCH -mm 0/3] cgroup: use hash table for css_set Li Zefan
-- strict thread matches above, loose matches on Subject: below --
2008-04-02 2:16 Li Zefan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).