[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <63eeeda3-6e94-69e5-9cfc-75d34a4c4e4a@alibaba-inc.com>
Date: Thu, 04 Jan 2018 15:44:20 +0800
From: "夷则(Caspar)" <jinli.zjl@...baba-inc.com>
To: Mel Gorman <mgorman@...hsingularity.net>
Cc: "Andrew Morton" <akpm@...ux-foundation.org>,
<green@...uxhacker.ru>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>,
"杨勇(智彻)" <zhiche.yy@...baba-inc.com>,
"十刀" <shidao.ytt@...baba-inc.com>
Subject: Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof
On 2018/1/4 14:13, 夷则(Caspar) wrote:
>
> 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
Oops, I find a 'standard' documented in latest man-pages.git[1], blame
my centos7, it runs with an old man-pages.rpm :-(
Thanks,
Caspar
[1]
https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?h=ceb1c326b9f3e863dfd9bf33bc7118bb1fa29bfc
> 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.
> */
Powered by blists - more mailing lists