From: Bob Copeland <me@bobcopeland.com>
To: Niklas Cassel <niklas.cassel@linaro.org>
Cc: Adrian Chadd <adrian.chadd@gmail.com>,
netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
ath10k@lists.infradead.org, Kalle Valo <kvalo@qca.qualcomm.com>,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH] ath10k: transmit queued frames after waking queues
Date: Thu, 24 May 2018 11:50:34 -0400 [thread overview]
Message-ID: <20180524155034.xse7cfm5figfktuj@localhost> (raw)
In-Reply-To: <20180521203701.GA7619@localhost.localdomain>
On Mon, May 21, 2018 at 10:37:01PM +0200, Niklas Cassel wrote:
> On Thu, May 17, 2018 at 03:26:25PM -0700, Adrian Chadd wrote:
> > On Thu, 17 May 2018 at 16:16, Niklas Cassel <niklas.cassel@linaro.org>
> > wrote:
> >
> > > diff --git a/drivers/net/wireless/ath/ath10k/txrx.c
> > b/drivers/net/wireless/ath/ath10k/txrx.c
> > > index cda164f6e9f6..1d3b2d2c3fee 100644
> > > --- a/drivers/net/wireless/ath/ath10k/txrx.c
> > > +++ b/drivers/net/wireless/ath/ath10k/txrx.c
> > > @@ -95,6 +95,9 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt,
> > > wake_up(&htt->empty_tx_wq);
> > > spin_unlock_bh(&htt->tx_lock);
> >
> > > + if (htt->num_pending_tx <= 3 && !list_empty(&ar->txqs))
> > > + ath10k_mac_tx_push_pending(ar);
> > > +
> >
> > Just sanity checking - what's protecting htt->num_pending_tx? or is it
> > serialised some other way?
[...]
> I can't see that any of the examples applies, but let's add READ_ONCE(),
> to make sure that the compiler doesn't try to optimize this.
Couldn't you just move the num_pending_tx read inside tx_lock which is 2 lines
above? I think all the other manipulations are protected by tx_lock.
--
Bob Copeland %% https://bobcopeland.com/
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Bob Copeland <me@bobcopeland.com>
To: Niklas Cassel <niklas.cassel@linaro.org>
Cc: Adrian Chadd <adrian.chadd@gmail.com>,
Kalle Valo <kvalo@qca.qualcomm.com>,
David Miller <davem@davemloft.net>,
ath10k@lists.infradead.org, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ath10k: transmit queued frames after waking queues
Date: Thu, 24 May 2018 11:50:34 -0400 [thread overview]
Message-ID: <20180524155034.xse7cfm5figfktuj@localhost> (raw)
In-Reply-To: <20180521203701.GA7619@localhost.localdomain>
On Mon, May 21, 2018 at 10:37:01PM +0200, Niklas Cassel wrote:
> On Thu, May 17, 2018 at 03:26:25PM -0700, Adrian Chadd wrote:
> > On Thu, 17 May 2018 at 16:16, Niklas Cassel <niklas.cassel@linaro.org>
> > wrote:
> >
> > > diff --git a/drivers/net/wireless/ath/ath10k/txrx.c
> > b/drivers/net/wireless/ath/ath10k/txrx.c
> > > index cda164f6e9f6..1d3b2d2c3fee 100644
> > > --- a/drivers/net/wireless/ath/ath10k/txrx.c
> > > +++ b/drivers/net/wireless/ath/ath10k/txrx.c
> > > @@ -95,6 +95,9 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt,
> > > wake_up(&htt->empty_tx_wq);
> > > spin_unlock_bh(&htt->tx_lock);
> >
> > > + if (htt->num_pending_tx <= 3 && !list_empty(&ar->txqs))
> > > + ath10k_mac_tx_push_pending(ar);
> > > +
> >
> > Just sanity checking - what's protecting htt->num_pending_tx? or is it
> > serialised some other way?
[...]
> I can't see that any of the examples applies, but let's add READ_ONCE(),
> to make sure that the compiler doesn't try to optimize this.
Couldn't you just move the num_pending_tx read inside tx_lock which is 2 lines
above? I think all the other manipulations are protected by tx_lock.
--
Bob Copeland %% https://bobcopeland.com/
next prev parent reply other threads:[~2018-05-24 15:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 23:15 [PATCH] ath10k: transmit queued frames after waking queues Niklas Cassel
2018-05-17 23:15 ` Niklas Cassel
2018-05-17 22:26 ` Adrian Chadd
2018-05-17 22:26 ` Adrian Chadd
2018-05-21 20:37 ` Niklas Cassel
2018-05-21 20:37 ` Niklas Cassel
2018-05-24 15:50 ` Bob Copeland [this message]
2018-05-24 15:50 ` Bob Copeland
2018-05-25 12:36 ` Niklas Cassel
2018-05-25 12:36 ` Niklas Cassel
2018-05-25 12:50 ` Bob Copeland
2018-05-25 12:50 ` Bob Copeland
2018-05-25 14:21 ` Niklas Cassel
2018-05-25 14:21 ` Niklas Cassel
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=20180524155034.xse7cfm5figfktuj@localhost \
--to=me@bobcopeland.com \
--cc=adrian.chadd@gmail.com \
--cc=ath10k@lists.infradead.org \
--cc=davem@davemloft.net \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=niklas.cassel@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.