projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1901f8c
)
PCI: Add schedule point in proc_bus_pci_read()
author
Krzysztof Wilczyński
<kw@linux.com>
Sun, 15 Aug 2021 15:08:24 +0000
(15:08 +0000)
committer
Bjorn Helgaas
<bhelgaas@google.com>
Fri, 20 Aug 2021 21:20:30 +0000
(16:20 -0500)
PCI configuration space reads from /proc/bus/pci can often take several
milliseconds to complete.
Add a schedule point in proc_bus_pci_read() to reduce the maximum latency.
A similar change was made for sysfs by
2ce02a864ac1
("PCI: Add schedule
point in pci_read_config()").
Link:
https://lore.kernel.org/r/20200824052025.48362-1-benbjiang@tencent.com
Link:
https://lore.kernel.org/r/20210815150824.96773-1-kw@linux.com
Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/proc.c
patch
|
blob
|
history
diff --git
a/drivers/pci/proc.c
b/drivers/pci/proc.c
index 9bab07302bbf20dad28b0679be9edd4ae0c059cf..535076eff5f67d701f04ebcee0651d5ebf994e7d 100644
(file)
--- 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) {