netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Eric Dumazet <eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "David Brownell"
	<david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>,
	"Michał Nazarewicz"
	<m.nazarewicz-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	"Neil Jones" <neiljay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: rndis gadget: Inconsistent locking
Date: Wed, 12 Jan 2011 13:41:36 +0000	[thread overview]
Message-ID: <20110112134136.GB9920@ff.dom.local> (raw)
In-Reply-To: <1294839140.3981.23.camel@edumazet-laptop>

On Wed, Jan 12, 2011 at 02:32:20PM +0100, Eric Dumazet wrote:
> Le mercredi 12 janvier 2011 ?? 13:23 +0000, Jarek Poplawski a écrit :
> > On Wed, Jan 12, 2011 at 02:07:12PM +0100, Eric Dumazet wrote:
> > ...
> > > 
> > > Hmm... 
> > > 
> > > So all net devices in gen_ndis_query_resp() should have a
> > > ndo_get_stats() or ndo_get_stats64() method, not allowed to use
> > > spin_lock_bh() / spin_unlock_bh()
> > > 
> > > If yes, we should add big fat comments to pn_net_stats()/eth_get_stats() so that nobody
> > > tries to revert your patch ;)
> > 
> > I'm not sure I got your point: my patch could be replaced with
> > ndo_get_stats64() implementing irq safe locking or by changing
> > gen_ndis_query_resp() calling context. It's intended as a fast
> > (compatible) fix.
> 
> I was mentioning that we tried in past months to remove useless
> ndo_get_stats() methods that were only doing :
> 
> return &net->stats;
> 
> random commit : b27d50a9ff5cf2775b7a4daf5
> 
> Another possibility would be to use u64_stats_sync.h for these txq
> counters.
> 
> (no locking needed to read counters, only a seqcount fetch/retry)
> 
> As a bonus, no overhead on 64bit arches.

Well, I'm OK with anything, but this thread gets older and older ;-)

Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-01-12 13:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 15:03 rndis gadget: Inconsistent locking Neil Jones
2010-12-08 15:11 ` Neil Jones
2010-12-08 17:15   ` Michał Nazarewicz
2010-12-09 17:00     ` Neil Jones
     [not found]       ` <AANLkTinE1srqkpib0+8Q63XjnhRYEWaaDsX70tc_OeUm-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-12-10 10:01         ` Michał Nazarewicz
     [not found]   ` <AANLkTi==UqNNzokLcLWDpjM0cqM6aXjppsi4p6ogMAqX-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-12-26 23:49     ` David Brownell
2011-01-07  9:30       ` Neil Jones
2011-01-07 11:20         ` David Brownell
2011-01-10 11:32           ` Neil Jones
2011-01-10 12:14             ` David Brownell
2011-01-12 12:28               ` Jarek Poplawski
     [not found]                 ` <20110112122811.GA9513-8HppEYmqbBCE+EvaaNYduQ@public.gmane.org>
2011-01-12 13:07                   ` Eric Dumazet
2011-01-12 13:23                     ` Jarek Poplawski
2011-01-12 13:32                       ` Eric Dumazet
2011-01-12 13:41                         ` Jarek Poplawski [this message]
2011-01-12 13:52                         ` Eric Dumazet
2011-01-12 15:02                           ` [PATCH] net: remove dev_txq_stats_fold() Eric Dumazet
2011-01-12 21:05                             ` Jarek Poplawski
     [not found]                               ` <20110112210518.GA2152-qLhEM4ewh5CNj9Bq2fkWzw@public.gmane.org>
2011-01-12 21:18                                 ` Jarek Poplawski
2011-01-12 22:13                                   ` Eric Dumazet
2011-01-14  5:45                                     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110112134136.GB9920@ff.dom.local \
    --to=jarkao2-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
    --cc=eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=m.nazarewicz-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=neiljay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).