From: "Pearson, Robert B" <robert.pearson2@hpe.com>
To: Jason Gunthorpe <jgg@nvidia.com>, Bob Pearson <rpearsonhpe@gmail.com>
Cc: "zyjzyj2000@gmail.com" <zyjzyj2000@gmail.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: RE: [PATCH for-next] RDMA/rxe: Convert spin_lock_irqsave to spin_lock
Date: Fri, 28 Oct 2022 17:41:29 +0000 [thread overview]
Message-ID: <MW4PR84MB23075142FFB21BDAE8B18D0BBC329@MW4PR84MB2307.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <Y1wSRyFc809rFohX@nvidia.com>
Yes. Every time it turns out that you really need irqsave locks for rxe it is because some maniac is calling into the verbs API at interrupt level. I have run into this a couple of times.
Bob
-----Original Message-----
From: Jason Gunthorpe <jgg@nvidia.com>
Sent: Friday, October 28, 2022 12:33 PM
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: zyjzyj2000@gmail.com; linux-rdma@vger.kernel.org
Subject: Re: [PATCH for-next] RDMA/rxe: Convert spin_lock_irqsave to spin_lock
On Thu, Oct 06, 2022 at 12:04:55PM -0500, Bob Pearson wrote:
> Currently the rxe driver uses a spin_lock_irqsave call to protect the
> producer end of a completion queue from multiple QPs which may be
> sharing the cq. Since all accesses to the cq are from tasklets this is
> overkill and a simple spin_lock will be sufficient.
A tasklet is a softirq, which means it needs to use the BH suffix for all acquires that are in a process context if it the spinlock is obtained from a tasklet
There is a nice table in Documentation/kernel-hacking/locking.rst that explains this.
Jason
next prev parent reply other threads:[~2022-10-28 17:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 17:04 [PATCH for-next] RDMA/rxe: Convert spin_lock_irqsave to spin_lock Bob Pearson
2022-10-28 17:32 ` Jason Gunthorpe
2022-10-28 17:41 ` Pearson, Robert B [this message]
2022-10-28 17:43 ` Jason Gunthorpe
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=MW4PR84MB23075142FFB21BDAE8B18D0BBC329@MW4PR84MB2307.NAMPRD84.PROD.OUTLOOK.COM \
--to=robert.pearson2@hpe.com \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=rpearsonhpe@gmail.com \
--cc=zyjzyj2000@gmail.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