Skip to content

Handle invalid poll descriptors in device loop#88

Open
JeffreyBenjaminBrown wants to merge 1 commit into
monome:mainfrom
JeffreyBenjaminBrown:fix-poll-disconnect-spin
Open

Handle invalid poll descriptors in device loop#88
JeffreyBenjaminBrown wants to merge 1 commit into
monome:mainfrom
JeffreyBenjaminBrown:fix-poll-disconnect-spin

Conversation

@JeffreyBenjaminBrown

Copy link
Copy Markdown

Fixes a possible CPU spin when poll reports POLLNVAL after a device or IPC fd becomes invalid. This may address #81. (Together with a parallel PR I am submitting now to libmonome, it reduced CPU usage from around 45% to negligible on my system, which can be inspected here: https://github.com/JeffreyBenjaminBrown/nixos-experiments/tree/xfce/config.)

@tehn tehn requested a review from artfwo May 15, 2026 15:56
@artfwo

artfwo commented May 15, 2026

Copy link
Copy Markdown
Member

Thanks for the PR! It seems to address multiple concerns though and, since I cannot reproduce the problem locally (on a couple of distros with both FTDI and CDC grids), I wonder which specific descriptor flag check (or lack of) on which descriptor is causing the problem in the first place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants