Netdev List
 help / color / mirror / Atom feed
From: Sean Anderson <sean.anderson@seco.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, Madalin Bucur <madalin.bucur@nxp.com>,
	Camelia Groza <camelia.groza@nxp.com>
Subject: Re: Invalid wait context in qman_update_cgr()
Date: Mon, 27 Mar 2023 15:33:31 -0400	[thread overview]
Message-ID: <d5e3eb49-c968-eb40-1ef9-c10b423c2adf@seco.com> (raw)
In-Reply-To: <20230324125706.ettgc22v5lnu2uh5@skbuf>

On 3/24/23 08:57, Vladimir Oltean wrote:
> On Thu, Mar 23, 2023 at 05:41:04PM -0400, Sean Anderson wrote:
>> Well, it's either this or switch to another function like
>> smp_call_function which calls its callback in softirq/threaded hardirq
>> context.
> 
> Okay.
> 
>> > FWIW, a straight conversion from spinlocks to raw spinlocks produces
>> > this other stack trace. It would be good if you could take a look too.
>> > The lockdep usage tracker is clean prior to commit 914f8b228ede ("soc:
>> > fsl: qbman: Add CGR update function").
>> 
>> Presumably you mean ef2a8d5478b9 ("net: dpaa: Adjust queue depth on rate
>> change"), which is the first commit to introduce a user for
>> qman_update_cgr_safe?
> 
> Not sure what is the objection to what I said here.

The first commit introduces the function with no users. The commit I referenced
adds a user.

>> > [   56.650501] ================================
>> > [   56.654782] WARNING: inconsistent lock state
>> > [   56.659063] 6.3.0-rc2-00993-gdadb180cb16f-dirty #2028 Not tainted
>> > [   56.665170] --------------------------------
>> > [   56.669449] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
>> > [   56.675467] swapper/2/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
>> > [   56.680625] ffff1dc165e124e0 (&portal->cgr_lock){?.+.}-{2:2}, at: qman_update_cgr+0x60/0xfc
>> > [   56.689054] {HARDIRQ-ON-W} state was registered at:
>> > [   56.693943]   lock_acquire+0x1e4/0x2fc
>> > [   56.697720]   _raw_spin_lock+0x5c/0xc0
>> 
>> I think we just need to use raw_spin_lock_irqsave in qman_create_cgr.
> 
> Ok, could you please look at submitting some patches that fix the lockdep issues?

https://lore.kernel.org/linux-arm-kernel/20230327192841.952688-1-sean.anderson@seco.com/

--Sean

      reply	other threads:[~2023-03-27 19:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23 15:39 Invalid wait context in qman_update_cgr() Vladimir Oltean
2023-03-23 15:58 ` Sean Anderson
2023-03-23 18:47   ` Vladimir Oltean
2023-03-23 21:41     ` Sean Anderson
2023-03-24 12:57       ` Vladimir Oltean
2023-03-27 19:33         ` Sean Anderson [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=d5e3eb49-c968-eb40-1ef9-c10b423c2adf@seco.com \
    --to=sean.anderson@seco.com \
    --cc=camelia.groza@nxp.com \
    --cc=madalin.bucur@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=vladimir.oltean@nxp.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