Skip to contentSkip to conversation

New: [BISECTED] 250 ms system suspend performance regression

Bug 216352 [email protected] 1 participant 8 messages Aug 11, 2022 – Aug 12, 2022 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=216352

Bug ID: 216352
Summary: [BISECTED] 250 ms system suspend performance
regression
Product: Drivers
Version: 2.5
Kernel Version: 5.19
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Bluetooth
Assignee: [email protected]
Reporter: [email protected]
Regression: No

My skylake laptop suspends with median performance of 427 ms up through 5.19-rc8.

After this commit, median performance slows to 684 ms in 5.19.0.

ef61b6ea154464fefd8a6712d7a3b43b445c3d4a is the first bad commit commit ef61b6ea154464fefd8a6712d7a3b43b445c3d4a

Author: Abhishek Pandit-Subedi <[email protected]>
Date:   Mon Jul 25 15:34:21 2022 -0700

Bluetooth: Always set event mask on suspend

When suspending, always set the event mask once disconnects are successful. Otherwise, if wakeup is disallowed, the event mask is not set before suspend continues and can result in an early wakeup.

Fixes 182ee45da083 ("Bluetooth: hci_sync: Rework hci_suspend_notifier")
 net/bluetooth/hci_sync.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#2 lore raw

[Bug 216352] [BISECTED] 250 ms system suspend performance regression

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216352

--- Comment #1 from Len Brown ([email protected]) ---
Created attachment 301548
--> https://bugzilla.kernel.org/attachment.cgi?id=301548&action=edit
sleepgraph 5.19-rc8: 411ms suspend

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#3 lore raw

[Bug 216352] [BISECTED] 250 ms system suspend performance regression

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216352

--- Comment #2 from Len Brown ([email protected]) ---
Created attachment 301549
--> https://bugzilla.kernel.org/attachment.cgi?id=301549&action=edit
sleepgraph 5.19.0: 686 ms suspend

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#4 lore raw

[Bug 216352] [BISECTED] 250 ms system suspend performance regression

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216352

--- Comment #3 from Len Brown ([email protected]) --- Comparing the attached sleepgraph output of 5.19 to 5.19-rc8...

acpi_ps_execute_method(PCI.XHC._PS0) plus
msleep 120
msleep 40
msleep 40
msleep 10

have, as a group, shifted left from the suspend phase, where they used to overlap with other tasks, into the suspend_prepare phase, where they are the slowest operation.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#5 lore raw

[Bug 216352] [BISECTED] 250 ms system suspend performance regression

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216352

--- Comment #4 from Luiz Von Dentz ([email protected]) --- (In reply to Len Brown from comment #3)

Quoted 8 lines

Comparing the attached sleepgraph output of 5.19 to 5.19-rc8...

acpi_ps_execute_method(PCI.XHC._PS0) plus
msleep 120
msleep 40
msleep 40
msleep 10

Quoted 4 lines

have, as a group, shifted left from the suspend phase, where they used to overlap with other tasks, into the suspend_prepare phase, where they are the slowest operation.

We can probably return to the way it was if we detect the event mask needs updating or not by checking if there is any connections, anyway if you attempt to suspend while there is a bluetooth connection this extra latency would probably reappear since in that case we need to update the event mask in order to not wakeup the system by events such Disconnect Complete, not sure if this is acceptable or perhaps the root cause is that notifiers are serialized so while these commands are pending it prevents other notifiers to be run?

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#6 lore raw

[Bug 216352] [BISECTED] 250 ms system suspend performance regression

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216352

--- Comment #5 from Luiz Von Dentz ([email protected]) --- Created attachment 301553
--> https://bugzilla.kernel.org/attachment.cgi?id=301553&action=edit
Bluetooth: hci_sync: Fix suspend performance regression

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.