Skip to content

Polling something every 20 us #15048

Closed
Closed
@lnicola

Description

@lnicola

I'm not sure if it's the same problem, but my gitea burns CPU in a loop with a 200 20 ms us timeout, which seems quite absurd:

[pid   796] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid   796] futex(0x5debff8, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=77531654} <unfinished ...>
[pid   811] <... epoll_pwait resumed>[], 128, 1, NULL, 1) = 0
[pid   811] epoll_pwait(3, [], 128, 0, NULL, 140069537041208) = 0
[pid   811] epoll_pwait(3, [], 128, 77, NULL, 1) = 0
[pid   811] epoll_pwait(3, [], 128, 0, NULL, 140069537041208) = 0
[pid   811] epoll_pwait(3,  <unfinished ...>
[pid   796] <... futex resumed>)        = -1 ETIMEDOUT (Connection timed out)
[pid   796] futex(0xc004e76148, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
[pid   810] <... futex resumed>)        = 0
[pid   796] <... futex resumed>)        = 1
[pid   810] futex(0xc004e76148, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid   796] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0

Originally posted by @lnicola in #7910 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions