remove WaitEventCustomCounterData
While trying to understand the extent of our spinlock usage, I noticed that
WaitEventCustomCounterData->mutex is unnecessary because the counter is
only ever accessed with WaitEventCustomLock held exclusively. So, here's a
patch to simplify matters a bit. Thoughts?
--
nathan
Attachments:
v1-0001-remove-WaitEventCustomCounterData.patchtext/plain; charset=us-asciiDownload+7-24
On Wed, Jul 08, 2026 at 09:50:33PM -0500, Nathan Bossart wrote:
While trying to understand the extent of our spinlock usage, I noticed that
WaitEventCustomCounterData->mutex is unnecessary because the counter is
only ever accessed with WaitEventCustomLock held exclusively. So, here's a
patch to simplify matters a bit. Thoughts?
Indeed. This removal sounds good to me, thanks.
--
Michael
On Thu, Jul 9, 2026 at 1:04 PM Michael Paquier <michael@paquier.xyz> wrote:
On Wed, Jul 08, 2026 at 09:50:33PM -0500, Nathan Bossart wrote:
While trying to understand the extent of our spinlock usage, I noticed that
WaitEventCustomCounterData->mutex is unnecessary because the counter is
only ever accessed with WaitEventCustomLock held exclusively. So, here's a
patch to simplify matters a bit. Thoughts?Indeed. This removal sounds good to me, thanks.
#include "storage/spin.h" seems no longer needed in wait_event.c,
since the patch removes the last use of the spinlock code there.
So we can remove that include as well?
Regards,
--
Fujii Masao
On Thu, Jul 09, 2026 at 01:22:52PM +0900, Fujii Masao wrote:
#include "storage/spin.h" seems no longer needed in wait_event.c,
since the patch removes the last use of the spinlock code there.
So we can remove that include as well?
I think so. I've committed the patch with that change. Thanks for
looking!
--
nathan