Re: [PATCH v3 2/2] powerpc/pseries: Wait for completion of hotplug events during PRRN handling
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-08-10 11:47:06
Hi Nathan, Nathan Fontenot [off-list ref] writes:
On 08/08/2018 10:29 AM, John Allen wrote:quoted
While handling PRRN events, the time to handle the actual hotplug events dwarfs the time it takes to perform the device tree updates and queue the hotplug events. In the case that PRRN events are being queued continuously, hotplug events have been observed to be queued faster than the kernel can actually handle them. This patch avoids the problem by waiting for a hotplug request to complete before queueing more hotplug events. Signed-off-by: John Allen <redacted>In the V2 thread it was mentioned that we could just call the DLPAR operation directly instead of going through the workqueue. I have written a patch to do this that also cleans up some of the request handling. requests that come through the hotplug interrupt still use the workqueue. The other requests, PRRN and sysfs, just call the dlpar handler directly. This eliminates the need for a wait conditional and return code handling in the workqueue handler and should solve the issue that John solves with his patch. This still needs testing but wanted to get people's thoughts.
It looks great to me. I guess I thought we'd need to add a lock, but I think you're right that the existing device hotplug lock will work. So if this survives a bit of testing then I'd love to merge it. cheers