[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.
Showing
Please register or sign in to comment