From: Takashi Iwai <tiwai@suse.de>
To: "Ali Ahmet Memiş" <aliamemis@disroot.org>
Cc: Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: seq: Wait for one RCU grace period when deleting all ports
Date: Sun, 11 Oct 2026 10:49:12 +0200 [thread overview]
Message-ID: <87ld84ipvb.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261010222543.1470723-1-aliamemis@disroot.org>
On Sun, 11 Oct 2026 00:25:40 +0200,
Ali Ahmet Memiş wrote:
>
> Since the port list was converted to RCU, snd_seq_delete_all_ports()
> calls synchronize_rcu() once per port under register_mutex. Closing a
> client with 254 ports now takes about 1.6s and every other client
> open or close waits for it.
>
> Unlink all ports first, wait for a single grace period and then free
> them.
>
> Fixes: 4c252fbc06d6 ("ALSA: seq: Use RCU for the client port list")
> Signed-off-by: Ali Ahmet Memiş <aliamemis@disroot.org>
> ---
> Tested in QEMU on v7.3 with lockdep and KASAN. Closing a client
> with 254 ports went from ~1.6s to ~0.02s, and a second client doing
> open/close in a loop no longer stalls. Closing the client while other
> clients send to and query its ports ran 100 rounds without reports.
Applied now to for-next branch.
Sounds like a good performance improvement.
thanks,
Takashi
prev parent reply other threads:[~2026-10-11 8:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-10 22:25 [PATCH] ALSA: seq: Wait for one RCU grace period when deleting all ports Ali Ahmet Memiş
2026-10-11 8:49 ` Takashi Iwai [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=87ld84ipvb.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=aliamemis@disroot.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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