Repository navigation
Commit 9f7c28e
committed
raw: wait for a block in poll
get_block() polls the socket with a zero timeout, so on an idle
interface the input worker spins and wakes up about 18,000 times per
second, costing several percent of CPU on small routers.
Waits up to 1 ms for a block instead. The worker still calls
export_expired() about 1,000 times per second while idle, so expired
flows of small caches are still found within a second.
Upstream-Status: Pending1 parent cc8e937 commit 9f7c28e
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
262 | | - | |
| 261 | + | |
| 262 | + | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
266 | 268 | | |
267 | 269 | | |
268 | 270 | | |
| |||
0 commit comments