linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2] mac80211: expose txq queue depth and size to drivers
Date: Wed, 27 Jan 2016 15:36:04 +0100	[thread overview]
Message-ID: <1453905364.2351.9.camel@sipsolutions.net> (raw)
In-Reply-To: <CA+BoTQn0AhDg628XF2+0gBBPM+8krTnTdeE6FiEBz-ZT+0k6Kg@mail.gmail.com> (sfid-20160127_153354_704081_0BA69A80)

On Wed, 2016-01-27 at 15:33 +0100, Michal Kazior wrote:
> On 27 January 2016 at 15:26, Johannes Berg <johannes@sipsolutions.net
> > wrote:
> > On Wed, 2016-01-27 at 15:26 +0100, Michal Kazior wrote:
> > > 
> > > @@ -1294,6 +1298,8 @@ struct sk_buff *ieee80211_tx_dequeue(struct
> > > ieee80211_hw *hw,
> > >       if (!skb)
> > >               goto out;
> > > 
> > > +     txqi->byte_cnt -= skb->len;
> > > +
> > >       atomic_dec(&sdata->txqs_len[ac]);
> > > 
> > This *looks* a bit worrying - you have an atomic dec for the # of
> > packets and a non-atomic one for the bytes.
> > 
> > You probably thought about it and I guess it's fine, but can you
> > explain it?
> 
> The atomic was used because it accesses per-vif counters. You can't
> use txqi->queue.lock for that.
> 

Ah. I completely missed that distinction, thanks.

johannes

  reply	other threads:[~2016-01-27 14:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21 13:23 [PATCH 1/2] mac80211: fix txq queue related crashes Michal Kazior
2016-01-21 13:23 ` [PATCH 2/2] mac80211: expose txq queue depth and size to drivers Michal Kazior
2016-01-26 10:45   ` Felix Fietkau
2016-01-26 11:56     ` Michal Kazior
2016-01-26 12:04       ` Felix Fietkau
2016-01-26 12:45         ` Michal Kazior
2016-01-26 12:56       ` Johannes Berg
2016-01-25 17:59 ` [PATCH 1/2] mac80211: fix txq queue related crashes Ben Greear
2016-01-26  6:35   ` Michal Kazior
2016-01-26 15:29     ` Ben Greear
2016-01-26 13:11 ` Johannes Berg
2016-01-27 14:26 ` [PATCH v2] mac80211: expose txq queue depth and size to drivers Michal Kazior
2016-01-27 14:26   ` Johannes Berg
2016-01-27 14:33     ` Michal Kazior
2016-01-27 14:36       ` Johannes Berg [this message]
2016-02-02 15:07   ` Johannes Berg

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=1453905364.2351.9.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.com \
    /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).