This patch is trying to help to solve a real issue. Sometimes we need to evict the whole file from page cache because we are sure it will not be used in the near future. We try to use posix_fadvise() to finish our work but we often see a "small tail" at the end of some files could not be evicted, after digging a little bit, we find those file sizes are not page-aligned and the "tail" turns out to be partial pages.
We fail to find a standard from posix_fadvise() manual page to subscribe the function behaviors if the `offset' and `len' params are not
page-aligned, then we go to kernel tree and see this:
ÂÂÂÂÂÂÂ /*
ÂÂÂÂÂÂÂÂ * First and last FULL page! Partial pages are deliberately
ÂÂÂÂÂÂÂÂ * preserved on the expectation that it is better to preserve
ÂÂÂÂÂÂÂÂ * needed memory than to discard unneeded memory.
ÂÂÂÂÂÂÂÂ */