Welcome! Log In Create A New Profile

Advanced

Re: CentOS 5.5 + nginx + aio

Maxim Dounin
October 15, 2010 09:34AM
Hello!

On Fri, Oct 15, 2010 at 07:55:44AM -0400, Panasonic1 wrote:

> >А патчи точно применены, и новый nginx
> запущен?
> Да, конечно. Новый nginx запускал через
> restart.
>
>
> >Покажите diff -u по отношению к
> коробочной версии.
>
> # diff -u nginx-0.8.50/ nginx-0.8.50-patched/ -r
> Only in nginx-0.8.50-patched/src/core: ngx_output_chain.c.orig
> diff -u -r nginx-0.8.50/src/http/ngx_http_copy_filter_module.c
> nginx-0.8.50-patched/src/http/ngx_http_copy_filt
> er_module.c
> --- nginx-0.8.50/src/http/ngx_http_copy_filter_module.c 2010-05-14
> 18:18:44.000000000 +0600
> +++ nginx-0.8.50-patched/src/http/ngx_http_copy_filter_module.c
> 2010-10-15 04:53:23.000000000 +0600
> @@ -118,8 +118,10 @@
> ctx->filter_ctx = r;
>
> #if (NGX_HAVE_FILE_AIO)
> - if (ngx_file_aio && clcf->aio) {
> - ctx->aio_handler = ngx_http_copy_aio_handler;
> + if (ngx_file_aio) {
> + if (clcf->aio) {
> + ctx->aio_handler = ngx_http_copy_aio_handler;
> + }
> #if (NGX_HAVE_AIO_SENDFILE)
> c->aio_sendfile = (clcf->aio == NGX_HTTP_AIO_SENDFILE);
> #endif
> @@ -156,6 +158,11 @@
> ngx_file_t *file;
> ngx_http_ephemeral_t *e;
>
> + if (r->aio) {
> + c->busy_sendfile = NULL;
> + return rc;
> + }
> +
> file = c->busy_sendfile->file;
> offset = c->busy_sendfile->file_pos;
>
> @@ -211,6 +218,8 @@
>
> r->main->blocked++;
> r->aio = 1;
> +
> + ctx->aio = 1;
> }
>
>
> diff -u -r nginx-0.8.50/src/http/ngx_http_request.c
> nginx-0.8.50-patched/src/http/ngx_http_request.c
> --- nginx-0.8.50/src/http/ngx_http_request.c 2010-07-05
> 19:35:20.000000000 +0600
> +++ nginx-0.8.50-patched/src/http/ngx_http_request.c 2010-10-15
> 04:53:23.000000000 +0600
> @@ -2218,17 +2218,17 @@
> return;
> }
>
> - } else {
> - if (wev->delayed || r->aio) {
> - ngx_log_debug0(NGX_LOG_DEBUG_HTTP, wev->log, 0,
> - "http writer delayed");
> + }
>
> - if (ngx_handle_write_event(wev, clcf->send_lowat) !=
> NGX_OK) {
> - ngx_http_close_request(r, 0);
> - }
> + if (wev->delayed || r->aio) {
> + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, wev->log, 0,
> + "http writer delayed");
>
> - return;
> + if (ngx_handle_write_event(wev, clcf->send_lowat) != NGX_OK) {
> + ngx_http_close_request(r, 0);
> }
> +
> + return;
> }
>
> rc = ngx_http_output_filter(r, NULL);
> @@ -2244,7 +2244,7 @@
>
> if (r->buffered || r->postponed || (r == r->main && c->buffered))
> {
>
> - if (!wev->ready && !wev->delayed) {
> + if (!wev->delayed) {
> ngx_add_timer(wev, clcf->send_timeout);
> }
>
> diff -u -r nginx-0.8.50/src/os/unix/ngx_linux_aio_read.c
> nginx-0.8.50-patched/src/os/unix/ngx_linux_aio_read.c
> --- nginx-0.8.50/src/os/unix/ngx_linux_aio_read.c 2009-11-05
> 19:12:30.000000000 +0600
> +++ nginx-0.8.50-patched/src/os/unix/ngx_linux_aio_read.c
> 2010-10-15 04:48:47.000000000 +0600
> @@ -95,6 +95,10 @@
> n = io_submit(ngx_aio_ctx, 1, piocb);
>
> if (n == 1) {
> + ev->active = 1;
> + ev->ready = 0;
> + ev->complete = 0;
> +
> return NGX_AGAIN;
> }

Вот этот патч применён не полностью:

http://nginx.org/pipermail/nginx-devel/2010-October/000499.html

Нет куска на src/core/ngx_output_chain.c.

Maxim Dounin

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

CentOS 5.5 + nginx + aio

Alex Vorona July 06, 2010 03:24AM

Re: CentOS 5.5 + nginx + aio

hg_04 July 06, 2010 04:59AM

Re: CentOS 5.5 + nginx + aio

Alex Vorona July 06, 2010 05:04AM

Re: CentOS 5.5 + nginx + aio

Boris Dolgov July 06, 2010 05:06AM

Re: CentOS 5.5 + nginx + aio

Panasonic1 October 14, 2010 06:10PM

Re: CentOS 5.5 + nginx + aio

Panasonic1 October 14, 2010 06:55PM

Re: CentOS 5.5 + nginx + aio

Panasonic1 October 15, 2010 06:23AM

Re: CentOS 5.5 + nginx + aio

Panasonic1 October 15, 2010 07:55AM

Re: CentOS 5.5 + nginx + aio

Panasonic1 October 15, 2010 01:53PM

Re: CentOS 5.5 + nginx + aio

Panasonic1 October 16, 2010 02:21AM

Re: CentOS 5.5 + nginx + aio

Panasonic1 October 17, 2010 06:53AM

Re: CentOS 5.5 + nginx + aio

Maxim Dounin October 14, 2010 06:26PM

Re: CentOS 5.5 + nginx + aio

Maxim Dounin October 15, 2010 07:18AM

Re: CentOS 5.5 + nginx + aio

Maxim Dounin October 15, 2010 09:34AM

Re: CentOS 5.5 + nginx + aio

Alex Vorona October 15, 2010 04:14PM

Re: CentOS 5.5 + nginx + aio

Maxim Dounin October 16, 2010 06:14AM

Re: CentOS 5.5 + nginx + aio

Maxim Dounin October 17, 2010 08:02AM

Re: CentOS 5.5 + nginx + aio

Alex Vorona October 12, 2010 02:06PM

Re: CentOS 5.5 + nginx + aio

Alex Sergeyev October 12, 2010 02:10PM

Re: CentOS 5.5 + nginx + aio

Maxim Dounin October 12, 2010 02:32PM

Re: CentOS 5.5 + nginx + aio

Alex Vorona October 12, 2010 03:06PM

Re: CentOS 5.5 + nginx + aio

Maxim Dounin October 12, 2010 04:08PM

Re: CentOS 5.5 + nginx + aio

Alex Vorona October 13, 2010 03:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 255
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