Mercurial > hg > nginx-quic
annotate src/os/unix/ngx_setaffinity.h @ 8027:bce9e9643444 quic
QUIC: coalesce neighbouring stream send buffers.
Previously a single STREAM frame was created for each buffer in stream output
chain which is wasteful with respect to memory. The following changes were
made in the stream send code:
- ngx_quic_stream_send_chain() no longer calls ngx_quic_stream_send() and got
a separate implementation that coalesces neighbouring buffers into a single
frame
- the new ngx_quic_stream_send_chain() respects the limit argument, which fixes
sendfile_max_chunk and limit_rate
- ngx_quic_stream_send() is reimplemented to call ngx_quic_stream_send_chain()
- stream frame size limit is moved out to a separate function
ngx_quic_max_stream_frame()
- flow control is moved out to a separate function ngx_quic_max_stream_flow()
- ngx_quic_stream_send_chain() is relocated next to ngx_quic_stream_send()
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Tue, 18 Aug 2020 12:28:33 +0300 |
parents | 7296b38f6416 |
children |
rev | line source |
---|---|
4549
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 /* |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 * Copyright (C) Nginx, Inc. |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 */ |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 #ifndef _NGX_SETAFFINITY_H_INCLUDED_ |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 #define _NGX_SETAFFINITY_H_INCLUDED_ |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 #if (NGX_HAVE_SCHED_SETAFFINITY || NGX_HAVE_CPUSET_SETAFFINITY) |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
12 #define NGX_HAVE_CPU_AFFINITY 1 |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 |
6402
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
14 #if (NGX_HAVE_SCHED_SETAFFINITY) |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
15 |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
16 typedef cpu_set_t ngx_cpuset_t; |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
17 |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
18 #elif (NGX_HAVE_CPUSET_SETAFFINITY) |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
19 |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
20 #include <sys/cpuset.h> |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
21 |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
22 typedef cpuset_t ngx_cpuset_t; |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
23 |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
24 #endif |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
25 |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
26 void ngx_setaffinity(ngx_cpuset_t *cpu_affinity, ngx_log_t *log); |
4549
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 #else |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 #define ngx_setaffinity(cpu_affinity, log) |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 |
6402
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
32 typedef uint64_t ngx_cpuset_t; |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4549
diff
changeset
|
33 |
4549
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 #endif |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 |
f31162fefe01
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 #endif /* _NGX_SETAFFINITY_H_INCLUDED_ */ |