[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250917000347.52369-1-o-takashi@sakamocchi.jp>
Date: Wed, 17 Sep 2025 09:03:44 +0900
From: Takashi Sakamoto <o-takashi@...amocchi.jp>
To: linux1394-devel@...ts.sourceforge.net
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 0/3] firewire: core: serialize topology building and bus manager work
Hi,
Two functions, fw_core_handle_bus_reset() and bm_work(), acquire fw_card
spin lock, however each purpose is different. The former function manages
to update some members of fw_card, and the latter function manages just to
access these members of fw_card. This reflects that the members are valid
during current bus generation once determined by the former function.
Current implementation schedules a work item for the latter function under
acquiring the spin lock in the former function. This could causes the
latter function to be stalled by spinning until the former function
finishes, depending on the timing to invoke the work item.
This patchset suppresses the stalling by serializing these two
functions. In former commits, the former function is invoked by IRQ
thread, thus sleep-able. The former function disables the work item
synchronously, then acquires the spin lock to update the members of
fw_card. After that, it releases the spin lock, then enable and schedule
the work item. The latter function is free from the spin lock.
Takashi Sakamoto (3):
firewire: core: schedule bm_work item outside of spin lock
firewire: core: disable bus management work temporarily during
updating topology
firewire: core: shrink critical section of fw_card spinlock in bm_work
drivers/firewire/core-card.c | 30 ++++++++----------------------
drivers/firewire/core-topology.c | 11 ++++++++++-
2 files changed, 18 insertions(+), 23 deletions(-)
base-commit: e0cda0dd12e08ecb8d26b8d78dc63e67e7069510
--
2.48.1
Powered by blists - more mailing lists