RE: [Xen-devel] [RFC PATCH 3/6] netback: switch to NAPI + kthread model

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2012-01-16 at 10:56 +0000, Paul Durrant wrote:
> > -----Original Message-----
> > From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-
> > bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Ian Campbell
> > Sent: 16 January 2012 10:45
> > To: Wei Liu (Intern)
> > Cc: netdev@xxxxxxxxxxxxxxx; xen-devel@xxxxxxxxxxxxxxxxxxx; David Vrabel;
> > konrad.wilk@xxxxxxxxxx
> > Subject: Re: [Xen-devel] [RFC PATCH 3/6] netback: switch to NAPI + kthread
> > model
> > 
> > On Mon, 2012-01-16 at 09:33 +0000, Wei Liu (Intern) wrote:
> > > On Fri, 2012-01-13 at 18:21 +0000, David Vrabel wrote:
> > > > On 13/01/12 16:59, Wei Liu wrote:
> > > > > This patch implements 1:1 model netback. We utilizes NAPI and
> > > > > kthread to do the weight-lifting job:
> > > > >
> > > > >   - NAPI is used for guest side TX (host side RX)
> > > > >   - kthread is used for guest side RX (host side TX)
> > > > >
> > > > > This model provides better scheduling fairness among vifs. It also
> > > > > lays the foundation for future work.
> > > > >
> > > > > The major defect for the current implementation is that in the
> > > > > NAPI poll handler we don't actually disable interrupt. Xen stuff
> > > > > is different from real hardware, it requires some other tuning of
> > > > > ring macros.
> > > >
> > > > RING_FINAL_CHECK_FOR_REQUESTS() looks it does the correct thing to
> > me.
> > > >
> > > > David
> > >
> > > I need to stop the other end from generating events, so
> > > RING_FINAL_CHECK_FOR_REQUESTS is not the right answer I think.
> > 
> > What you need is a variant which sets req_event some large distance into
> > the future instead of to just req_cons + 1. Or possibly it should be set to just
> > in the past (e.g. req_cons - 1). Call it something like
> > RING_POLL_FOR_REQUESTS().
> > 
> 
> Can you just simply avoid calling RING_FINAL_CHECK_FOR_REQUESTS()
> unless you actually want to re-enable 'interrupts'? All it does is
> manipulate the event pointer and tell you whether there are still
> unconsumed requests.

Perhaps but I think you'd want to keep moving the event pointer to
handle wrap around, i.e. by keeping it always either far enough away or
right behind. (I think "req_cons - 1" is probably the correct option
BTW).

Ian.


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


[Index of Archives]     [Linux Kernel Discussion]     [TCP Instrumentation]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux WPAN Networking]     [Linux Host AP]     [Linux WPAN Networking]     [Linux Bluetooth Networking]     [Linux ATH6KL Networking]     [Linux Networking Users]     [Linux Coverity]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux IDE]     [Linux RAID]     [Linux SCSI]