[PATCH 0/6] firewire: core: partition fw_card spinlock

Takashi Sakamoto posted 6 patches 2 weeks, 2 days ago
drivers/firewire/core-card.c        |  23 +++--
drivers/firewire/core-cdev.c        |  27 ++++--
drivers/firewire/core-topology.c    |  92 ++++++++++----------
drivers/firewire/core-transaction.c | 128 ++++++++++++++++++----------
include/linux/firewire.h            |  33 ++++---
5 files changed, 185 insertions(+), 118 deletions(-)
[PATCH 0/6] firewire: core: partition fw_card spinlock
Posted by Takashi Sakamoto 2 weeks, 2 days ago
Hi,

The current implementation uses the fw_card spinlock for a wide range of
purposes, which goes against the theory that the type of lock should
protect critical sections as narrowly as possible.

This patchset adds some spinlocks for specific purposes, therefore
partitioning the existing wide-purpose lock.

Takashi Sakamoto (6):
  firewire: core: use scoped_guard() to manage critical section to
    update topology
  firewire: core: maintain phy packet receivers locally in cdev layer
  firewire: core: use spin lock specific to topology map
  firewire: core: use spin lock specific to transaction
  firewire: core: use spin lock specific to timer for split transaction
  firewire: core: annotate fw_destroy_nodes with must-hold-lock

 drivers/firewire/core-card.c        |  23 +++--
 drivers/firewire/core-cdev.c        |  27 ++++--
 drivers/firewire/core-topology.c    |  92 ++++++++++----------
 drivers/firewire/core-transaction.c | 128 ++++++++++++++++++----------
 include/linux/firewire.h            |  33 ++++---
 5 files changed, 185 insertions(+), 118 deletions(-)


base-commit: 931383f161c066ac5fda12035540498931739842
-- 
2.48.1
Re: [PATCH 0/6] firewire: core: partition fw_card spinlock
Posted by Takashi Sakamoto 2 weeks, 1 day ago
On Tue, Sep 16, 2025 at 08:47:41AM +0900, Takashi Sakamoto wrote:
> Hi,
> 
> The current implementation uses the fw_card spinlock for a wide range of
> purposes, which goes against the theory that the type of lock should
> protect critical sections as narrowly as possible.
> 
> This patchset adds some spinlocks for specific purposes, therefore
> partitioning the existing wide-purpose lock.
> 
> Takashi Sakamoto (6):
>   firewire: core: use scoped_guard() to manage critical section to
>     update topology
>   firewire: core: maintain phy packet receivers locally in cdev layer
>   firewire: core: use spin lock specific to topology map
>   firewire: core: use spin lock specific to transaction
>   firewire: core: use spin lock specific to timer for split transaction
>   firewire: core: annotate fw_destroy_nodes with must-hold-lock
> 
>  drivers/firewire/core-card.c        |  23 +++--
>  drivers/firewire/core-cdev.c        |  27 ++++--
>  drivers/firewire/core-topology.c    |  92 ++++++++++----------
>  drivers/firewire/core-transaction.c | 128 ++++++++++++++++++----------
>  include/linux/firewire.h            |  33 ++++---
>  5 files changed, 185 insertions(+), 118 deletions(-)

Applied to for-next branch.


Regards

Takashi Sakamoto