Welcome! Log In Create A New Profile

Advanced

[PATCH 7 of 8] Added creation and close of pipes for sendfile of ngx_uring_module

SoYun Seong
November 24, 2020 03:46AM
# HG changeset patch
# User SoYun Seong <thdbsdox12@gmail.com>
# Date 1606129296 0
# Mon Nov 23 11:01:36 2020 +0000
# Node ID 09dfe4a92414513c6bd3c18d871e8a76ed19c3d7
# Parent 57e46378828172e06b32b11d4c059ff0a7213d0d
Added creation and close of pipes for sendfile of ngx_uring_module.

Creates pipes for asynchronous sendfile of ngx_uring module in ngx_get_connection() and destroy them in ngx_free_connection(). However this code is disabled for the performance issue.

diff -r 57e463788281 -r 09dfe4a92414 src/core/ngx_connection.c
--- a/src/core/ngx_connection.c Mon Nov 23 10:59:09 2020 +0000
+++ b/src/core/ngx_connection.c Mon Nov 23 11:01:36 2020 +0000
@@ -1152,6 +1152,14 @@

wev->write = 1;

+#if (NGX_USE_URING_SPLICE)
+ if(ngx_event_flags & NGX_USE_URING_EVENT) {
+ if(pipe(c->write->uring_splice_pipe) < 0){
+ return NULL;
+ }
+ }
+#endif
+
return c;
}

@@ -1166,6 +1174,13 @@
if (ngx_cycle->files && ngx_cycle->files[c->fd] == c) {
ngx_cycle->files[c->fd] = NULL;
}
+
+#if (NGX_USE_URING_SPLICE)
+ if(ngx_event_flags & NGX_USE_URING_EVENT) {
+ close(c->write->uring_splice_pipe[0]);
+ close(c->write->uring_splice_pipe[1]);
+ }
+#endif
}


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 7 of 8] Added creation and close of pipes for sendfile of ngx_uring_module

SoYun Seong 295 November 24, 2020 03:46AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 262
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready