All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH 1/4] ath10k:  provide firmware crash info via debugfs.
Date: Sat, 07 Jun 2014 08:32:49 -0700	[thread overview]
Message-ID: <539330A1.9050307@candelatech.com> (raw)
In-Reply-To: <874mzwkher.fsf@kamboji.qca.qualcomm.com>



On 06/07/2014 05:55 AM, Kalle Valo wrote:
> Ben Greear <greearb@candelatech.com> writes:
>
>> On 06/05/2014 11:10 PM, Kalle Valo wrote:
>>> Ben Greear <greearb@candelatech.com> writes:
>>>
>>>> I did not do this because I figure we will want ethtool support w/out
>>>> forcing debugfs to be enabled someday soon.
>>>
>>> When we add ethtool support, it's easy to move these back. And then we
>>> need to move the code out from debug.c anyway.
>>
>> Well, it seems like needless churn and makes it harder to follow
>> 'git blame' when you move big chunks around.
>
> I don't care about 'git blame', the actual code is far more important to
> me. If git blame is so important, someone else can improve 'git blame'
> to detect moving code chunks.
>
>> We would not have to move the code out of debug.c, but if you do want
>> it moved, lets pick that place now and just put it there to begin
>> with.
>
> Code in debug.c should have the data it owns in struct ath10k_debug.

Ok, I'll move the data structs to the debug logic for next version of the patch.


>>>> I'm a bit leery of adding spin-locks in the dump routine just for
>>>> this, but I can add and use a new spin-lock if you prefer.
>>>
>>> Why a new spinlock? I didn't review the locking requirements, but I
>>> would first check ar->data_lock can be used.
>>
>> I think it has to be a spin-lock because the crash dump is gathered
>> in the irq handler, so I can't use a mutex as far as I know...
>>
>> I'll work on adding such a lock today.
>
> I asked why add a _new_ spinlock as ar->data_lock is already a spinlock.

Surely we do not want to impede traffic flow just to dump debug info?

And, it is easier to review a specific spinlock rather than use one big
global-ish lock and have to review every use of that lock for issues.

My -v2 had a new spinlock for this new debug data.  I'll move it into the
debug struct with the other new data fields for next version.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

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

WARNING: multiple messages have this Message-ID (diff)
From: Ben Greear <greearb@candelatech.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/4] ath10k:  provide firmware crash info via debugfs.
Date: Sat, 07 Jun 2014 08:32:49 -0700	[thread overview]
Message-ID: <539330A1.9050307@candelatech.com> (raw)
In-Reply-To: <874mzwkher.fsf@kamboji.qca.qualcomm.com>



On 06/07/2014 05:55 AM, Kalle Valo wrote:
> Ben Greear <greearb@candelatech.com> writes:
>
>> On 06/05/2014 11:10 PM, Kalle Valo wrote:
>>> Ben Greear <greearb@candelatech.com> writes:
>>>
>>>> I did not do this because I figure we will want ethtool support w/out
>>>> forcing debugfs to be enabled someday soon.
>>>
>>> When we add ethtool support, it's easy to move these back. And then we
>>> need to move the code out from debug.c anyway.
>>
>> Well, it seems like needless churn and makes it harder to follow
>> 'git blame' when you move big chunks around.
>
> I don't care about 'git blame', the actual code is far more important to
> me. If git blame is so important, someone else can improve 'git blame'
> to detect moving code chunks.
>
>> We would not have to move the code out of debug.c, but if you do want
>> it moved, lets pick that place now and just put it there to begin
>> with.
>
> Code in debug.c should have the data it owns in struct ath10k_debug.

Ok, I'll move the data structs to the debug logic for next version of the patch.


>>>> I'm a bit leery of adding spin-locks in the dump routine just for
>>>> this, but I can add and use a new spin-lock if you prefer.
>>>
>>> Why a new spinlock? I didn't review the locking requirements, but I
>>> would first check ar->data_lock can be used.
>>
>> I think it has to be a spin-lock because the crash dump is gathered
>> in the irq handler, so I can't use a mutex as far as I know...
>>
>> I'll work on adding such a lock today.
>
> I asked why add a _new_ spinlock as ar->data_lock is already a spinlock.

Surely we do not want to impede traffic flow just to dump debug info?

And, it is easier to review a specific spinlock rather than use one big
global-ish lock and have to review every use of that lock for issues.

My -v2 had a new spinlock for this new debug data.  I'll move it into the
debug struct with the other new data fields for next version.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

  reply	other threads:[~2014-06-07 15:33 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 18:01 [PATCH 1/4] ath10k: provide firmware crash info via debugfs greearb
2014-06-04 18:01 ` greearb
2014-06-04 18:01 ` [PATCH 2/4] ath10k: save firmware debug log messages greearb
2014-06-04 18:01   ` greearb
2014-06-04 18:01 ` [PATCH 3/4] ath10k: save firmware stack upon firmware crash greearb
2014-06-04 18:01   ` greearb
2014-06-04 18:01 ` [PATCH 4/4] ath10k: Dump exception stack contents on " greearb
2014-06-04 18:01   ` greearb
2014-06-05 16:18 ` [PATCH 1/4] ath10k: provide firmware crash info via debugfs Kalle Valo
2014-06-05 16:18   ` Kalle Valo
2014-06-05 18:25   ` Ben Greear
2014-06-05 18:25     ` Ben Greear
2014-06-06  6:10     ` Kalle Valo
2014-06-06  6:10       ` Kalle Valo
2014-06-06  6:30       ` Michal Kazior
2014-06-06  6:30         ` Michal Kazior
2014-06-06  8:55         ` Kalle Valo
2014-06-06  8:55           ` Kalle Valo
2014-06-06  9:45           ` Michal Kazior
2014-06-06  9:45             ` Michal Kazior
2014-06-06 16:11       ` Ben Greear
2014-06-06 16:11         ` Ben Greear
2014-06-07 12:55         ` Kalle Valo
2014-06-07 12:55           ` Kalle Valo
2014-06-07 15:32           ` Ben Greear [this message]
2014-06-07 15:32             ` Ben Greear
2014-06-08  8:28             ` Kalle Valo
2014-06-08  8:28               ` Kalle Valo
2014-06-08 15:40               ` Ben Greear
2014-06-08 15:40                 ` Ben Greear
2014-06-06  6:55 ` Kalle Valo
2014-06-06  6:55   ` Kalle Valo
2014-06-06 16:01   ` Ben Greear
2014-06-06 16:01     ` Ben Greear
2014-06-07 12:50     ` Kalle Valo
2014-06-07 12:50       ` Kalle Valo
2014-06-06  9:33 ` Kalle Valo
2014-06-06  9:33   ` Kalle Valo
2014-06-06 17:06   ` Ben Greear
2014-06-06 17:06     ` Ben Greear
2014-06-07 12:57     ` Kalle Valo
2014-06-07 12:57       ` Kalle Valo
2014-06-07 15:29       ` Ben Greear
2014-06-07 15:29         ` Ben Greear
2014-06-08  8:12         ` Kalle Valo
2014-06-08  8:12           ` Kalle Valo

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=539330A1.9050307@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=ath10k@lists.infradead.org \
    --cc=kvalo@qca.qualcomm.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.