Patchwork 回??: [PATCH 2/2] umem: chardevice for kvm postcopy

login
register
mail settings
Submitter thfbjyddx
Date Jan. 5, 2012, 11:10 a.m.
Message ID <BLU0-SMTP15295DFE06E9B7CE914B8CABC940@phx.gbl>
Download mbox | patch
Permalink /patch/134457/
State New
Headers show

Comments

thfbjyddx - Jan. 5, 2012, 11:10 a.m.
After I use this series of patches, but the migration failed.
2, I start migrate -d -p -n tcp:xxx:4444 on the outgoing node
2, on the incoming part, the qemu get stuck and migration failed
the  destnation can not typing any more

today I found it's just at qemu_loadvm_state, just after the while loop ,maybe in cpu_synchronize_all_post_init
I think there is some problems with qemu side for it doesn't get to the umem part
I'm not sure about the problem
do you have some suggestion?



Tommy

From: Isaku Yamahata

Date: 2012-01-05 18:48
To: thfbjyddx
CC: t.hirofuchi; qemu-devel; kvm; satoshi.itoh
Subject: Re: [Qemu-devel]回??: [PATCH 2/2] umem: chardevice for kvm postcopy
On Thu, Jan 05, 2012 at 12:08:50PM +0800, thfbjyddx wrote:
> hi,

> I've tried to use this patch,


Oh great! Can we share your results?


> but it doesn't work for compiling error on

>  

>  page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->address);//vmf->

> virtual_address?

>  

> I guess it's for the wrong kernel version?

> can you give me some detail about this or any clue?

> 3x 


Thank you for report. The following should fix.
It depends on kernel configuration. My config didn't catch it.




-- 
yamahata
Isaku Yamahata - Jan. 5, 2012, 12:18 p.m.
Hmm, this sounds like you haven't specified -postcopy option at the
incoming qemu.
How did you start incoming qemu?


On Thu, Jan 05, 2012 at 07:10:42PM +0800, Tommy wrote:
> After I use this series of patches, but the migration failed.
> 2, I start migrate -d -p -n tcp:xxx:4444 on the outgoing node
> 2, on the incoming part, the qemu get stuck and migration failed
> the  destnation can not typing any more
>  
> today I found it's just at qemu_loadvm_state, just after the while loop ,maybe
> in cpu_synchronize_all_post_init
> I think there is some problems with qemu side for it doesn't get to the umem
> part
> I'm not sure about the problem
> do you have some suggestion?
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> Tommy
>  
> From: Isaku Yamahata
> Date: 2012-01-05 18:48
> To: thfbjyddx
> CC: t.hirofuchi; qemu-devel; kvm; satoshi.itoh
> Subject: Re: [Qemu-devel]  ??: [PATCH 2/2] umem: chardevice for kvm postcopy
> On Thu, Jan 05, 2012 at 12:08:50PM +0800, thfbjyddx wrote:
> > hi,
> > I've tried to use this patch,
>  
> Oh great! Can we share your results?
>  
>  
> > but it doesn't work for compiling error on
> >  
> >  page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->address);//vmf->
> > virtual_address?
> >  
> > I guess it's for the wrong kernel version?
> > can you give me some detail about this or any clue?
> > 3x 
>  
> Thank you for report. The following should fix.
> It depends on kernel configuration. My config didn't catch it.
>  
> diff --git a/drivers/char/umem.c b/drivers/char/umem.c
> index 4d031b5..853f1ce 100644
> --- a/drivers/char/umem.c
> +++ b/drivers/char/umem.c
> @@ -129,7 +129,7 @@ static int umem_minor_fault(struct umem *umem,
>    * vmf->page = fake_vmf->page;
>    */
>  
> - page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->address);
> + page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->virtual_address);
>   if (!page)
>   return VM_FAULT_OOM;
>   if (mem_cgroup_cache_charge(page, vma->vm_mm, GFP_KERNEL)) {
>  
>  
>  
> -- 
> yamahata
>  
>
thfbjyddx - Jan. 6, 2012, 7:02 a.m.
Hi,
Can you tell me the base version of the qemu?
the postcopy patches make some conflicts on the qemu which I clone from the git
Thanks! 



Tommy

From: Isaku Yamahata

Date: 2012-01-05 20:18
To: Tommy
CC: t.hirofuchi; qemu-devel; kvm; satoshi.itoh
Subject: Re: [Qemu-devel]回??: [PATCH 2/2] umem: chardevice for kvm postcopy
Hmm, this sounds like you haven't specified -postcopy option at the
incoming qemu.
How did you start incoming qemu?


On Thu, Jan 05, 2012 at 07:10:42PM +0800, Tommy wrote:
> After I use this series of patches, but the migration failed.

> 2, I start migrate -d -p -n tcp:xxx:4444 on the outgoing node

> 2, on the incoming part, the qemu get stuck and migration failed

> the  destnation can not typing any more

>  

> today I found it's just at qemu_loadvm_state, just after the while loop ,maybe

> in cpu_synchronize_all_post_init

> I think there is some problems with qemu side for it doesn't get to the umem

> part

> I'm not sure about the problem

> do you have some suggestion?

> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

> Tommy

>  

> From: Isaku Yamahata

> Date: 2012-01-05 18:48

> To: thfbjyddx

> CC: t.hirofuchi; qemu-devel; kvm; satoshi.itoh

> Subject: Re: [Qemu-devel]  ??: [PATCH 2/2] umem: chardevice for kvm postcopy

> On Thu, Jan 05, 2012 at 12:08:50PM +0800, thfbjyddx wrote:

> > hi,

> > I've tried to use this patch,

>  

> Oh great! Can we share your results?

>  

>  

> > but it doesn't work for compiling error on

> >  

> >  page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->address);//vmf->

