- Notifications
You must be signed in to change notification settings - Fork5k
Commit247ce06
aio: Add io_method=worker
The previous commit introduced the infrastructure to start io_workers. Thiscommit actually makes the workers execute IOs.IO workers consume IOs from a shared memory submission queue, run traditionalsynchronous system calls, and perform the shared completion handlingimmediately. Client code submits most requests by pushing IOs into thesubmission queue, and waits (if necessary) using condition variables. SomeIOs cannot be performed in another process due to lack of infrastructure forreopening the file, and must processed synchronously by the client code whensubmitted.For now the default io_method is changed to "worker". We should re-evaluatethat around beta1, we might want to be careful and set the default to "sync"for 18.Reviewed-by: Noah Misch <noah@leadboat.com>Co-authored-by: Thomas Munro <thomas.munro@gmail.com>Co-authored-by: Andres Freund <andres@anarazel.de>Discussion:https://postgr.es/m/uvrtrknj4kdytuboidbhwclo4gxhswwcpgadptsjvjqcluzmah%40brqs62irg4dtDiscussion:https://postgr.es/m/20210223100344.llw5an2aklengrmn@alap3.anarazel.deDiscussion:https://postgr.es/m/stj36ea6yyhoxtqkhpieia2z4krnam7qyetc57rfezgk4zgapf@gcnactj4z56m1 parent55b454d commit247ce06
File tree
10 files changed
+466
-8
lines changed- doc/src/sgml
- src
- backend
- storage/aio
- utils
- activity
- misc
- include/storage
- tools/pgindent
10 files changed
+466
-8
lines changedLines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2676 | 2676 |
| |
2677 | 2677 |
| |
2678 | 2678 |
| |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
2679 | 2684 |
| |
2680 | 2685 |
| |
2681 | 2686 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
| 67 | + | |
67 | 68 |
| |
68 | 69 |
| |
69 | 70 |
| |
| |||
80 | 81 |
| |
81 | 82 |
| |
82 | 83 |
| |
| 84 | + | |
83 | 85 |
| |
84 | 86 |
| |
85 | 87 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
| |||
39 | 40 |
| |
40 | 41 |
| |
41 | 42 |
| |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
42 | 48 |
| |
43 | 49 |
| |
44 | 50 |
| |
| |||
223 | 229 |
| |
224 | 230 |
| |
225 | 231 |
| |
| 232 | + | |
| 233 | + | |
| 234 | + | |
226 | 235 |
| |
227 | 236 |
| |
228 | 237 |
| |
|
0 commit comments
Comments
(0)