Calling GetConsoleProcessList in tight loop allocates new buffer via condrv ioctl results in excessive page-faults with Windows Terminal

Steven Buehler buehlersj@outlook.com
Mon Dec 2 19:57:25 GMT 2024


Hello,

I am experiencing an abnormal number of page-faults per second (averaging 800 to over 2000) when using Cygwin within the Windows Terminal app. This produces visible stutters and cursor movement during terminal screen redraws.

I have opened an issue on the Windows Terminal GitHub issues page. The initial investigation by one of the Windows Terminal developers has determined that "Cygwin is calling console APIs in its steady state. It looks like it's calling GetConsoleProcessList in a tight loop, which results in the allocation of a new buffer that is returned to their process via condrv's ioctl interface. I don't think there's anything we can do about that, other than stopping them from doing so."

Following this response, I am attempting to bring this issue to the Cygwin developer team's awareness for a possible resolution. Please see https://github.com/microsoft/terminal/issues/18264 for a detailed discussion and accompanying video demonstration of the page-fault counter.

Thanks,
Steven


More information about the Cygwin mailing list