[ PATCH ] Add preadv2 support with RWF_NOWAIT flag

2018-01-09 Thread Vadim Fedorenko
ser Vadim Fedorenko # Date 1515498853 -10800 # Tue Jan 09 14:54:13 2018 +0300 # Node ID f955f9cddd38ce35e19c50b871558ca8739a1d4b # Parent 6d2e92acb013224e6ef2c71c9e61ab07f0b03271 Add preadv2() with RWF_NOWAIT flag Eliminate overhead with threads synchronization when cache file or chain is

[PATCH v2] Add preadv2 support with RWF_NOWAIT flag

2018-01-11 Thread Vadim Fedorenko
# HG changeset patch # User Vadim Fedorenko # Date 1515713238 -10800 # Fri Jan 12 02:27:18 2018 +0300 # Node ID fbf6a421212b291cbacfcfc503173c0168449165 # Parent 93abb5a855d6534f0356882f45be49f8c6a95a8b Add preadv2 support with RWF_NOWAIT flag Introduction of thread pools is really good

Fix "header too long" error

2018-01-16 Thread Vadim Fedorenko
# HG changeset patch # User Vadim Fedorenko # Date 1516103689 -10800 # Tue Jan 16 14:54:49 2018 +0300 # Node ID deaa364977488f3390d48306c34dc80961e54e14 # Parent fbf6a421212b291cbacfcfc503173c0168449165 Fix "header too long" error This error occurs in rare cases when cached

remove unneeded io_getevents syscall.

2019-01-06 Thread Vadim Fedorenko
# HG changeset patch # User Vadim Fedorenko # Date 1546810494 0 # Sun Jan 06 21:34:54 2019 + # Node ID 3e538f6b8267d36f97b7dd67714c6ba0fba5e5bc # Parent 6d15e452fa2eaf19408e24a0d0fcc3a31344a289 remove unneeded io_getevents syscall. This work is based on cloudflare's wo

Re: [PATCH] Add io_uring support in AIO(async io) module

2021-02-15 Thread Vadim Fedorenko
Hi! There was a regression detected in io_uring in kernel version 5.7.16 with TWA_SIGNAL handling. Looks like fix was not queued the stable branch, but could be backported to Fedora 33 kernel. It could potentially lead to some differences in metrics. Thanks, Vadim пн, 15 февр. 2021 г., 8:11 Mikhai

Re: [PATCH] Add io_uring support in AIO(async io) module

2021-02-21 Thread Vadim Fedorenko
Hi! Looks like this small fix doesn't work in case when the total size of the file is less than the size of the buffer and it was partly read. In my case the size of the file is 16384 bytes and only one page of the file was in page cache. This patch produces size = 8192 bytes for my case and the ne

Re: nginx KTLS and HTTP/2 performance degradation

2021-12-02 Thread Vadim Fedorenko
Hello! I would say that current implementation of Kernel TLS in OpenSSL will give huge overhead because of additional syscall for every frame and it's header, it doesn't matter if it's sendfile or not. Without sendfile it's actually 5% worse in my tests. That's why it's better to disable Kernel TLS

Re: [PATCH 13 of 15] Tempfiles: Skip cached file if there is already newer tempfile

2022-01-30 Thread Vadim Fedorenko
Hi! Thanks for sharing patches. It's interesting for me and I'm going to test it soon. For this particular patch I would suggest to reduce the scope of mutex locking and remove it when "serve_tempfile" is not configured. See my version below: diff --git a/src/http/ngx_http_file_cache.c b/src/http/

[PATCH] Upstream: prioritise Cache-Control over Expires

2022-04-14 Thread Vadim Fedorenko via nginx-devel
# HG changeset patch # User Vadim Fedorenko # Date 1649889268 -10800 # Thu Apr 14 01:34:28 2022 +0300 # Node ID ed7a2c031475bcb252952a467c184c94652b926a # Parent a736a7a613ea6e182ff86fbadcb98bb0f8891c0b Upstream: prioritise Cache-Control over Expires. RFC7234 explicitly says that cache

[PATCH] Tests: added Expires and Cache-Control headers test

