Patchwork [RFC,V2] New Xen netback implementation

login
register
mail settings
Submitter Wei Liu
Date Jan. 30, 2012, 6:27 p.m.
Message ID <1327948024.5553.43.camel@leeds.uk.xensource.com>
Download mbox | patch
Permalink /patch/138621/
State RFC
Delegated to: David Miller
Headers show

Comments

Wei Liu - Jan. 30, 2012, 6:27 p.m.
On Sun, 2012-01-29 at 21:37 +0000, Konrad Rzeszutek Wilk wrote:
> 
> Sure. I also did some testing with limiting the amount of CPUs and found
> that 'xl vcpu-set 0 N' make netback not work anymore :-( 
> > 
> > 

I just played with vcpu-set a bit, and I can reproduced this problem.
That's a race condition.

One possible fix is remove cond_resched() in the kernel thread. After
removing that, it fixes the problem (at least for me).


Wei.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wei Liu - Jan. 30, 2012, 6:30 p.m.
On Mon, 2012-01-30 at 18:27 +0000, Wei Liu (Intern) wrote:
> On Sun, 2012-01-29 at 21:37 +0000, Konrad Rzeszutek Wilk wrote:
> > 
> > Sure. I also did some testing with limiting the amount of CPUs and found
> > that 'xl vcpu-set 0 N' make netback not work anymore :-( 
> > > 
> > > 
> 
> I just played with vcpu-set a bit, and I can reproduced this problem.
> That's a race condition.
> 
> One possible fix is remove cond_resched() in the kernel thread. After
> removing that, it fixes the problem (at least for me).
> 
> 
> Wei.
> 
> --- a/drivers/net/xen-netback/netback.c
> +++ b/drivers/net/xen-netback/netback.c
> @@ -994,7 +994,7 @@ int xenvif_kthread(void *data)
>                 wait_event_interruptible(vif->wq,
>                                          rx_work_todo(vif) ||
>                                          kthread_should_stop());
> -               cond_resched();
> +               /* cond_resched(); */
>  
>                 if (kthread_should_stop())
>                         break;
> 
> 

Hmm... Here it comes again. Ignore this fix. It's more complicated than
I thought.


Wei.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -994,7 +994,7 @@  int xenvif_kthread(void *data)
                wait_event_interruptible(vif->wq,
                                         rx_work_todo(vif) ||
                                         kthread_should_stop());
-               cond_resched();
+               /* cond_resched(); */
 
                if (kthread_should_stop())
                        break;