From: Matt Mackall <mpm@selenic.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, viro@parcelfarce.linux.theplanet.co.uk
Subject: Re: [PATCH] unified device list allocator
Date: Mon, 7 Mar 2005 22:01:29 -0800 [thread overview]
Message-ID: <20050308060128.GJ3120@waste.org> (raw)
In-Reply-To: <20050307213302.560de053.akpm@osdl.org>
On Mon, Mar 07, 2005 at 09:33:02PM -0800, Andrew Morton wrote:
> Matt Mackall <mpm@selenic.com> wrote:
> >
> > + /* search for insertion point in reverse for dynamic allocation */
> > + list_for_each_prev(l, list) {
>
> hrmph. Any time we do anything in O(n) time, some smarty comes along with
> a workload which blows us out of the water. Although it's hard to think of
> any register_blkdev()-intensive workloads.
>
> It's not possible to do this with prio-trees?
I thought about using rbtrees. But I decided it was overkill. Beyond
the 4k limit of the current proc code, currently that's limited to
~256 entries per block/char and will be limited to about ~1024 each
for the foreseeable future. It's only walked on driver init/exit and
when catting said proc file (where O(n) is unavoidable). In other
words, worst case we're talking less than a millisecond at
boot/shutdown.
--
Mathematics is the supreme nostalgia of our time.
prev parent reply other threads:[~2005-03-08 6:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-08 5:18 [PATCH] unified device list allocator Matt Mackall
2005-03-08 5:33 ` Andrew Morton
2005-03-08 5:43 ` Christoph Hellwig
2005-03-08 5:50 ` Andrew Morton
2005-03-08 5:56 ` Christoph Hellwig
2005-03-08 6:11 ` Matt Mackall
2005-03-08 6:31 ` Christoph Hellwig
2005-03-08 6:35 ` Matt Mackall
2005-03-08 6:01 ` Matt Mackall [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=20050308060128.GJ3120@waste.org \
--to=mpm@selenic.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/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