posix_fadvise.2: Document the behavior of partial page discard requests

It is not obvious from the interface that partial page discard'
requests are ignored. It should be spelled out.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Mel Gorman 2014-12-03 00:42:47 +00:00 committed by Michael Kerrisk
parent ac4b0eb36e
commit ceb1c326b9
1 changed files with 5 additions and 0 deletions

View File

@ -154,6 +154,11 @@ A program may periodically request the kernel to free cached data
that has already been used, so that more useful cached pages are not
discarded instead.
Requests to discard partial pages are ignored. It is preferable to preserve
needed data than discard unneeded data. If the application requires that
data be considered for discarding then \fIoffset\fP and \fIlen\fP must be
page-aligned.
Pages that have not yet been written out will be unaffected, so if the
application wishes to guarantee that pages will be released, it should
call