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

[Xen-devel] Re: [GIT/PATCH v4] xen network backend driver



On Thu, 2011-03-10 at 17:30 +0000, Ben Hutchings wrote:
> On Thu, 2011-03-10 at 09:15 -0800, Stephen Hemminger wrote:
> > On Thu, 10 Mar 2011 17:02:33 +0000
> > Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> > > +struct xenvif {
> > > + /* Unique identifier for this interface. */
> > ...
> > > + struct net_device_stats stats;
> > > +
> > 
> > There is already a stats struct in net_device in current kernel
> > versions, unless there is a compelling reason otherwise
> > please use that.

Will do.
 
> > Also, you probably want to implement per-cpu and 64 bit
> > stats.
> 
> The driver is using a single queue, so I don't see what benefit it would
> get from per-cpu stats.  At some point it should become multiqueue and
> then it should store per-queue stats.

Agreed.

> 64-bit stats are definitely preferable, but since they're being
> maintained on the data path this may require some significant work.
> (Ian: see <linux/u64_stats_sync.h> for the canonical way to do this.)
> Given that only a relatively few existing drivers do this (I count 13),
> I'm not sure we can reasonably demand that a new driver does - yet.

Is there an example of a driver which also updates the stats on the
datapath?

If it's ok I'd prefer to defer this change for now though.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.