mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@arcor.de>
To: Anton Altaparmakov <aia21@cantab.net>,
	torvalds@transmeta.com (Linus Torvalds)
Cc: linux-kernel@vger.kernel.org (Linux Kernel),
	viro@math.psu.edu (Alexander Viro)
Subject: Re: [BK-PATCH 1/3] Introduce fs/inode.c::ilookup().
Date: Sun, 8 Sep 2002 19:04:21 +0200	[thread overview]
Message-ID: <E17oGD2-0006lL-00@starship> (raw)
In-Reply-To: <E17ngYk-00025C-00@storm.christs.cam.ac.uk>

On Saturday 07 September 2002 16:27, Anton Altaparmakov wrote:
> The second and third patch have the small disadvantage to the previous
> code in that in the case that ilookup() fails in iget_locked() and
> get_new_inode_fast() is called the inode hash is calculated twice.
> But that is the slow path so I don't think it is a problem.

It doesn't make sense to introduce even this small inefficiency when
all you need to do is wrap an __ilookup inline that takes the hash
list, and is called both from ilookup and iget.  The inline costs
nothing, the hidden inefficiency costs cycles, however few.

Thanks for actually documenting what the functions do in the inline
documentation, it's nice to see such a break from tradition.  One
nano point: it would read better with the functional description
before the ancilliary notes, i.e.:

+ * The inode specified by @ino is looked up in the inode cache and if present
+ * it is returned with an increased reference count.
+ *
+ * This is a fast version of iget5_locked() for file systems where the inode
+ * number is sufficient for unique identification of an inode.

While I'm picking nits, it's more accurate to say that iget5_locked is
a generalized version of iget_locked than that the latter is a fast
version of the former.

And I still like ifind* more than ilookup*.  It's shorter and is a
better match with the existing page cache terminology.  Why add
entropy when you don't have to?

-- 
Daniel

  parent reply	other threads:[~2002-09-09  4:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-07 14:27 Anton Altaparmakov
2002-09-08 16:25 ` Daniel Phillips
2002-09-09  8:51   ` Anton Altaparmakov
2002-09-09 16:04     ` Daniel Phillips
2002-09-08 17:04 ` Daniel Phillips [this message]
2002-09-09  8:59   ` Anton Altaparmakov
2002-09-09 15:55     ` Daniel Phillips

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=E17oGD2-0006lL-00@starship \
    --to=phillips@arcor.de \
    --cc=aia21@cantab.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --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

all inboxes | Powered by JetHome®