VFS event hooks in Linux

Richard Gooch rgooch at atnf.csiro.au
Wed Jun 30 07:33:37 GMT 1999


Greg Dickie writes:
> This is REALLY not my area of expertise but I'm sure Jeremy will
> know more about this. IRIX has a thing called a FAM (File alteration
> monitor) which I believe has a similar function to what you are
> looking for. Perhaps you could mimic that mechanism and it would be
> enough?

I've had a look at this, but it basically implies that the kernel has
to keep all "interesting" inodes in its inode cache. In the case of a
subtree, that can be a lot of inodes (because apparently files as well
as directories need to be watched for SMB).

Say I wanted to export my /usr. I've got nearly 24000 inodes there. If
a client was dumb enough to request a ChangeNotify event directly
under /usr, Samba would have to register 24000 inodes with /dev/imon.

Firstly Samba would have to recursively scan /usr finding all inodes,
and register each one with /dev/imon. 1+ syscalls per inode! Then the
kernel would have to cache each inode.

Let's say 128 bytes per inode. We're looking at 3 MiBytes of inode
cache, clagging up RAM. Yuk. I suppose memory is cheap these days, but
still that feels too much to me. The word "scalability" doesn't come
to mind...

				Regards,

					Richard....


More information about the samba-technical mailing list