2022-04-14 Thread Vadim Fedorenko via nginx-devel
# HG changeset patch # User Vadim Fedorenko # Date 1649976970 -10800 # Fri Apr 15 01:56:10 2022 +0300 # Node ID 39dea3973d47e0bcd226beb3c6554dcdc0e26495 # Parent 0c50a00e67334659d58d3cf7cb81fcf5872a8285 Tests: added Expires and Cache-Control headers test diff -r 0c50a00e6733 -r

Re: [PATCH] Upstream: prioritise Cache-Control over Expires

2022-04-17 Thread Vadim Fedorenko via nginx-devel
Hi Maxim! On 17.04.2022 02:55, Maxim Dounin wrote: Hello! [...] Thanks for the patch. I'm quite sceptical about attempts to fix this by introducing various flags and reverting cacheable status back to 1. This is not how it should be fixed. Yeah, the solution might be a bit complicated, bu

Re: [PATCH] Upstream: prioritise Cache-Control over Expires

2022-04-18 Thread Vadim Fedorenko via nginx-devel
VL23TBBNMXLP4KDGDJCVTW/ <https://mailman.nginx.org/archives/list/nginx-devel@nginx.org/thread/ZQVPGEXAAHVL23TBBNMXLP4KDGDJCVTW/> But it seems to have declined. We sincerely wish to resolve it and intend to do anything. Thanks, Yugo Horie 2022年4月18日(月) 4:51 Vadim Fedorenko via nginx-devel &l

[PATCH v2] Upstream: prioritise X-Accel-Expire over Cache-Control and Expire

2022-04-19 Thread Vadim Fedorenko via nginx-devel
# HG changeset patch # User Vadim Fedorenko # Date 1650406016 -10800 # Wed Apr 20 01:06:56 2022 +0300 # Node ID a75449f4b5c98df0e5a0041eeaa1be5c82d92fea # Parent a736a7a613ea6e182ff86fbadcb98bb0f8891c0b Upstream: prioritise X-Accel-Expire over Cache-Control and Expire RFC7234 explicitly

[PATCH v2] Tests: added Expires and Cache-Control headers test

2022-04-19 Thread Vadim Fedorenko via nginx-devel
# HG changeset patch # User Vadim Fedorenko # Date 1649976970 -10800 # Fri Apr 15 01:56:10 2022 +0300 # Node ID 3d5684530a8ef228cd7f20ff3e51f9ea5e77f2ec # Parent 0c50a00e67334659d58d3cf7cb81fcf5872a8285 Tests: added Expires and Cache-Control headers test diff -r 0c50a00e6733 -r

Re: [PATCH v2] Upstream: prioritise X-Accel-Expire over Cache-Control and Expire

2022-04-20 Thread Vadim Fedorenko via nginx-devel
values with `ngx_http_upstream_validate_cache_headers`. Could we set u->headers_in.cache_control_c to 0 or only return NGX_OK to do nothing here instead of u->cacheable set 0? Best, Yugo Horie 2022年4月20日(水) 7:20 Vadim Fedorenko via nginx-devel : # HG changeset patch # User Vadim Fedorenko # Date 1650406016 -10800 # We

[PATCH v3] Upstream: prioritise X-Accel-Expire over Cache-Control and Expire

2022-04-20 Thread Vadim Fedorenko via nginx-devel
# HG changeset patch # User Vadim Fedorenko # Date 1650406016 -10800 # Wed Apr 20 01:06:56 2022 +0300 # Node ID e04dac22328020cf8d8abcc4863b982b513b0c80 # Parent a736a7a613ea6e182ff86fbadcb98bb0f8891c0b Upstream: prioritise X-Accel-Expire over Cache-Control and Expire RFC7234 explicitly

Re: [PATCH] Upstream: prioritise Cache-Control over Expires

2022-04-22 Thread Vadim Fedorenko via nginx-devel
Hello! On Tue, Apr 19, 2022 at 10:59:12PM +0100, Vadim Fedorenko wrote: On 19.04.2022 16:01, Maxim Dounin wrote: On Sun, Apr 17, 2022 at 08:50:25PM +0100, Vadim Fedorenko via nginx-devel wrote: On 17.04.2022 02:55, Maxim Dounin wrote: I'm quite sceptical about attempts to fix this by i

Re: [PATCH] Upstream: prioritise Cache-Control over Expires

