From: Li Zefan <lizf@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Paul Menage <menage@google.com>,
LKML <linux-kernel@vger.kernel.org>,
containers@lists.linux-foundation.org
Subject: [PATCH -mm 0/3] cgroup: use hash table for css_set
Date: Wed, 02 Apr 2008 10:16:39 +0800 [thread overview]
Message-ID: <47F2EC87.30205@cn.fujitsu.com> (raw)
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
next reply other threads:[~2008-04-02 2:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-02 2:16 Li Zefan [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-04-03 5:52 [PATCH -mm 0/3] cgroup: use hash table for css_set Li Zefan
2008-04-03 5:52 Li Zefan
2008-04-02 2:16 Li Zefan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47F2EC87.30205@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.