Re: [PATCH net-next v5 07/10] forcedeth: implementndo_get_stats64() API

From: Ben Hutchings
Date: Wed Nov 16 2011 - 14:32:56 EST


On Wed, 2011-11-16 at 11:25 -0800, David Decotigny wrote:
> Thanks for your feedback on these concerns.
>
> On Wed, Nov 16, 2011 at 9:14 AM, Ben Hutchings
> <bhutchings@xxxxxxxxxxxxxx> wrote:
> > On Wed, 2011-11-16 at 08:55 -0800, Stephen Hemminger wrote:
> >> Or realize that the Tx side is single threaded by dev->xmit_lock already
> >> and the Rx side is single threaded by NAPI.
> >
> > Right.
>
> Yes, that's what I meant by "Each software stat field is updated by
> one single writer." in a previous email. However, I think that TX and
> RX paths are not always synchronized. So I'm afraid that if I'm using
> a single seqcount, I might run into trouble in the absence of a lock
> around each update.... and I'd really prefer to avoid such a lock. Are
> you suggesting I should use 2 independent seqcounts? One for RX path,
> the other for TX path, all this without a lock around writers?

Yes, there should be 1 for each path.

Ben.

--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/