From 247ce06b883d7b3a40d08312dc03dfb37fbff212 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Tue, 18 Mar 2025 10:52:33 -0400 Subject: aio: Add io_method=worker The previous commit introduced the infrastructure to start io_workers. This commit actually makes the workers execute IOs. IO workers consume IOs from a shared memory submission queue, run traditional synchronous system calls, and perform the shared completion handling immediately. Client code submits most requests by pushing IOs into the submission queue, and waits (if necessary) using condition variables. Some IOs cannot be performed in another process due to lack of infrastructure for reopening the file, and must processed synchronously by the client code when submitted. For now the default io_method is changed to "worker". We should re-evaluate that around beta1, we might want to be careful and set the default to "sync" for 18. Reviewed-by: Noah Misch Co-authored-by: Thomas Munro Co-authored-by: Andres Freund Discussion: https://postgr.es/m/uvrtrknj4kdytuboidbhwclo4gxhswwcpgadptsjvjqcluzmah%40brqs62irg4dt Discussion: https://postgr.es/m/20210223100344.llw5an2aklengrmn@alap3.anarazel.de Discussion: https://postgr.es/m/stj36ea6yyhoxtqkhpieia2z4krnam7qyetc57rfezgk4zgapf@gcnactj4z56m --- doc/src/sgml/config.sgml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index c749bc0631a..cd889142773 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -2676,6 +2676,11 @@ include_dir 'conf.d' Selects the method for executing asynchronous I/O. Possible values are: + + + worker (execute asynchronous I/O using worker processes) + + sync (execute asynchronous-eligible I/O synchronously) -- cgit v1.2.3