|
|
Log in / Subscribe / Register

Dealing with negative dentries

Dealing with negative dentries

Posted May 10, 2022 17:26 UTC (Tue) by brenns10 (subscriber, #112114)
In reply to: Dealing with negative dentries by nickodell
Parent article: Dealing with negative dentries

I remember reading this bug report and thinking that this was one of the crazier systems. I don't love the idea of timing operations to determine whether something is local or remote: ideally we should provide an API to provide the required info and then try to make every operation fast enough to appear as if it's local :P . But I suppose craziness is in the eye of the beholder :)

> But it's easy to see why the NSS developers started looking up nonexistent files - it solved a pressing performance problem in a cross-platform way that looked to be nearly free. It seems like negative dentries are something of an attractive nuisance - easy to misuse without knowing the performance costs.

You're 100% right though. Userspace shouldn't need to know or care what a dentry is, or worry about the cache pollution they cause. The kernel needs to be smart enough to weed out these useless negative dentries.


to post comments

Dealing with negative dentries

Posted May 10, 2022 18:57 UTC (Tue) by nickodell (subscriber, #125165) [Link]

>I don't love the idea of timing operations to determine whether something is local or remote: ideally we should provide an API to provide the required info and then try to make every operation fast enough to appear as if it's local :P

They don't care about whether the directory is local or remote, exactly - they care about whether it's fast or slow. In principle, you could have a really fast network filesystem, and then NSS wouldn't bother with the workaround.

>But I suppose craziness is in the eye of the beholder :)

Haha, exactly.

-----

By the way, thanks for hosting this session, and posting the initial patch. I thought it was a really smart and fast heuristic.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds