]> git.hungrycats.org Git - linux/commit
[PATCH] Improve sget() performance
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Thu, 2 Oct 2003 00:38:22 +0000 (17:38 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Thu, 2 Oct 2003 00:38:22 +0000 (17:38 -0700)
commitd549b9abf815265d18a83f75942135acddefd060
treefa48d675ca6e9ca38b864e2eaaec7ee8ac0b7a3a
parent1c21abfbcfc6172ad7caed28abf06f7929809723
[PATCH] Improve sget() performance

sget() is pessimistic and assumes it won't find a superblock - and as a
result it always pre-allocates a new one before even searching for an
existing entry.  If it finds an existing one, it free's the extra one it
just allocated.

Especially with /proc usage it usually _does_ find an existing
superblock, so this is all extra work.  It should allocate a new one
only if it couldn't find an old one (and re-search).

The same way as iget() does it.
fs/super.c