From: Bjorn Helgaas <helgaas@kernel.org>
To: "Krzysztof Wilczyński" <kw@linux.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Bin Lai <robinlai@tencent.com>,
Jiang Biao <benbjiang@tencent.com>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: Allow scheduling to take place in proc_bus_pci_read()
Date: Fri, 20 Aug 2021 16:23:34 -0500 [thread overview]
Message-ID: <20210820212334.GA3360706@bjorn-Precision-5520> (raw)
In-Reply-To: <20210815150824.96773-1-kw@linux.com>
On Sun, Aug 15, 2021 at 03:08:24PM +0000, Krzysztof Wilczyński wrote:
> PCI configuration space reads from the /proc/bus/pci for a particular
> device, depending on the underlying hardware, can often take several
> milliseconds to complete.
>
> Thus, add a schedule point in proc_bus_pci_read() to reduce the maximum
> latency.
>
> A similar change has already been completed in the past for the sysfs
> counterpart in the commit 2ce02a864ac1 ("PCI: Add schedule point in
> pci_read_config()").
>
> Link: https://lore.kernel.org/r/20200824052025.48362-1-benbjiang@tencent.com
> Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
Applied to pci/misc for v5.15, thanks!
I tweaked your subject line to match 2ce02a864ac1:
PCI: Add schedule point in proc_bus_pci_read()
> ---
> drivers/pci/proc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
> index d32fbfc93ea9..cb18f8a13ab6 100644
> --- a/drivers/pci/proc.c
> +++ b/drivers/pci/proc.c
> @@ -83,6 +83,7 @@ static ssize_t proc_bus_pci_read(struct file *file, char __user *buf,
> buf += 4;
> pos += 4;
> cnt -= 4;
> + cond_resched();
> }
>
> if (cnt >= 2) {
> --
> 2.32.0
>
prev parent reply other threads:[~2021-08-20 21:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-15 15:08 [PATCH] PCI: Allow scheduling to take place in proc_bus_pci_read() Krzysztof Wilczyński
2021-08-20 21:23 ` Bjorn Helgaas [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=20210820212334.GA3360706@bjorn-Precision-5520 \
--to=helgaas@kernel.org \
--cc=benbjiang@tencent.com \
--cc=bhelgaas@google.com \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=robinlai@tencent.com \
/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