[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support
From: |
Alexey Perevalov |
Subject: |
Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support |
Date: |
Mon, 20 Feb 2017 19:01:26 +0300 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hello Andrea,
On Fri, Feb 17, 2017 at 05:47:30PM +0100, Andrea Arcangeli wrote:
> Hello Alexey,
>
> On Tue, Feb 14, 2017 at 05:48:25PM +0300, Alexey Perevalov wrote:
> > On Mon, Feb 13, 2017 at 06:57:22PM +0100, Andrea Arcangeli wrote:
> > > Hello,
> > >
> > > On Mon, Feb 13, 2017 at 08:11:06PM +0300, Alexey Perevalov wrote:
> > > > Another one request.
> > > > QEMU could use mem_path in hugefs with share key simultaneously
> > > > (-object
> > > > memory-backend-file,id=mem,size=${mem_size},mem-path=${mem_path},share=on)
> > > > and vm
> > > > in this case will start and will properly work (it will allocate memory
> > > > with mmap), but in case of destination for postcopy live migration
> > > > UFFDIO_COPY ioctl will fail for
> > > > such region, in Arcangeli's git tree there is such prevent check
> > > > (if (!vma_is_shmem(dst_vma) && dst_vma->vm_flags & VM_SHARED).
> > > > Is it possible to handle such situation at qemu?
> > >
> > > It'd be nice to lift this hugetlbfs !VM_SHARED restriction I agree, I
> > > already asked Mike (CC'ed) why is there, because I'm afraid it's a
> > > leftover from the anon version where VM_SHARED means a very different
> > > thing but it was already lifted for shmem. share=on should already
> > > work on top of tmpfs and also with THP on tmpfs enabled.
> > >
> > > For hugetlbfs and shmem it should be generally more complicated to
> > > cope with private mappings than shared ones, shared is just the native
> > > form of the pseudofs without having to deal with private COWs aliases
> > > so it's hard to imagine something going wrong for VM_SHARED if the
> > > MAP_PRIVATE mapping already works fine. If it turns out to be
> > > superflous the check may be just turned into
> > > "vma_is_anonymous(dst_vma) && dst_vma->vm_flags & VM_SHARED".
> >
> > Great, as I know -netdev type=vhost-user requires share=on in
> > -object memory-backend in ovs-dpdk scenario
> > http://wiki.qemu-project.org/Documentation/vhost-user-ovs-dpdk
>
> share=on should work now with current aa.git userfault branch, and the
> support is already included in -mm, it should all get merged upstream
> in kernel 4.11.
>
> Could you test the current aa.git userfault branch to verify postcopy
> live migration works fine on hugetlbfs share=on?
>
Yes, I already checked with you suggestion of using another check
"vma_is_anonymous(dst_vma) && dst_vma->vm_flags & VM_SHARED", but in
this case dst page was anonymous after successfully passed ioctl.
There is no such bug in latest aa.git now.
"userfaultfd: hugetlbfs: add UFFDIO_COPY support for shared mappings"
solved issue with anonymous page after UFFDIO_COPY.
> Thanks!
> Andrea
>
--
BR
Alexey
- Re: [Qemu-devel] [PATCH v2 10/16] postcopy: Load huge pages in one go, (continued)
- [Qemu-devel] [PATCH v2 15/16] postcopy: Check for userfault+hugepage feature, Dr. David Alan Gilbert (git), 2017/02/06
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Dr. David Alan Gilbert, 2017/02/06
- Message not available
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Alexey Perevalov, 2017/02/13
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Andrea Arcangeli, 2017/02/13
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Andrea Arcangeli, 2017/02/13
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Mike Kravetz, 2017/02/14
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Alexey Perevalov, 2017/02/14
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Andrea Arcangeli, 2017/02/17
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support,
Alexey Perevalov <=
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Dr. David Alan Gilbert, 2017/02/13
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Alexey Perevalov, 2017/02/14
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Dr. David Alan Gilbert, 2017/02/14
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Alexey Perevalov, 2017/02/21
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Dr. David Alan Gilbert, 2017/02/21
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Alexey Perevalov, 2017/02/27
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Dr. David Alan Gilbert, 2017/02/27
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Andrea Arcangeli, 2017/02/27
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Daniel P. Berrange, 2017/02/27
- Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support, Alexey Perevalov, 2017/02/27