Skip to content

[release/1.7] Prevent GC from schedule itself with 0 period.#10102

Merged
kzys merged 1 commit intocontainerd:release/1.7from
catap:prevent-zero-timer-1.7
Apr 22, 2024
Merged

[release/1.7] Prevent GC from schedule itself with 0 period.#10102
kzys merged 1 commit intocontainerd:release/1.7from
catap:prevent-zero-timer-1.7

Conversation

@catap
Copy link
Copy Markdown
Contributor

@catap catap commented Apr 22, 2024

On startup gcTimeSum might work fast and return 0, so on this case the algorithm turns in infinity loop which simple consume CPU on timer which fires without any interval.

Use 5ms as fallback to have interval 245ms for that case.

Backport of #9795 into 1.7 branch

Closes: #5089

On startup `gcTimeSum` might work fast and return `0`, so on this case
the algorithm turns in infinity loop which simple consume CPU on timer
which fires without any interval.

Use `5ms` as fallback to have interval `245ms` for that case.

Closes: containerd#5089

Signed-off-by: Kirill A. Korinsky <[email protected]>
@k8s-ci-robot
Copy link
Copy Markdown

Hi @catap. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@dmcgowan dmcgowan changed the title Prevent GC from schedule itself with 0 period. [release/1.7] Prevent GC from schedule itself with 0 period. Apr 22, 2024
@kzys kzys merged commit 6a99fcc into containerd:release/1.7 Apr 22, 2024
@catap catap deleted the prevent-zero-timer-1.7 branch April 22, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants