linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [RFC option 2] mac80211: introduce refcount for queue_stop_reasons
Date: Mon, 09 Jun 2014 10:21:00 +0300	[thread overview]
Message-ID: <1402298460.2004.34.camel@dubbel> (raw)
In-Reply-To: <CA+BoTQkX=ZpDc=R+nWxsrj026XyaaEiwrosaB2buRVif2aOnxQ@mail.gmail.com>

On Mon, 2014-06-09 at 07:34 +0200, Michal Kazior wrote:
> On 6 June 2014 20:46, Luca Coelho <luca@coelho.fi> wrote:
> > From: Luciano Coelho <luciano.coelho@intel.com>
> >
> > Sometimes different vifs may be stopping the queues for the same
> > reason (e.g. when several interfaces are performing a channel switch).
> > Instead of using a bitmask for the reasons, use an integer that holds
> > a refcount instead.
> >
> > Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
> > ---
> >
> > This looks much simpler now.  The only thing is that we need to make
> > sure the bitmask never gets out of sync with the refcounts, which
> > shouldn't be too difficult, as long as we keep the refcounts usage
> > restricted to the queues start/stopping functions.
> 
> I think you need to make sure all stop/wake calls are balanced
> everywhere (including device drivers). Otherwise you risk breaking
> things silently in some cases.
> 
> It might also be worth to update exported stop/wake symbol documentation too.

Good point, I'll look into that.

My original idea was to mark the queues as stopped in the sdata so we
would at least clean things up when the vif is stopped, but that would
be a bit slow if we had to traverse them all the time.

Checking this might be tricky, actually, since I think there are some
assumptions that stopping a queue that is already stopped is a NOP, but
now we add to the refcount...

--
Luca.


  reply	other threads:[~2014-06-09  7:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-06 15:27 [RFC] mac80211: introduce refcount for queue_stop_reasons Luca Coelho
2014-06-06 18:46 ` [RFC option 2] " Luca Coelho
2014-06-09  5:34   ` Michal Kazior
2014-06-09  7:21     ` Luca Coelho [this message]
2014-06-09  9:17       ` Johannes Berg
2014-06-09  9:21         ` Luca Coelho
2014-06-09 14:52           ` Luca Coelho
2014-06-09 15:00             ` [RFC option 2 v2] " Luca Coelho

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=1402298460.2004.34.camel@dubbel \
    --to=luca@coelho.fi \
    --cc=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).