Re: Eureka! (was Re: UTF-8 and case-insensitivity)

tridge
2004-02-20T01:03:17Z

Linus,

> That said, who actually _uses_ dnotify? The only time dnotify seems to
> come up in discussions is when people complain how badly designed it is,
> and I don't think I've ever heard anybody say that they use it and
> that they liked it ;)

This may not be the example you want, but Samba uses it and it is
absolutely vital to good performance.

The common situation is this:

- 1000 windows drones sitting in an office with their windows
explorer windows open on their home directory on the server, but
not doing any real work.

- all those windows boxes ask the Samba server "let me know when the
directory changes so I can refresh this window that nobody is
looking at anyway"

- before we had dnotify samba had to continuously poll all those
directories, looking for a change in a checksum of the directory
contents. We had tunable parameters for how often to poll, whether
to poll etc, but basically it sucked, because windows users with
nothing better to do ask "why doesn't it behave just like NT"

- now samba just watches for dnotify events

The other situation where it really sucked was for windows developers
using visual C. The builtin make-like system in that braindead tool
actually got compilations wrong if the file server didn't tell it that
a file in its directory had changed. It would say "nothing to do" when
you do a build and we hadn't polled recently enough. Cue the angry
windows developers and people screaming to put a real NT box in
instead of Samba.

So dnotify has been a huge bonus for Samba, I just wish a few more
non-Samba tools would use it so it doesn't run the risk of being
removed because only Samba cares. It sucks being the ugly duckling,
and knowing that nobody is ever going to tell you you're really a
swan :)

Cheers, Tridge