From: "H. Peter Anvin" <hpa@transmeta.com>
To: Alexander Viro <viro@math.psu.edu>
Cc: Pavel Machek <pavel@suse.cz>,
Bill Crawford <billc@netcomuk.co.uk>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Daniel Phillips <phillips@innominate.de>
Subject: Re: Hashing and directories
Date: Thu, 01 Mar 2001 13:05:08 -0800 [thread overview]
Message-ID: <3A9EB984.C1F7E499@transmeta.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0103011547200.11577-100000@weyl.math.psu.edu>
Alexander Viro wrote:
> >
> > Yes -- because their workaround kernel slowness.
>
> Pavel, I'm afraid that you are missing the point. Several, actually:
> * limits of _human_ capability to deal with large unstructured
> sets of objects
Not an issue if you're a machine.
> * userland issues (what, you thought that limits on the
> command size will go away?)
Last I checked, the command line size limit wasn't a userland issue, but
rather a limit of the kernel exec(). This might have changed.
> * portability
> The point being: applications and users _do_ know better what structure
> is there. Kernel can try to second-guess them and be real good at that, but
> inability to second-guess is the last of the reasons why aforementioned
> strategies are used.
However, there are issues where users and applications don't want to
structure their namespace for the convenience of the kernel, for good or
bad reasons. There are structures which are known to produce vastly
better performance even in the not-very-uncommon cases, although of
course they provide dramatic improvements in the extreme. I personally
happen to like the hash-indexed B-tree because of their extremely high
fanout and because they don't impose any penalty in the other extreme (if
your directory is small enough to fit in a single block, you skip the
B-tree and have the linear non-hash leaf node only) but there are other
structures which work as well.
I don't see there being any fundamental reason to not do such an
improvement, except the one Alan Cox mentioned -- crash recovery --
(which I think can be dealt with; in my example above as long as the leaf
nodes can get recovered, the tree can be rebuilt. Consider starting each
leaf node block with a magic and a pointer to its home inode; combined
with a leaf node block count in the home inode, that should be quite
robust.) It would be particularly nice to implement this more as an
enhancement to ext3 than ext2, even though the issue is orthogonal, since
ext3 should add a layer of inherent integrity protection.
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
next prev parent reply other threads:[~2001-03-01 21:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-22 23:08 Hashing and directories Bill Crawford
2000-01-01 2:02 ` Pavel Machek
2001-03-01 20:54 ` Alexander Viro
2001-03-01 21:05 ` H. Peter Anvin [this message]
2001-03-01 21:13 ` Alexander Viro
2001-03-01 21:24 ` H. Peter Anvin
2001-03-02 9:04 ` Pavel Machek
2001-03-02 12:01 ` Oystein Viggen
2001-03-02 12:26 ` Tobias Ringstrom
2001-03-02 12:58 ` David Weinehall
2001-03-02 19:33 ` Tim Wright
2001-03-12 10:05 ` Herbert Xu
2001-03-12 10:43 ` Xavier Bestel
2001-03-01 21:23 ` Andreas Dilger
2001-03-01 21:26 ` Bill Crawford
2001-03-01 21:05 ` Tigran Aivazian
2001-03-02 8:56 ` Pavel Machek
2001-03-07 0:37 ` Jamie Lokier
2001-03-07 4:03 ` Linus Torvalds
2001-03-07 13:41 ` Jamie Lokier
2001-03-02 9:00 ` Pavel Machek
2001-03-03 0:03 ` Bill Crawford
2001-03-08 12:42 ` Goswin Brederlow
2001-04-27 16:20 ` Daniel Phillips
2001-02-22 23:22 ` H. Peter Anvin
2001-02-22 23:54 ` Bill Crawford
2001-03-10 11:22 ` Kai Henningsen
-- strict thread matches above, loose matches on Subject: below --
2001-03-07 15:56 Manfred Spraul
2001-03-07 16:10 ` Jamie Lokier
2001-03-07 16:23 ` Manfred Spraul
2001-03-07 18:21 ` Linus Torvalds
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=3A9EB984.C1F7E499@transmeta.com \
--to=hpa@transmeta.com \
--cc=billc@netcomuk.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
--cc=phillips@innominate.de \
--cc=viro@math.psu.edu \
/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