|
PostgreSQL Source Code git master
|
#include "lib/ilist.h"#include "port/pg_iovec.h"#include "storage/aio.h"#include "storage/condition_variable.h"

Go to the source code of this file.
Data Structures | |
| struct | PgAioHandle |
| struct | PgAioBackend |
| struct | PgAioCtl |
| struct | IoMethodOps |
Macros | |
| #define | PGAIO_SUBMIT_BATCH_SIZE 32 |
| #define | PGAIO_VERBOSE 1 |
| #define | pgaio_debug(elevel, msg, ...) |
| #define | pgaio_debug_io(elevel, ioh, msg, ...) |
Typedefs | |
| typedef enum PgAioHandleState | PgAioHandleState |
| typedef struct PgAioBackend | PgAioBackend |
| typedef struct PgAioCtl | PgAioCtl |
| typedef struct IoMethodOps | IoMethodOps |
Enumerations | |
| enum | PgAioHandleState { PGAIO_HS_IDLE = 0 , PGAIO_HS_HANDED_OUT , PGAIO_HS_DEFINED , PGAIO_HS_STAGED , PGAIO_HS_SUBMITTED , PGAIO_HS_COMPLETED_IO , PGAIO_HS_COMPLETED_SHARED , PGAIO_HS_COMPLETED_LOCAL } |
| #define pgaio_debug | ( | elevel, | |
| msg, | |||
| ... | |||
| ) |
Definition at line 382 of file aio_internal.h.
Definition at line 395 of file aio_internal.h.
| #define PGAIO_SUBMIT_BATCH_SIZE 32 |
Definition at line 28 of file aio_internal.h.
| #define PGAIO_VERBOSE 1 |
Definition at line 371 of file aio_internal.h.
| Enumerator | |
|---|---|
| PGAIO_HS_IDLE | |
| PGAIO_HS_HANDED_OUT | |
| PGAIO_HS_DEFINED | |
| PGAIO_HS_STAGED | |
| PGAIO_HS_SUBMITTED | |
| PGAIO_HS_COMPLETED_IO | |
| PGAIO_HS_COMPLETED_SHARED | |
| PGAIO_HS_COMPLETED_LOCAL | |
Definition at line 43 of file aio_internal.h.
|
extern |
Definition at line 285 of file aio_callback.c.
References aio_handle_cbs, Assert, DEBUG3, DEBUG4, END_CRIT_SECTION, PgAioResult::error_data, fb(), i, PgAioResult::id, pgaio_debug_io, PGAIO_OP_COUNT, PGAIO_OP_INVALID, pgaio_result_status_string(), PGAIO_RS_UNKNOWN, PGAIO_TID_COUNT, PGAIO_TID_INVALID, PgAioResult::result, START_CRIT_SECTION, and PgAioResult::status.
Referenced by pgaio_io_reclaim().
|
extern |
Definition at line 225 of file aio_callback.c.
References aio_handle_cbs, Assert, DEBUG3, DEBUG4, END_CRIT_SECTION, PgAioResult::error_data, fb(), i, PgAioResult::id, pgaio_debug_io, PGAIO_HCB_INVALID, PGAIO_OP_COUNT, PGAIO_OP_INVALID, pgaio_result_status_string(), PGAIO_RS_OK, PGAIO_RS_UNKNOWN, PGAIO_TID_COUNT, PGAIO_TID_INVALID, PgAioResult::result, START_CRIT_SECTION, and PgAioResult::status.
Referenced by pgaio_io_process_completion().
|
extern |
Definition at line 199 of file aio_callback.c.
References aio_handle_cbs, Assert, DEBUG3, fb(), i, pgaio_debug_io, PGAIO_OP_COUNT, PGAIO_OP_INVALID, PGAIO_TID_COUNT, and PGAIO_TID_INVALID.
Referenced by pgaio_io_stage().
|
extern |
Definition at line 103 of file aio_target.c.
References Assert, fb(), pgaio_target_info, PGAIO_TID_COUNT, PGAIO_TID_INVALID, and PgAioTargetInfo::reopen.
Referenced by pgaio_worker_needs_synchronous_execution().
|
extern |
Definition at line 219 of file aio_io.c.
References Assert, fb(), PgAioCtl::iovecs, pg_unreachable, pgaio_ctl, PGAIO_HS_DEFINED, PGAIO_OP_READV, and PGAIO_OP_WRITEV.
Referenced by IoWorkerMain().
|
extern |
Definition at line 175 of file aio_io.c.
References Assert, fb(), PGAIO_OP_COUNT, PGAIO_OP_INVALID, PGAIO_OP_READV, and PGAIO_OP_WRITEV.
Referenced by pg_get_aios().
|
extern |
Definition at line 928 of file aio.c.
References fb(), and pgaio_io_state_get_name().
Referenced by pg_get_aios(), and pgaio_io_wait().
|
extern |
Definition at line 50 of file aio_target.c.
References Assert, fb(), PgAioTargetInfo::name, pgaio_target_info, PGAIO_TID_COUNT, and PGAIO_TID_INVALID.
Referenced by pg_get_aios().
|
extern |
Definition at line 483 of file aio.c.
References fb(), IoMethodOps::needs_synchronous_execution, PGAIO_HF_SYNCHRONOUS, and pgaio_method_ops.
Referenced by pgaio_io_stage().
|
extern |
Definition at line 116 of file aio_io.c.
References elog, END_CRIT_SECTION, ERROR, fb(), PgAioCtl::iovecs, pg_preadv(), pg_pwritev(), pgaio_ctl, pgaio_io_process_completion(), PGAIO_OP_INVALID, PGAIO_OP_READV, PGAIO_OP_WRITEV, pgstat_report_wait_end(), pgstat_report_wait_start(), and START_CRIT_SECTION.
Referenced by IoWorkerMain(), pgaio_io_stage(), and pgaio_worker_submit_internal().
|
extern |
Definition at line 510 of file aio.c.
References dclist_push_tail(), fb(), PgAioBackend::in_flight_ios, PGAIO_HS_SUBMITTED, pgaio_io_update_state(), and pgaio_my_backend.
Referenced by pgaio_io_stage(), and pgaio_worker_submit().
|
extern |
Definition at line 528 of file aio.c.
References Assert, ConditionVariableBroadcast(), CritSectionCount, fb(), INJECTION_POINT, MyProcNumber, PGAIO_HS_COMPLETED_IO, PGAIO_HS_COMPLETED_SHARED, PGAIO_HS_SUBMITTED, pgaio_io_call_complete_shared(), pgaio_io_reclaim(), and pgaio_io_update_state().
Referenced by IoWorkerMain(), and pgaio_io_perform_synchronously().
|
extern |
Definition at line 116 of file aio_target.c.
References Assert, fb(), PGAIO_OP_COUNT, PGAIO_OP_INVALID, pgaio_target_info, PGAIO_TID_COUNT, PGAIO_TID_INVALID, and PgAioTargetInfo::reopen.
Referenced by IoWorkerMain().
|
extern |
Definition at line 424 of file aio.c.
References Assert, DEBUG3, fb(), PgAioBackend::handed_out_io, HOLD_INTERRUPTS, PgAioBackend::in_batchmode, PgAioBackend::num_staged_ios, pgaio_debug_io, PGAIO_HS_DEFINED, PGAIO_HS_HANDED_OUT, PGAIO_HS_STAGED, pgaio_io_call_stage(), pgaio_io_has_target(), pgaio_io_needs_synchronous_execution(), pgaio_io_perform_synchronously(), pgaio_io_prepare_submit(), pgaio_io_update_state(), pgaio_my_backend, PGAIO_SUBMIT_BATCH_SIZE, pgaio_submit_staged(), RESUME_INTERRUPTS, and PgAioBackend::staged_ios.
Referenced by pgaio_io_start_readv(), and pgaio_io_start_writev().
|
extern |
Definition at line 197 of file aio_io.c.
References Assert, fb(), fd(), PGAIO_HS_DEFINED, PGAIO_OP_INVALID, PGAIO_OP_READV, and PGAIO_OP_WRITEV.
Referenced by pgaio_closing_fd().
|
extern |
Definition at line 559 of file aio.c.
References fb(), and pg_read_barrier.
Referenced by pgaio_io_wait(), and pgaio_wref_check_done().
| const char * pgaio_result_status_string | ( | PgAioResultStatus | rs | ) |
Definition at line 934 of file aio.c.
References fb(), PGAIO_RS_ERROR, PGAIO_RS_OK, PGAIO_RS_PARTIAL, PGAIO_RS_UNKNOWN, and PGAIO_RS_WARNING.
Referenced by pg_get_aios(), pgaio_io_call_complete_local(), pgaio_io_call_complete_shared(), and pgaio_io_reclaim().
Definition at line 1288 of file aio.c.
References Assert, AtEOXact_Aio(), dclist_count(), dclist_head_element, dclist_is_empty(), DEBUG2, fb(), PgAioBackend::handed_out_io, PgAioBackend::in_flight_ios, pgaio_debug_io, pgaio_io_wait(), and pgaio_my_backend.
Referenced by pgaio_init_backend().
|
extern |
Definition at line 78 of file aio.c.
Referenced by AioShmemInit(), IoWorkerMain(), pg_get_aios(), pgaio_init_backend(), pgaio_io_from_wref(), pgaio_io_get_handle_data(), pgaio_io_get_id(), pgaio_io_get_iovec(), pgaio_io_get_iovec_length(), pgaio_io_get_wref(), pgaio_io_perform_synchronously(), pgaio_io_set_handle_data_32(), pgaio_io_set_handle_data_64(), and pgaio_io_wait_for_free().
|
extern |
Definition at line 96 of file aio.c.
Referenced by AioShmemInit(), AioShmemSize(), assign_io_method(), pgaio_closing_fd(), pgaio_init_backend(), pgaio_io_needs_synchronous_execution(), pgaio_io_wait(), and pgaio_submit_staged().
|
extern |
Definition at line 81 of file aio.c.
Referenced by AtEOXact_Aio(), pgaio_closing_fd(), pgaio_enter_batchmode(), pgaio_error_cleanup(), pgaio_exit_batchmode(), pgaio_have_staged(), pgaio_init_backend(), pgaio_io_acquire_nb(), pgaio_io_before_start(), pgaio_io_prepare_submit(), pgaio_io_reclaim(), pgaio_io_release(), pgaio_io_release_resowner(), pgaio_io_stage(), pgaio_io_wait_for_free(), pgaio_shutdown(), and pgaio_submit_staged().
|
extern |
Definition at line 28 of file method_sync.c.
|
extern |
Definition at line 83 of file method_worker.c.