public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Michael Kerrisk <mtk-lkml@gmx.net>
Cc: Robert Love <rml@novell.com>,
	adi@hexapodia.org, samuel.thibault@ens-lyon.org,
	linux-kernel@vger.kernel.org, mtk-lists@gmx.net
Subject: Re: wrong madvise(MADV DONTNEED) semantic
Date: Wed, 29 Jun 2005 18:22:38 +0100	[thread overview]
Message-ID: <20050629172238.GA3356@mail.shareable.org> (raw)
In-Reply-To: <8493.1120063987@www35.gmx.net>

Michael Kerrisk wrote:
> For a MAP_SHARED region, the kernel may discard modified 
> pages, depending on the architecture.  (I seem to recall 
> getting this information about architecture variation from 
> an email conversation with Jamie Lokier; I haven't 
> verified it.  On x86 at least, I haven't seen an pages
> discarded for MADV_DONTNEED on a MAP_SHARED region.)  

The discard in MAP_SHARED case isn't explicit.  It's due to CPU cache
incoherency, so the data (or just some of the data) is lost simply by
not syncing properly between userspace and the page cache.

It wouldn't be apparent on fully-coherent architectures like x86.

That was when I last looked at the code (during the 2.5 time frame).
I didn't test it, only examined the code, but quite thoroughly.

-- Jamie

  reply	other threads:[~2005-06-29 17:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-28 13:43 wrong madvise(MADV_DONTNEED) semantic Samuel Thibault
2005-06-28 14:38 ` [Patch] Hotfix for " Jörn Engel
2005-06-28 18:16 ` Andy Isaacson
2005-06-28 18:28   ` Robert Love
2005-06-28 18:53     ` Andy Isaacson
2005-06-28 19:23       ` Robert Love
2005-06-28 19:41         ` Samuel Thibault
2005-06-28 20:03           ` Jörn Engel
2005-06-28 20:05             ` Robert Love
2005-06-28 20:17               ` Jörn Engel
2005-06-28 20:20                 ` Samuel Thibault
2005-06-28 20:30                   ` Jörn Engel
2005-06-28 20:37                   ` Andy Isaacson
2005-07-05 23:39                 ` Darren Hart
2005-06-29 16:53         ` wrong madvise(MADV DONTNEED) semantic Michael Kerrisk
2005-06-29 17:22           ` Jamie Lokier [this message]
2005-06-29 16:34     ` Michael Kerrisk
2005-06-28 18:54   ` wrong madvise(MADV_DONTNEED) semantic Samuel Thibault

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=20050629172238.GA3356@mail.shareable.org \
    --to=jamie@shareable.org \
    --cc=adi@hexapodia.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk-lists@gmx.net \
    --cc=mtk-lkml@gmx.net \
    --cc=rml@novell.com \
    --cc=samuel.thibault@ens-lyon.org \
    /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