> > virtual_address?

> >  

> > I guess it's for the wrong kernel version?

> > can you give me some detail about this or any clue?

> > 3x 

>  

> Thank you for report. The following should fix.

> It depends on kernel configuration. My config didn't catch it.

>  

> diff --git a/drivers/char/umem.c b/drivers/char/umem.c

> index 4d031b5..853f1ce 100644

> --- a/drivers/char/umem.c

> +++ b/drivers/char/umem.c

> @@ -129,7 +129,7 @@ static int umem_minor_fault(struct umem *umem,

>    * vmf->page = fake_vmf->page;

>    */

>  

> - page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->address);

> + page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->virtual_address);

>   if (!page)

>   return VM_FAULT_OOM;

>   if (mem_cgroup_cache_charge(page, vma->vm_mm, GFP_KERNEL)) {

>  

>  

>  

> -- 

> yamahata

>  

>  


-- 
yamahata
Isaku Yamahata - Jan. 6, 2012, 5:13 p.m.
On Fri, Jan 06, 2012 at 03:02:00PM +0800, thfbjyddx wrote:
> Hi,
> Can you tell me the base version of the qemu?
> the postcopy patches make some conflicts on the qemu which I clone from the git

03ecd2c80a64d030a22fe67cc7a60f24e17ff211


> Thanks! 
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> Tommy
>  
> From: Isaku Yamahata
> Date: 2012-01-05 20:18
> To: Tommy
> CC: t.hirofuchi; qemu-devel; kvm; satoshi.itoh
> Subject: Re: [Qemu-devel]回??: [PATCH 2/2] umem: chardevice for kvm postcopy
> Hmm, this sounds like you haven't specified -postcopy option at the
> incoming qemu.
> How did you start incoming qemu?
>  
>  
> On Thu, Jan 05, 2012 at 07:10:42PM +0800, Tommy wrote:
> > After I use this series of patches, but the migration failed.
> > 2, I start migrate -d -p -n tcp:xxx:4444 on the outgoing node
> > 2, on the incoming part, the qemu get stuck and migration failed
> > the  destnation can not typing any more
> >  
> >
>  today I found it's just at qemu_loadvm_state, just after the while loop ,maybe
> > in cpu_synchronize_all_post_init
> > I think there is some problems with qemu side for it doesn't get to the umem
> > part
> > I'm not sure about the problem
> > do you have some suggestion?
> > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> ━
> > Tommy
> >  
> > From: Isaku Yamahata
> > Date: 2012-01-05 18:48
> > To: thfbjyddx
> > CC: t.hirofuchi; qemu-devel; kvm; satoshi.itoh
> > Subject: Re: [Qemu-devel]  ??: [PATCH 2/2] umem: chardevice for kvm postcopy
> > On Thu, Jan 05, 2012 at 12:08:50PM +0800, thfbjyddx wrote:
> > > hi,
> > > I've tried to use this patch,
> >  
> > Oh great! Can we share your results?
> >  
> >  
> > > but it doesn't work for compiling error on
> > >  
> > >  page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->address);//vmf->
> > > virtual_address?
> > >  
> > > I guess it's for the wrong kernel version?
> > > can you give me some detail about this or any clue?
> > > 3x 
> >  
> > Thank you for report. The following should fix.
> > It depends on kernel configuration. My config didn't catch it.
> >  
> > diff --git a/drivers/char/umem.c b/drivers/char/umem.c
> > index 4d031b5..853f1ce 100644
> > --- a/drivers/char/umem.c
> > +++ b/drivers/char/umem.c
> > @@ -129,7 +129,7 @@ static int umem_minor_fault(struct umem *umem,
> >    * vmf->page = fake_vmf->page;
> >    */
> >  
> > - page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->address);
> > + page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->virtual_address);
> >   if (!page)
> >   return VM_FAULT_OOM;
> >   if (mem_cgroup_cache_charge(page, vma->vm_mm, GFP_KERNEL)) {
> >  
> >  
> >  
> > -- 
> > yamahata
> >  
> >  
>  
> -- 
> yamahata
>  
>

Patch

diff --git a/drivers/char/umem.c b/drivers/char/umem.c

index 4d031b5..853f1ce 100644

--- a/drivers/char/umem.c

+++ b/drivers/char/umem.c

@@ -129,7 +129,7 @@  static int umem_minor_fault(struct umem *umem,

   * vmf->page = fake_vmf->page;
   */

- page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->address);

+ page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->virtual_address);

  if (!page)
  return VM_FAULT_OOM;
  if (mem_cgroup_cache_charge(page, vma->vm_mm, GFP_KERNEL)) {