Re: [PATCH 1/1] s390/ism: fix concurrency management in ism_cmd()
From: Halil Pasic
Date: Mon Jul 21 2025 - 06:36:22 EST
On Mon, 21 Jul 2025 10:17:30 +0200
Alexandra Winter <wintera@xxxxxxxxxxxxx> wrote:
> >> + 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.
I agree!
My train of thought was, lets go with the safe option and look if the
maintainers want something different. I didn't feel confident about
trying to understand the details including the contract between the
clients and the driver.
I will change to simple spin_lock() at the end of the day if nobody
objects since the sentiment seems to be going into this direction and
spin a v2 no later than on Wed.
Thanks for having a look!
Regards,
Halil