glommio icon indicating copy to clipboard operation
glommio copied to clipboard

sleep by `poll`ing an eventfd

Open HippoBaro opened this issue 2 years ago • 1 comments

We no longer link the rings at all. Instead, we register an eventfd on the rings (that is written to by the kernel each time a CQE is posted) and we poll on that instead.

It simplifies the sleeping procedure quite a bit at the expense of adding one (nonblocking) read syscall per reactor trip.

HippoBaro avatar Apr 18 '22 20:04 HippoBaro

I've confirmed with @vmingchen that this fixes the hangs he sees when running unit tests. I suspect this will also resolve the occasional hangs in CI we have experienced. If so, I am delighted.

HippoBaro avatar Apr 18 '22 20:04 HippoBaro