Consensus inquiry regarding POSIX_FADV_NOREUSE

From: Jonah H. Harris
Date: Thu Jun 09 2011 - 15:47:38 EST


Hello everyone,

I'm thinking about implementing the POSIX_FADV_NOREUSE advice option
of fadvise (mm/fadvise.c). While POSIX_FADV_DONTNEED works for many
use cases, it would be nice to forcibly evict pages as quickly as
possible to avoid having a single application pollute the cache --
especially when cache is used more heavily by other applications.

I have some ideas in regard to implementation, but as of yet I don't
have a concrete proposal. Instead, I wanted to see whether anyone is
averse to the idea before I start researching it more completely. To
that end, I've reviewed a large number of previous discussions and am
seeking clarification in regard to the current consensus of the
following:

  For developers who don't want their pages cached, should they use
O_DIRECT or fadvise?

In the past, I've used O_DIRECT quite successfully. But as it requires
dealing with alignment, it's not as simple to use or as general-case
as fadvise.

Thoughts?

--
Jonah H. Harris, VP of Architecture
myYearbook.com
--
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/