From: Niklas Schnelle <schnelle@linux.ibm.com>
To: Alexandra Winter <wintera@linux.ibm.com>,
Paolo Abeni <pabeni@redhat.com>,
Wenjia Zhang <wenjia@linux.ibm.com>,
Jan Karcher <jaka@linux.ibm.com>,
Stefan Raspl <raspl@linux.ibm.com>,
"David S. Miller" <davem@davemloft.net>
Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 1/3] s390/ism: Fix locking for forwarding of IRQs and events to clients
Date: Fri, 07 Jul 2023 16:08:58 +0200 [thread overview]
Message-ID: <1f6e3432f8626d8f3d2de99e7f2f51c1fdf4e58c.camel@linux.ibm.com> (raw)
In-Reply-To: <8ec43fe6-218c-189f-4a90-73e482a0c5ff@linux.ibm.com>
On Fri, 2023-07-07 at 15:37 +0200, Alexandra Winter wrote:
>
> On 07.07.23 12:56, Niklas Schnelle wrote:
> [...]
> > Instead of expanding the use of the clients_lock further add a separate
> > array in struct ism_dev which references clients subscribed to the
> > device's events and IRQs. This array is protected by ism->lock which is
> > already taken in ism_handle_irq() and can be taken outside the IRQ
> > handler when adding/removing subscribers or the accessing
>
> typo? s/the accessing/accessing the/g
>
> > ism->sba_client_arr[]. This also means that the clients_lock is no
> > longer taken in IRQ context.
> >
>
> [...]
>
> > @@ -554,6 +577,7 @@ static void ism_dev_add_work_func(struct work_struct *work)
> > add_work);
> >
> > client->add(client->tgt_ism);
> > + ism_setup_forwarding(client, client->tgt_ism);
> > atomic_dec(&client->tgt_ism->add_dev_cnt);
> > wake_up(&client->tgt_ism->waitq);
> > }
> > @@ -691,7 +715,11 @@ static void ism_dev_remove_work_func(struct work_struct *work)
> > {
> > struct ism_client *client = container_of(work, struct ism_client,
> > remove_work);
> > + unsigned long flags;
> >
> > + spin_lock_irqsave(&client->tgt_ism->lock, flags);
> > + client->tgt_ism->subs[client->id] = NULL;
> > + spin_unlock_irqrestore(&client->tgt_ism->lock, flags);
> > client->remove(client->tgt_ism);
> > atomic_dec(&client->tgt_ism->free_clients_cnt);
> > wake_up(&client->tgt_ism->waitq);
>
> I am not sure I like the new split. here you fix ism_dev_add_work_func() and ism_dev_remove_work_func(),
> that you remove in the next patch. But looks functionally ok to me.
>
>
> Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Thanks for your review. Yeah it's the price we pay for working
intermediate states. I think if you hadn't already invested the time to
look at the conmbined patch it might still be easier to review the
split patches.
next prev parent reply other threads:[~2023-07-07 14:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-07 10:56 [PATCH net v2 0/3] s390/ism: Fixes to client handling Niklas Schnelle
2023-07-07 10:56 ` [PATCH net v2 1/3] s390/ism: Fix locking for forwarding of IRQs and events to clients Niklas Schnelle
2023-07-07 13:37 ` Alexandra Winter
2023-07-07 14:08 ` Niklas Schnelle [this message]
2023-07-07 10:56 ` [PATCH net v2 2/3] s390/ism: Fix and simplify add()/remove() callback handling Niklas Schnelle
2023-07-07 10:56 ` [PATCH net v2 3/3] s390/ism: Do not unregister clients with registered DMBs Niklas Schnelle
2023-07-07 13:46 ` [PATCH net v2 0/3] s390/ism: Fixes to client handling Alexandra Winter
2023-07-07 20:19 ` Wenjia Zhang
2023-07-08 9:13 ` patchwork-bot+netdevbpf
[not found] <20230707104359.3324039-1-schnelle@linux.ibm.com>
2023-07-07 10:43 ` [PATCH net v2 1/3] s390/ism: Fix locking for forwarding of IRQs and events to clients Niklas Schnelle
2023-07-07 11:08 ` Niklas Schnelle
2023-07-08 13:36 ` Simon Horman
2023-07-10 6:35 ` Alexandra Winter
2023-07-10 7:28 ` Niklas Schnelle
2023-07-10 7:45 ` Simon Horman
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=1f6e3432f8626d8f3d2de99e7f2f51c1fdf4e58c.camel@linux.ibm.com \
--to=schnelle@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=jaka@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=raspl@linux.ibm.com \
--cc=wenjia@linux.ibm.com \
--cc=wintera@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;
as well as URLs for NNTP newsgroup(s).