Re: [PATCH v5 5/5] KVM: PPC: e500: MMU API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 25, 2011 at 11:50:50PM +0200, Alexander Graf wrote:
> 
> On 25.07.2011, at 21:25, Scott Wood wrote:
> 
> > On Sun, 24 Jul 2011 11:16:32 +0200
> > Alexander Graf <agraf@xxxxxxx> wrote:
> > 
> >> On 19.07.2011, at 13:20, Johannes Weiner wrote:
> >> 
> >>> You don't have to work around the mm subsystem trying to reclaim your
> >>> memory,
> > 
> > The pages are pinned by get_free_pages_fast().
> > 
> >>> maintain disk coherency that is guaranteed by the filebacked
> >>> memory semantics etc.
> >>> 
> >>> If your driver provides the memory, there are much less assumptions
> >>> from userspace that you have to consider and memory management will
> >>> not interfere either.
> >> 
> >> Ah, thanks a lot. Scott, mind to switch this to the normal scheme then? Sounds like we don't need to dirty set by then either.
> > 
> > That's a fair bit of churn and added complexity, both here and in qemu.  Is
> > it really worth redesigning this API again, to avoid setting a few dirty
> > bits on an already-slow heavyweight exit?
> 
> Well, alternatively we could simply bail out if the memory is not
> anonymous, right? Then the pinning on get_user_pages_fast should be
> enough. Johannes, would there be any downside to this approach?

I don't see any correctness issues.  Maybe Andrea does?

While the userspace pages are never freed because of your reference,
it does not prevent reclaim from writing them to swap und unmapping
them from the user's page tables.

So even if it's working, it's still a bit of a hack...
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux