linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "夷则(Caspar)" <jinli.zjl@alibaba-inc.com>
To: Mel Gorman <mgorman@techsingularity.net>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	green@linuxhacker.ru, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	"杨勇(智彻)" <zhiche.yy@alibaba-inc.com>,
	十刀 <shidao.ytt@alibaba-inc.com>
Subject: Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof
Date: Thu, 04 Jan 2018 15:44:20 +0800	[thread overview]
Message-ID: <63eeeda3-6e94-69e5-9cfc-75d34a4c4e4a@alibaba-inc.com> (raw)
In-Reply-To: <7dd95219-f0be-b30a-0a43-2aadcc61899c@alibaba-inc.com>



On 2018/1/4 14:13, a?.a??(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:
> 
>  A A A A A A A  /*
>  A A A A A A A A  * First and last FULL page! Partial pages are deliberately
>  A A A A A A A A  * preserved on the expectation that it is better to preserve
>  A A A A A A A A  * needed memory than to discard unneeded memory.
>  A A A A A A A A  */

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2018-01-04  7:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-23  4:16 十刀
2018-01-03  6:53 ` 夷则(Caspar)
2018-01-03 10:48   ` Mel Gorman
2018-01-04  0:17     ` Andrew Morton
2018-01-04  8:17       ` 夷则(Caspar)
2018-01-04 22:54         ` Andrew Morton
2018-01-04 10:05       ` Mel Gorman
2018-01-04  6:13     ` 夷则(Caspar)
2018-01-04  7:44       ` 夷则(Caspar) [this message]
2018-01-04 11:34       ` Mel Gorman
2018-01-04 11:38         ` 夷则(Caspar)
2018-01-05  6:10 ` [PATCH v2] mm/fadvise: discard partial page if endbyte is also EOF 夷则(Caspar)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63eeeda3-6e94-69e5-9cfc-75d34a4c4e4a@alibaba-inc.com \
    --to=jinli.zjl@alibaba-inc.com \
    --cc=akpm@linux-foundation.org \
    --cc=green@linuxhacker.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=shidao.ytt@alibaba-inc.com \
    --cc=zhiche.yy@alibaba-inc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox