From: Kalle Valo <kvalo@codeaurora.org>
To: Bob Copeland <me@bobcopeland.com>
Cc: linux-wireless@vger.kernel.org, k.eugene.e@gmail.com,
wcn36xx@lists.infradead.org, Bob Copeland <me@bobcopeland.com>
Subject: Re: wcn36xx: introduce per-channel ring buffer locks
Date: Wed, 28 Oct 2015 18:58:40 +0000 (UTC) [thread overview]
Message-ID: <20151028185840.6D7F8141579@smtp.codeaurora.org> (raw)
In-Reply-To: <1445708535-20169-1-git-send-email-me@bobcopeland.com>
> wcn36xx implements a ring buffer for transmitted frames for each
> (high and low priority) DMA channel. The ring buffers are lockless:
> new frames are inserted at the head of the queue, while finished
> packets are reaped from the tail.
>
> Unfortunately, the list manipulations are missing any kind of barriers
> so are susceptible to various races: for example, a TX completion
> handler might read an updated desc->ctrl before the head has actually
> advanced, and then null out the ctl->skb pointer while it is still
> being used in the TX path.
>
> Simplify things here by adding a spin lock when traversing the ring.
> This change increased stability for me without adding any noticeable
> overhead on my platform (xperia z).
>
> Signed-off-by: Bob Copeland <me@bobcopeland.com>
Thanks, applied to wireless-drivers-next.git.
Kalle Valo
prev parent reply other threads:[~2015-10-28 18:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-24 17:42 [PATCH] wcn36xx: introduce per-channel ring buffer locks Bob Copeland
2015-10-25 2:58 ` yfw
2015-10-28 8:25 ` Eugene Krasnikov
2015-10-28 18:58 ` Kalle Valo [this message]
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=20151028185840.6D7F8141579@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=k.eugene.e@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=me@bobcopeland.com \
--cc=wcn36xx@lists.infradead.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).