All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryo Takakura <ryotkkr98@gmail.com>
To: lgoncalv@redhat.com, bigeasy@linutronix.de, kbusch@kernel.org
Cc: bhelgaas@google.com, jonathan.derrick@linux.dev, kw@linux.com,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-rt-devel@lists.linux.dev, lpieralisi@kernel.org,
	manivannan.sadhasivam@linaro.org, nirmal.patel@linux.intel.com,
	robh@kernel.org, rostedt@goodmis.org
Subject: Re: [PATCH v2] PCI: vmd: Fix spinlock usage on config access for RT kernel
Date: Thu, 19 Dec 2024 09:53:36 +0900	[thread overview]
Message-ID: <20241219005336.8603-1-ryotkkr98@gmail.com> (raw)
In-Reply-To: <Z2L5u40lDvK7_Gdb@uudg.org>

Hi all!

on Wed, 18 Dec 2024 13:35:07 -0300, Luis Claudio R. Goncalves wrote:
>On Wed, Dec 18, 2024 at 08:57:53AM -0700, Keith Busch wrote:
>> On Wed, Dec 18, 2024 at 04:48:38PM +0100, Sebastian Andrzej Siewior wrote:
>> > On 2024-12-18 08:36:54 [-0700], Keith Busch wrote:
>> > > On Wed, Dec 18, 2024 at 08:59:51PM +0900, Ryo Takakura wrote:
>> > > > PCI config access is locked with pci_lock which serializes
>> > > > pci_user/bus_write_config*() and pci_user/bus_read_config*().
>> > > > The subsequently invoked vmd_pci_write() and vmd_pci_read() are also
>> > > > serialized as they are only invoked by them respectively.
>> > > > 
>> > > > Remove cfg_lock which is taken by vmd_pci_write() and vmd_pci_read()
>> > > > for their serialization as its already serialized by pci_lock.
>> > > 
>> > > That's only true if CONFIG_PCI_LOCKLESS_CONFIG isn't set, so pci_lock
>> > > won't help with concurrent kernel config access in such a setup. I think
>> > > the previous change to raw lock proposal was the correct approach.
>> > 
>> > I overlooked that. Wouldn't it make sense to let the vmd driver select
>> > that option rather than adding/ having a lock for the same purpose?
>> 
>> The arch/x86/Kconfig always selects PCI_LOCKESS_CONFIG, so I don't think
>> the vmd driver can require it be turned off. Besides, no need to punish
>> all PCI access if only this device requires it be serialized.
>
>Sorry, I also missed that and induced Ryo Takakura to rewrite the patch.

My apologies I missed that as well.
I'll send the first version of the patch once again!

>Luis

Sincerely,
Ryo Takakura

  reply	other threads:[~2024-12-19  0:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18 11:59 [PATCH v2] PCI: vmd: Fix spinlock usage on config access for RT kernel Ryo Takakura
2024-12-18 13:17 ` Luis Claudio R. Goncalves
2024-12-18 15:36 ` Keith Busch
2024-12-18 15:48   ` Sebastian Andrzej Siewior
2024-12-18 15:57     ` Keith Busch
2024-12-18 16:03       ` Sebastian Andrzej Siewior
2024-12-18 16:35       ` Luis Claudio R. Goncalves
2024-12-19  0:53         ` Ryo Takakura [this message]
2024-12-19  0:55   ` Ryo Takakura

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=20241219005336.8603-1-ryotkkr98@gmail.com \
    --to=ryotkkr98@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=bigeasy@linutronix.de \
    --cc=jonathan.derrick@linux.dev \
    --cc=kbusch@kernel.org \
    --cc=kw@linux.com \
    --cc=lgoncalv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=nirmal.patel@linux.intel.com \
    --cc=robh@kernel.org \
    --cc=rostedt@goodmis.org \
    /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 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.