All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Valo, Kalle" <kvalo@qca.qualcomm.com>
To: "greearb@candelatech.com" <greearb@candelatech.com>
Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 2/3] ath10k:  Grab rcu_read_lock before the txqs spinlock.
Date: Fri, 9 Sep 2016 13:36:33 +0000	[thread overview]
Message-ID: <87k2elp53z.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1471569995-10028-2-git-send-email-greearb@candelatech.com> (greearb@candelatech.com's message of "Thu, 18 Aug 2016 18:26:34        -0700")

greearb@candelatech.com writes:

> From: Ben Greear <greearb@candelatech.com>
>
> I was seeing some spin-lock hangs in this area of the code,
> and it seems more proper to do the rcu-read-lock outside of
> the spin lock.  I am not sure how much this matters, however.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
>  drivers/net/wireless/ath/ath10k/mac.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless=
/ath/ath10k/mac.c
> index 916119c..d96c06e 100644
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -4307,8 +4307,8 @@ void ath10k_mac_tx_push_pending(struct ath10k *ar)
>  	int max;
>  	int loop_max =3D 2000;
> =20
> -	spin_lock_bh(&ar->txqs_lock);
>  	rcu_read_lock();
> +	spin_lock_bh(&ar->txqs_lock);
> =20
>  	last =3D list_last_entry(&ar->txqs, struct ath10k_txq, list);
>  	while (!list_empty(&ar->txqs)) {
> @@ -4342,8 +4342,8 @@ void ath10k_mac_tx_push_pending(struct ath10k *ar)
>  			break;
>  	}
> =20
> -	rcu_read_unlock();
>  	spin_unlock_bh(&ar->txqs_lock);
> +	rcu_read_unlock();

I'm no RCU expert but this isn't making any sense. Maybe it changes
timings on your kernel so that it hides the real problem?

--=20
Kalle Valo=

WARNING: multiple messages have this Message-ID (diff)
From: "Valo, Kalle" <kvalo@qca.qualcomm.com>
To: "greearb@candelatech.com" <greearb@candelatech.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH 2/3] ath10k: Grab rcu_read_lock before the txqs spinlock.
Date: Fri, 9 Sep 2016 13:36:33 +0000	[thread overview]
Message-ID: <87k2elp53z.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1471569995-10028-2-git-send-email-greearb@candelatech.com> (greearb@candelatech.com's message of "Thu, 18 Aug 2016 18:26:34	-0700")

greearb@candelatech.com writes:

> From: Ben Greear <greearb@candelatech.com>
>
> I was seeing some spin-lock hangs in this area of the code,
> and it seems more proper to do the rcu-read-lock outside of
> the spin lock.  I am not sure how much this matters, however.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
>  drivers/net/wireless/ath/ath10k/mac.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
> index 916119c..d96c06e 100644
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -4307,8 +4307,8 @@ void ath10k_mac_tx_push_pending(struct ath10k *ar)
>  	int max;
>  	int loop_max = 2000;
>  
> -	spin_lock_bh(&ar->txqs_lock);
>  	rcu_read_lock();
> +	spin_lock_bh(&ar->txqs_lock);
>  
>  	last = list_last_entry(&ar->txqs, struct ath10k_txq, list);
>  	while (!list_empty(&ar->txqs)) {
> @@ -4342,8 +4342,8 @@ void ath10k_mac_tx_push_pending(struct ath10k *ar)
>  			break;
>  	}
>  
> -	rcu_read_unlock();
>  	spin_unlock_bh(&ar->txqs_lock);
> +	rcu_read_unlock();

I'm no RCU expert but this isn't making any sense. Maybe it changes
timings on your kernel so that it hides the real problem?

-- 
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  parent reply	other threads:[~2016-09-09 13:36 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19  1:26 [PATCH 1/3] ath10k: Ensure there are no stale ar->txqs entries greearb
2016-08-19  1:26 ` greearb
2016-08-19  1:26 ` [PATCH 2/3] ath10k: Grab rcu_read_lock before the txqs spinlock greearb
2016-08-19  1:26   ` greearb
2016-08-19  3:01   ` Manoharan, Rajkumar
2016-08-19  3:01     ` Manoharan, Rajkumar
2016-08-19  3:28     ` Ben Greear
2016-08-19  3:28       ` Ben Greear
2016-09-09 13:36   ` Valo, Kalle [this message]
2016-09-09 13:36     ` Valo, Kalle
2016-09-09 14:47     ` Ben Greear
2016-09-09 14:47       ` Ben Greear
2016-09-12  6:41       ` Johannes Berg
2016-09-12  6:41         ` Johannes Berg
2016-09-12 16:37         ` Ben Greear
2016-09-12 16:37           ` Ben Greear
2016-08-19  1:26 ` [PATCH 3/3] ath10k: Improve logging message greearb
2016-08-19  1:26   ` greearb
2016-08-19  6:35   ` Mohammed Shafi Shajakhan
2016-08-19  6:35     ` Mohammed Shafi Shajakhan
2016-09-09 13:30     ` Valo, Kalle
2016-09-09 13:30       ` Valo, Kalle
2016-09-13 12:29   ` [3/3] " Kalle Valo
2016-09-13 12:29     ` Kalle Valo
2016-08-19  6:59 ` [PATCH 1/3] ath10k: Ensure there are no stale ar->txqs entries Michal Kazior
2016-08-19  6:59   ` Michal Kazior
2016-08-19 13:34   ` Ben Greear
2016-08-19 13:34     ` Ben Greear
2016-12-01 22:52     ` Ben Greear
2016-12-01 22:52       ` Ben Greear
2016-12-02  0:24       ` Ben Greear
2016-12-02  0:24         ` Ben Greear
2016-12-05  8:50         ` Michal Kazior
2016-12-05  8:50           ` Michal Kazior
2016-12-05 18:19           ` Ben Greear
2016-12-05 18:19             ` Ben Greear
2016-09-09 17:25 ` Felix Fietkau
2016-09-09 17:25   ` Felix Fietkau
2016-09-09 17:46   ` Ben Greear
2016-09-09 17:46     ` Ben Greear

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=87k2elp53z.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=greearb@candelatech.com \
    --cc=linux-wireless@vger.kernel.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.