|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH net-next] xen-netback: stop vif thread spinning if frontend is unresponsive
> From: David Miller
...
> > - if (!npo.copy_prod)
> > + if (!npo.copy_prod) {
> > + if (ring_full)
> > + vif->rx_queue_stopped = true;
> > goto done;
> > + }
> > +
> > + vif->rx_queue_stopped = false;
>
> And then you can code this as:
>
> vif->rx_queue_stopped = (!npo.copy_prod && ring_full);
> if (!npo.copy_prod)
> goto done;
Which isn't quite the same...
1) It always writes vif->rx_queue_stopped, the old code could
leave it unchanged.
2) If 'npo' is global then the compiler can't assume that 'vif'
doesn't alias it so may have to re-read it following the
write to 'vif->rx_queue_stopped'.
David
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |