From: Alexandra Winter <wintera@linux.ibm.com>
To: Alexander Gordeev <agordeev@linux.ibm.com>,
Halil Pasic <pasic@linux.ibm.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Thorsten Winkler <twinkler@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Sebastian Ott <sebott@linux.ibm.com>,
Ursula Braun <ubraun@linux.ibm.com>,
netdev@vger.kernel.org, linux-s390@vger.kernel.org,
linux-kernel@vger.kernel.org,
Aliaksei Makarau <Aliaksei.Makarau@ibm.com>,
Mahanta Jambigi <mjambigi@linux.ibm.com>
Subject: Re: [PATCH 1/1] s390/ism: fix concurrency management in ism_cmd()
Date: Mon, 21 Jul 2025 10:17:30 +0200 [thread overview]
Message-ID: <af7298f5-08a0-4492-834d-a348144c909e@linux.ibm.com> (raw)
In-Reply-To: <6b09d374-528a-4a6d-a6c6-2be840e8a52b-agordeev@linux.ibm.com>
On 21.07.25 09:30, Alexander Gordeev wrote:
> On Sun, Jul 20, 2025 at 11:11:09PM +0200, Halil Pasic wrote:
>
> Hi Halil,
>
> ...
>> @@ -129,7 +129,9 @@ static int ism_cmd(struct ism_dev *ism, void *cmd)
>> {
>> struct ism_req_hdr *req = cmd;
>> struct ism_resp_hdr *resp = cmd;
>> + unsigned long flags;
>>
>> + spin_lock_irqsave(&ism->cmd_lock, flags);
>
> I only found smcd_handle_irq() scheduling a tasklet, but no commands issued.
> Do we really need disable interrupts?
You are right in current code, the interrupt and event handlers of ism and smcd
never issue a control command that calls ism_cmd().
OTOH, future ism clients could do that.
The control commands are not part of the data path, but of connection establish.
So I don't really expect a performance impact.
I have it on my ToDo list, to change this to threaded interrupts in the future.
So no strong opinion on my side.
Simple spin_lock is fine with me.
>
>> __ism_write_cmd(ism, req + 1, sizeof(*req), req->len - sizeof(*req));
>> __ism_write_cmd(ism, req, 0, sizeof(*req));
>>
>> @@ -143,6 +145,7 @@ static int ism_cmd(struct ism_dev *ism, void *cmd)
>> }
>> __ism_read_cmd(ism, resp + 1, sizeof(*resp), resp->len - sizeof(*resp));
>> out:
>> + spin_unlock_irqrestore(&ism->cmd_lock, flags);
>> return resp->ret;
>> }
>>
> ...
>
> Thanks!
>
next prev parent reply other threads:[~2025-07-21 8:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-20 21:11 [PATCH 1/1] s390/ism: fix concurrency management in ism_cmd() Halil Pasic
2025-07-21 7:30 ` Alexander Gordeev
2025-07-21 8:17 ` Alexandra Winter [this message]
2025-07-21 9:56 ` Simon Horman
2025-07-21 10:35 ` Halil Pasic
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=af7298f5-08a0-4492-834d-a348144c909e@linux.ibm.com \
--to=wintera@linux.ibm.com \
--cc=Aliaksei.Makarau@ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=andrew+netdev@lunn.ch \
--cc=borntraeger@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mjambigi@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=sebott@linux.ibm.com \
--cc=svens@linux.ibm.com \
--cc=twinkler@linux.ibm.com \
--cc=ubraun@linux.ibm.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