diff options
Diffstat (limited to 'DESIGN')
| -rw-r--r-- | DESIGN | 7 |
1 files changed, 7 insertions, 0 deletions
| @@ -57,6 +57,13 @@ A socket is read or written, never both. http_interest_set replaces an | |||
| 57 | add-and-drop pair so that the invariant cannot be broken by accident, and the | 57 | add-and-drop pair so that the invariant cannot be broken by accident, and the |
| 58 | event layer hears about a change once instead of twice. | 58 | event layer hears about a change once instead of twice. |
| 59 | 59 | ||
| 60 | A task belongs to a connection, not to a descriptor number. The queue files | ||
| 61 | it under the number, and the kernel hands that number to the next connection | ||
| 62 | the moment this one closes. So a connection that is owed an answer is not | ||
| 63 | read from, closing it cancels every task filed under its number, and a result | ||
| 64 | carries the generation the descriptor had when the task was pushed, which the | ||
| 65 | main loop holds against the current one before it sends anything. | ||
| 66 | |||
| 60 | Accept waits until the client's request has arrived: TCP_DEFER_ACCEPT on | 67 | Accept waits until the client's request has arrived: TCP_DEFER_ACCEPT on |
| 61 | Linux, the accf_data filter on FreeBSD. Measured against a flood of silent | 68 | Linux, the accf_data filter on FreeBSD. Measured against a flood of silent |
| 62 | connections, the filter serves more requests than no filter, not fewer, so it | 69 | connections, the filter serves more requests than no filter, not fewer, so it |
