From: ebiederm@xmission.com (Eric W. Biederman)
To: Benjamin LaHaise <bcrl@lhnet.ca>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Octavian Purdila <opurdila@ixiacom.com>,
netdev@vger.kernel.org, Cosmin Ratiu <cratiu@ixiacom.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] sysfs directory scaling: rbtree for dirent name lookups
Date: Tue, 03 Nov 2009 02:41:37 -0800 [thread overview]
Message-ID: <m1ocnjdh5q.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20091101163130.GA7911@kvack.org> (Benjamin LaHaise's message of "Sun\, 1 Nov 2009 11\:31\:30 -0500")
Benjamin LaHaise <bcrl@lhnet.ca> writes:
> Use an rbtree in sysfs_dirent to speed up file lookup times
>
> Systems with large numbers (tens of thousands and more) of network
> interfaces stress the sysfs code in ways that make the linear search for
> a name match take far too long. Avoid this by using an rbtree.
Please take a look at the cleanups_scaling branch at:
kernel.org:/pub/scm/linux/kernel/git/ebiederm/linux-2.6.32-rc5-sysfs-enhancements
I haven't spent a lot of time on it but it is possible to get everything
except the rbtree without increasing the size of sysfs_dirent. Also we
don't need the both the rbtree and a linked list.
In particular see:
commit 50623bbb82da3bd1d596b9173a91ed1b5aa168b8
Author: Eric W. Biederman <ebiederm@maxwell.aristanetworks.com>
Date: Sat Oct 31 04:11:18 2009 -0700
sysfs: Sort sysfs directories by name hash.
This is a step in preparation for introducing a more efficient
data structure than a linked list for sysfs entries. By ordering
by name hash instead of by inode sysfs_lookup can be speeded
up as well as allowing restarting after seekdir.
Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Meanwhile back to pushing the most important ones for real.
Eric
prev parent reply other threads:[~2009-11-03 10:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-01 16:31 [PATCH 1/3] sysfs directory scaling: rbtree for dirent name lookups Benjamin LaHaise
2009-11-01 16:32 ` [PATCH 2/3] sysfs directory scaling: doubly linked list for dirents Benjamin LaHaise
2009-11-01 16:33 ` [PATCH 2/3] sysfs directory scaling: count number of children dirs Benjamin LaHaise
2009-11-03 3:50 ` [PATCH 1/3] sysfs directory scaling: rbtree for dirent name lookups Greg KH
2009-11-03 6:14 ` Eric Dumazet
2009-11-03 7:01 ` [PATCH] sysctl: reduce ram usage by 40 % Eric Dumazet
2009-11-03 10:23 ` Eric W. Biederman
2009-11-03 16:07 ` [PATCH 1/3] sysfs directory scaling: rbtree for dirent name lookups Greg KH
2009-11-03 16:38 ` Octavian Purdila
2009-11-03 16:45 ` Benjamin LaHaise
2009-11-03 17:56 ` Greg KH
2009-11-03 22:28 ` Eric W. Biederman
2009-11-03 20:01 ` Benjamin LaHaise
2009-11-03 21:32 ` Eric W. Biederman
2009-11-03 21:43 ` Eric W. Biederman
2009-11-03 21:56 ` Benjamin LaHaise
2009-11-03 22:06 ` Eric Dumazet
2009-11-03 21:52 ` Benjamin LaHaise
2009-11-03 22:18 ` Eric W. Biederman
2009-11-03 10:41 ` Eric W. Biederman [this message]
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=m1ocnjdh5q.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=bcrl@lhnet.ca \
--cc=cratiu@ixiacom.com \
--cc=eric.dumazet@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=opurdila@ixiacom.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 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).