mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: linux1394-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] firewire: core: serialize topology building and bus manager work
Date: Wed, 17 Sep 2025 21:42:08 +0900	[thread overview]
Message-ID: <20250917124208.GA56969@workstation.local> (raw)
In-Reply-To: <20250917000347.52369-1-o-takashi@sakamocchi.jp>

On Wed, Sep 17, 2025 at 09:03:44AM +0900, Takashi Sakamoto wrote:
> 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(-)

Applied to for-next branch.


Regards

Takashi Sakamoto

      parent reply	other threads:[~2025-09-17 12:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
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 ` Takashi Sakamoto [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=20250917124208.GA56969@workstation.local \
    --to=o-takashi@sakamocchi.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    /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

all inboxes | Powered by JetHome®