From d918f1d3aefa5f154f2b5b7662df0fbd926721a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=A8=81?= Date: Fri, 26 Jan 2018 17:44:47 +0800 Subject: [PATCH 1/2] Update F-Stack_Nginx_APP_Guide.md Handle fstack in nginx ```work process cycle```. Refer to #151. --- doc/F-Stack_Nginx_APP_Guide.md | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/doc/F-Stack_Nginx_APP_Guide.md b/doc/F-Stack_Nginx_APP_Guide.md index a77c88e32..fa984f95f 100644 --- a/doc/F-Stack_Nginx_APP_Guide.md +++ b/doc/F-Stack_Nginx_APP_Guide.md @@ -27,24 +27,20 @@ first one to start | | | | | last one to exit<-+ primary worker | | secondary worker | | secondary worker | | | | | | | +--------------------+ +-------------------+ +------------------+ - +--------+ +-------+ +--------+ +-------+ - | | | | | | | | - | fstack | |channel| | fstack | |channel| - | main | | event | | main | | event | - | loop | |thread | | loop | |thread | - | thread | | | | thread | | | - | | | | | | | | - +--------+ +-------+ +--------+ +-------+ - woker loop: worker loop: - process handle process handle - cycle channel cycle channel - event event + +--------------------+ +-------------------+ + | | | | + | fstack,kernel | | fstack,kernel | + | and channel | | and channel | + | loop thread | | loop thread | + | | | | + +--------------------+ +-------------------+ + woker process cycle woker process cycle ``` - spawn primary worker firstly, and then wait for primary startup, continue to spawn secondary workers. -- worker process has 2 threads. main thread: ff_init();ff_run(worker_process_cycle), channel thread: loop(handle channel event). +- a major addition to the worker process is fstack-handling:ff_init();ff_run(worker_process_cycle); worker_process_cycle(handle channel/host/fstack event). Note that: From bb4234c89c93a3c8387e345f412f9eb56a625e4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=A8=81?= Date: Fri, 26 Jan 2018 21:44:05 +0800 Subject: [PATCH 2/2] Update F-Stack_Nginx_APP_Guide.md Add description of directive ```kernel_network_stack```. --- doc/F-Stack_Nginx_APP_Guide.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/F-Stack_Nginx_APP_Guide.md b/doc/F-Stack_Nginx_APP_Guide.md index fa984f95f..390663517 100644 --- a/doc/F-Stack_Nginx_APP_Guide.md +++ b/doc/F-Stack_Nginx_APP_Guide.md @@ -42,6 +42,15 @@ first one to start | | | | | - a major addition to the worker process is fstack-handling:ff_init();ff_run(worker_process_cycle); worker_process_cycle(handle channel/host/fstack event). +- a new directive `kernel_network_stack` : +``` + Syntax: kernel_network_stack on | off; + Default: kernel_network_stack off; + Context: http, server + This directive is available only when ```NGX_HAVE_FSTACK``` is defined. + Determines whether server should run on kernel network stack or fstack. +``` + Note that: - the `reload` is not graceful, service will still be unavailable during the process of reloading.