Mercurial > hg > nginx-quic
annotate auto/os/conf @ 6536:f7849bfb6d21
Improved EPOLLRDHUP handling.
When it's known that the kernel supports EPOLLRDHUP, there is no need in
additional recv() call to get EOF or error when the flag is absent in the
event generated by the kernel. A special runtime test is done at startup
to detect if EPOLLRDHUP is actually supported by the kernel because
epoll_ctl() silently ignores unknown flags.
With this knowledge it's now possible to drop the "ready" flag for partial
read. Previously, the "ready" flag was kept until the recv() returned EOF
or error. In particular, this change allows the lingering close heuristics
(which relies on the "ready" flag state) to actually work on Linux, and not
wait for more data in most cases.
The "available" flag is now used in the read event with the semantics similar
to the corresponding counter in kqueue.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Fri, 13 May 2016 17:19:23 +0300 |
parents | a88e309f839b |
children | 639e48c382a6 |
rev | line source |
---|---|
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
4412 | 3 # Copyright (C) Nginx, Inc. |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
4 |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 |
563 | 6 echo "checking for $NGX_SYSTEM specific features" |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 |
493 | 8 case "$NGX_PLATFORM" in |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 |
688
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
10 FreeBSD:*) |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 . auto/os/freebsd |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
12 ;; |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
13 |
196
11fbd0fc041d
nginx-0.0.1-2003-11-26-18:42:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
14 Linux:*) |
11fbd0fc041d
nginx-0.0.1-2003-11-26-18:42:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
15 . auto/os/linux |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
16 ;; |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
17 |
196
11fbd0fc041d
nginx-0.0.1-2003-11-26-18:42:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
18 SunOS:*) |
11fbd0fc041d
nginx-0.0.1-2003-11-26-18:42:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
19 . auto/os/solaris |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
20 ;; |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
21 |
2128
345a014436d4
*) move Darwin support to separate files
Igor Sysoev <igor@sysoev.ru>
parents:
940
diff
changeset
|
22 Darwin:*) |
345a014436d4
*) move Darwin support to separate files
Igor Sysoev <igor@sysoev.ru>
parents:
940
diff
changeset
|
23 . auto/os/darwin |
345a014436d4
*) move Darwin support to separate files
Igor Sysoev <igor@sysoev.ru>
parents:
940
diff
changeset
|
24 ;; |
345a014436d4
*) move Darwin support to separate files
Igor Sysoev <igor@sysoev.ru>
parents:
940
diff
changeset
|
25 |
2828
f5c80c69a72e
backout -r2827 and add correct fix
Igor Sysoev <igor@sysoev.ru>
parents:
2826
diff
changeset
|
26 win32) |
455 | 27 . auto/os/win32 |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
28 ;; |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
29 |
688
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
30 DragonFly:*) |
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
31 have=NGX_FREEBSD . auto/have_headers |
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
32 CORE_INCS="$UNIX_INCS" |
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
33 CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS" |
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
34 CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS" |
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
35 |
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
36 echo " + sendfile() found" |
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
37 have=NGX_HAVE_SENDFILE . auto/have |
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
38 CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS" |
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
39 |
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
40 ngx_spacer=' |
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
41 ' |
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
42 ;; |
03fa118203d6
separate DragonFlyBSD autoconfiguration from FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
593
diff
changeset
|
43 |
515 | 44 HP-UX:*) |
45 # HP/UX | |
46 have=NGX_HPUX . auto/have_headers | |
47 CORE_INCS="$UNIX_INCS" | |
48 CORE_DEPS="$UNIX_DEPS $POSIX_DEPS" | |
49 CORE_SRCS="$UNIX_SRCS" | |
50 CC_AUX_FLAGS="$CC_AUX_FLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" | |
4692
489839d07b38
Fixed "sendmsg() failed" alerts on HP-UX.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4690
diff
changeset
|
51 CC_AUX_FLAGS="$CC_AUX_FLAGS -D_HPUX_ALT_XOPEN_SOCKET_API" |
515 | 52 ;; |
53 | |
54 OSF1:*) | |
517 | 55 # Tru64 UNIX |
515 | 56 have=NGX_TRU64 . auto/have_headers |
517 | 57 have=NGX_HAVE_STRERROR_R . auto/nohave |
515 | 58 CORE_INCS="$UNIX_INCS" |
59 CORE_DEPS="$UNIX_DEPS $POSIX_DEPS" | |
60 CORE_SRCS="$UNIX_SRCS" | |
61 ;; | |
62 | |
6156
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4692
diff
changeset
|
63 GNU:*) |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4692
diff
changeset
|
64 # GNU Hurd |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4692
diff
changeset
|
65 have=NGX_GNU_HURD . auto/have_headers |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4692
diff
changeset
|
66 CORE_INCS="$UNIX_INCS" |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4692
diff
changeset
|
67 CORE_DEPS="$UNIX_DEPS $POSIX_DEPS" |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4692
diff
changeset
|
68 CORE_SRCS="$UNIX_SRCS" |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4692
diff
changeset
|
69 CC_AUX_FLAGS="$CC_AUX_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64" |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4692
diff
changeset
|
70 ;; |
a88e309f839b
Configure: GNU Hurd properly recognized.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4692
diff
changeset
|
71 |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
320
diff
changeset
|
72 *) |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
320
diff
changeset
|
73 CORE_INCS="$UNIX_INCS" |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
320
diff
changeset
|
74 CORE_DEPS="$UNIX_DEPS $POSIX_DEPS" |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
320
diff
changeset
|
75 CORE_SRCS="$UNIX_SRCS" |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
320
diff
changeset
|
76 ;; |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
320
diff
changeset
|
77 |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
78 esac |
455 | 79 |
80 | |
493 | 81 case "$NGX_MACHINE" in |
479 | 82 |
589 | 83 i386 | i686 | i86pc) |
509 | 84 have=NGX_HAVE_NONALIGNED . auto/have |
589 | 85 NGX_MACH_CACHE_LINE=32 |
86 ;; | |
87 | |
593 | 88 amd64 | x86_64) |
589 | 89 have=NGX_HAVE_NONALIGNED . auto/have |
90 NGX_MACH_CACHE_LINE=64 | |
509 | 91 ;; |
479 | 92 |
745 | 93 sun4u | sun4v | sparc | sparc64) |
581 | 94 have=NGX_ALIGNMENT value=16 . auto/define |
589 | 95 # TODO |
96 NGX_MACH_CACHE_LINE=64 | |
97 ;; | |
98 | |
99 ia64 ) | |
100 have=NGX_ALIGNMENT value=16 . auto/define | |
101 # TODO | |
102 NGX_MACH_CACHE_LINE=64 | |
103 ;; | |
104 | |
105 *) | |
4690
d91f3c78603e
Changed default alignment to 16.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
106 have=NGX_ALIGNMENT value=16 . auto/define |
589 | 107 NGX_MACH_CACHE_LINE=32 |
581 | 108 ;; |
109 | |
479 | 110 esac |
589 | 111 |
112 if test -z "$NGX_CPU_CACHE_LINE"; then | |
113 NGX_CPU_CACHE_LINE=$NGX_MACH_CACHE_LINE | |
114 fi | |
115 | |
116 have=NGX_CPU_CACHE_LINE value=$NGX_CPU_CACHE_LINE . auto/define |