Mercurial > nginx
changeset 7939:9e7de0547f09
Removed CLOCK_MONOTONIC_COARSE support.
While clock_gettime(CLOCK_MONOTONIC_COARSE) is faster than
clock_gettime(CLOCK_MONOTONIC), the latter is fast enough on Linux for
practical usage, and the difference is negligible compared to other costs
at each event loop iteration. On the other hand, CLOCK_MONOTONIC_COARSE
causes various issues with typical CONFIG_HZ=250, notably very inaccurate
limit_rate handling in some edge cases (ticket #1678) and negative difference
between $request_time and $upstream_response_time (ticket #1965).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 21 Oct 2021 18:38:38 +0300 (2021-10-21) |
parents | dc955d274130 |
children | 46a02ed7c966 |
files | src/core/ngx_times.c |
diffstat | 1 files changed, 0 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_times.c Wed Oct 20 09:45:34 2021 +0300 +++ b/src/core/ngx_times.c Thu Oct 21 18:38:38 2021 +0300 @@ -200,10 +200,6 @@ #if defined(CLOCK_MONOTONIC_FAST) clock_gettime(CLOCK_MONOTONIC_FAST, &ts); - -#elif defined(CLOCK_MONOTONIC_COARSE) - clock_gettime(CLOCK_MONOTONIC_COARSE, &ts); - #else clock_gettime(CLOCK_MONOTONIC, &ts); #endif