All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] firewire: core: serialize topology building and bus manager work
@ 2025-09-17  0:03 Takashi Sakamoto
  2025-09-17  0:03 ` [PATCH 1/3] firewire: core: schedule bm_work item outside of spin lock Takashi Sakamoto
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Takashi Sakamoto @ 2025-09-17  0:03 UTC (permalink / raw)
  To: linux1394-devel; +Cc: linux-kernel

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-09-17 12:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-17  0:03 [PATCH 0/3] firewire: core: serialize topology building and bus manager work Takashi Sakamoto
2025-09-17  0:03 ` [PATCH 1/3] firewire: core: schedule bm_work item outside of spin lock Takashi Sakamoto
2025-09-17  0:03 ` [PATCH 2/3] firewire: core: disable bus management work temporarily during updating topology Takashi Sakamoto
2025-09-17  0:03 ` [PATCH 3/3] firewire: core: shrink critical section of fw_card spinlock in bm_work Takashi Sakamoto
2025-09-17 12:42 ` [PATCH 0/3] firewire: core: serialize topology building and bus manager work Takashi Sakamoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.