2022-04-25 Thread Vadim Fedorenko via nginx-devel
ol extensions, notably stale-while-revalidate and stale-if-error.  This ensures that order of the X-Accel-Expires and Cache-Control headers is not important. Prodded by Vadim Fedorenko and Yugo Horie. diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c -

Re: [PATCH] Upstream: prioritise Cache-Control over Expires

2022-04-25 Thread Vadim Fedorenko via nginx-devel
error. This ensures that order of the X-Accel-Expires and Cache-Control headers is not important. Prodded by Vadim Fedorenko and Yugo Horie. diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c +++ b/src/http

[PATCH 1 of 4] Core: use explicit_bzero if possible

2023-04-17 Thread Vadim Fedorenko via nginx-devel
# HG changeset patch # User Vadim Fedorenko # Date 1681771172 -10800 # Tue Apr 18 01:39:32 2023 +0300 # Node ID 0a1c8cb5c05141f3ea3135d9f01688f7693fc7df # Parent 252a7acd35ceff4fca7a8c60a9aa6d4d22b688bf Core: use explicit_bzero if possible. GCC 11+ expanded the scope of dead store

[PATCH 4 of 4] inet: use explicit memzero to avoid optimizations

2023-04-17 Thread Vadim Fedorenko via nginx-devel
# HG changeset patch # User Vadim Fedorenko # Date 1681771255 -10800 # Tue Apr 18 01:40:55 2023 +0300 # Node ID 460c71c36b00fdd510cb511a5714face68280dac # Parent 5663d8ff4399e7e76369c024db59c40178290213 inet: use explicit memzero to avoid optimizations. GCC11+ removes memzero call in

[PATCH 2 of 4] md5: use explicit memzero to avoid optimizations

2023-04-17 Thread Vadim Fedorenko via nginx-devel
# HG changeset patch # User Vadim Fedorenko # Date 1681771200 -10800 # Tue Apr 18 01:40:00 2023 +0300 # Node ID 8f8773a3076bdbd91fc7a4e96d7a068f7ff29b09 # Parent 0a1c8cb5c05141f3ea3135d9f01688f7693fc7df md5: use explicit memzero to avoid optimizations. GCC11 is optimizing memzero functions

[PATCH 3 of 4] sha1: use explicit memzero to avoid optimizations

2023-04-17 Thread Vadim Fedorenko via nginx-devel
# HG changeset patch # User Vadim Fedorenko # Date 1681771220 -10800 # Tue Apr 18 01:40:20 2023 +0300 # Node ID 5663d8ff4399e7e76369c024db59c40178290213 # Parent 8f8773a3076bdbd91fc7a4e96d7a068f7ff29b09 sha1: use explicit memzero to avoid optimizations. GCC11 is optimizing memzero

[PATCH 0 of 4] Avoid dead store elimination in GCC 11+

2023-04-17 Thread Vadim Fedorenko via nginx-devel
GCC version 11 and newer use more aggressive way to eliminate dead stores which ends up removing ngx_memzero() calls in several places. Such optimization affects calculations of md5 and sha1 implemented internally in nginx. The effect could be easily observed by adding a random data to buffer array

Re: [PATCH 0 of 4] Avoid dead store elimination in GCC 11+

2023-04-18 Thread Vadim Fedorenko via nginx-devel
On 18.04.2023 02:54, Maxim Dounin wrote: Hello! On Tue, Apr 18, 2023 at 02:07:06AM +0300, Vadim Fedorenko via nginx-devel wrote: GCC version 11 and newer use more aggressive way to eliminate dead stores which ends up removing ngx_memzero() calls in several places. Such optimization affects

Re: [PATCH 0 of 4] Avoid dead store elimination in GCC 11+

2023-04-19 Thread Vadim Fedorenko via nginx-devel
Hi! On 18.04.2023 20:14, Maxim Dounin wrote: Hello! On Tue, Apr 18, 2023 at 10:50:01AM +0100, Vadim Fedorenko wrote: On 18.04.2023 02:54, Maxim Dounin wrote: Hello! On Tue, Apr 18, 2023 at 02:07:06AM +0300, Vadim Fedorenko via nginx-devel wrote: GCC version 11 and newer use more