mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robin Holt <holt@sgi.com>
To: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Laurent Pinchart <laurent.pinchart@skynet.be>,
	linux-kernel@vger.kernel.org,
	v4l2_linux <linux-media@vger.kernel.org>
Subject: Re: Is get_user_pages() enough to prevent pages from being swapped out ?
Date: Thu, 30 Jul 2009 06:39:51 -0500	[thread overview]
Message-ID: <20090730113951.GA2763@sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0907291653510.20238@sister.anvils>

> > On Wednesday 29 July 2009 17:26:11 Hugh Dickins wrote:
...
> > > On the other hand, despite the raised reference count, under memory
> > > pressure that page might get unmapped from the user pagetable, and
> > > might even be written out to swap in its half-dirty state (though

One thing you did not mention in the above description is that the page
is marked clean by the write-out to swap.  I am not sure I recall the
method of mapping involved here, but it is necessary to ensure the page
is marked dirty again before the driver releases it.  If the page is
not marked dirty as part of your method of releasing it, the changes
you have made between when the page was first written out and when you
are freeing it will get lost.

Thanks,
Robin

  reply	other threads:[~2009-07-30 11:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-29  9:23 Laurent Pinchart
2009-07-29 15:26 ` Hugh Dickins
2009-07-29 15:41   ` Laurent Pinchart
2009-07-29 16:07     ` Hugh Dickins
2009-07-30 11:39       ` Robin Holt [this message]
2009-07-30 11:48         ` Hugh Dickins
2009-08-05 14:37           ` Laurent Pinchart

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=20090730113951.GA2763@sgi.com \
    --to=holt@sgi.com \
    --cc=hugh.dickins@tiscali.co.uk \
    --cc=laurent.pinchart@skynet.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.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

all inboxes | Powered by JetHome®