All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: kvm-ppc@vger.kernel.org
Subject: Re: [PATCH v5 5/5] KVM: PPC: e500: MMU API
Date: Mon, 15 Aug 2011 15:15:51 +0000	[thread overview]
Message-ID: <1313421351.3664.9.camel@pasglop> (raw)
In-Reply-To: <20110707234159.GE6646@schlenkerla.am.freescale.net>

On Mon, 2011-08-15 at 10:03 -0500, Scott Wood wrote:
> On 08/13/2011 10:14 AM, Benjamin Herrenschmidt wrote:
> > On Mon, 2011-07-18 at 11:18 -0500, Scott Wood wrote:
> > 
> >>> Does this work? Why do we need to set them dirty in the first place? If the shared tlb pages are on file backed storage, we're screwed under memory pressure either way and they'd just get evicted despite us writing to them. Or does vmap pin them? Either way, they're either pinned or not. And if they're not, dirtying them here shouldn't really buy us anything, no?
> >>
> >> They're pinned by get_user_pages_fast().  We (potentially) write to them, so
> >> we should mark them dirty, because they are dirty.  It's up to the rest
> >> of Linux what to do with that.  Will being pinned stop updates from being
> >> written out if it is file-backed?  And eventually the vm will be destroyed
> >> (or the tlb reconfigured) and the pages will be unpinned.
> > 
> > Note that gup or gup_fast won't guarantee that the virtual->physical
> > mapping remains.
> > 
> > IE. the backing page itself will remain around, but it could be broken
> > off the mapping and another page can have taken its place in qemu
> > address space.
> > 
> > (Think page migration for example).
> 
> How would that work if gup is being used to implement read()?  Wouldn't
> the data be written to the wrong place?

If it drops the mm_sem, I suppose so. You'll have to talk to the vm
folks, they are the ones who warned me against gup.

Cheers,
Ben.



  parent reply	other threads:[~2011-08-15 15:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07 23:41 [PATCH v5 5/5] KVM: PPC: e500: MMU API Scott Wood
2011-07-08 12:57 ` Alexander Graf
2011-07-18 10:09 ` Alexander Graf
2011-07-18 16:18 ` Scott Wood
2011-07-18 16:33 ` Alexander Graf
2011-07-18 18:08 ` Scott Wood
2011-07-18 21:44 ` Alexander Graf
2011-07-19  8:36 ` Johannes Weiner
2011-07-19  8:51 ` Alexander Graf
2011-07-19 11:20 ` Johannes Weiner
2011-07-24  9:16 ` Alexander Graf
2011-07-25 19:25 ` Scott Wood
2011-07-25 21:50 ` Alexander Graf
2011-08-08  8:49 ` Johannes Weiner
2011-08-08 23:13 ` Scott Wood
2011-08-13 15:14 ` Benjamin Herrenschmidt
2011-08-15 15:03 ` Scott Wood
2011-08-15 15:15 ` Benjamin Herrenschmidt [this message]
2011-08-15 20:55 ` Scott Wood

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=1313421351.3664.9.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=kvm-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.