Re: Eureka! (was Re: UTF-8 and case-insensitivity)
From: David Lang
Date: Thu Feb 19 2004 - 17:25:55 EST
surfacing from normal lurk mode.
it looks to me like this could also end up allowing pruning lots of the
existing negative dcache entries.
if you fully cache the directory (and set the new flag) then any lookup
that isn't found is known to not exist.
is it worth freeing the negative dcache entries when you set the flag to
say that you have things fully cached? if so this could end up being a
significant memory savings.
David Lang
On Thu, 19 Feb 2004, Linus Torvalds wrote:
> Date: Thu, 19 Feb 2004 13:53:43 -0800 (PST)
> From: Linus Torvalds <torvalds@xxxxxxxx>
> To: viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Cc: Tridge <tridge@xxxxxxxxx>, Jamie Lokier <jamie@xxxxxxxxxxxxx>,
> H. Peter Anvin <hpa@xxxxxxxxx>,
> Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>
> Subject: Re: Eureka! (was Re: UTF-8 and case-insensitivity)
>
>
>
> On Thu, 19 Feb 2004 viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
> >
> > On Thu, Feb 19, 2004 at 01:45:32PM -0800, Linus Torvalds wrote:
> > > So we'd see very quickly if these tentative dentries were to escape
> > > outside of __d_lookup().
> >
> > Ahem... You'll see them (at least) in dcache pruning codepaths. And
> > those will dereference inodes...
>
> Yea, you be right. Many of those paths would not need to care about
> TENTATIVE at all, so using the d_inode thing would make them uglier, I
> agree. Maybe the flag is better after all (and it really should be pretty
> well contained by just checking all __d_lookup callers, so it should be
> hard to get it wrong, but maybe I've forgotten some path).
>
> We could do it both ways - do the TENTATIVE_INODE thing as a debugging
> thing at first to make sure none of these dentries escape, and then remove
> it (and the unnecessary tests in the pruning paths) once everybody is
> convinced that it is working correctly.
>
> Linus
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/