[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D45508D@AcuExch.aculab.com>
Date: Wed, 8 Jan 2014 09:55:13 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'David Miller' <davem@...emloft.net>,
"paul.durrant@...rix.com" <paul.durrant@...rix.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"xen-devel@...ts.xen.org" <xen-devel@...ts.xen.org>,
"wei.liu2@...rix.com" <wei.liu2@...rix.com>,
"ian.campbell@...rix.com" <ian.campbell@...rix.com>,
"david.vrabel@...rix.com" <david.vrabel@...rix.com>
Subject: RE: [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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists