Re: Filesystem hints to storage

From: James Bottomley
Date: Mon Jul 26 2010 - 11:40:26 EST


On Thu, 2010-07-22 at 20:45 +0100, Alan Cox wrote:
> > I think there are some hints that are hard for the filesystem to know
> > itself, never mind pass down, so it'd be good to remove them to reduce
> > the complexity. Contrariwise, there are some hints I think the filesystem
> > could pass down that aren't in the spec today, such as the flags from
> > madvise (random access vs sequential access) and whether the access is
> > for fs metadata or application data.
>
> Maybe I'm getting cynical with age but I'd put a beer on it being the
> case that implementations ignore the fs provided hints within a few years
> of it becoming regularly used 8)

Actually, you're not cynical ... there was actually a paper at fast two
years ago that showed a deductive algorithm would always outperform a
fixed hint list:

http://www.usenix.org/events/fast09/tech/full_papers/liu/liu_html/index.html

The bottom line is that to perform optimally, there's no agreement
between the client and server for what the hints are; the server just
provides a random set of numbers for hints, which the client uses in an
arbitrary fashion and the server processes the hints in different
classes and tries to work out whether they're useful or not.

The beauty is that because there's no fixed agreement, the client is
free to redefine hints as it sees fit (or fashion changes) and the
server will mostly do the best it can anyway.

James


--
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/