Data Structures |
struct | txg_handle |
struct | txg_node |
struct | txg_list |
Defines |
#define | TXG_CONCURRENT_STATES 3 |
| open, quiescing, syncing
|
#define | TXG_SIZE 4 |
| next power of 2
|
#define | TXG_MASK (TXG_SIZE - 1) |
| mask for size
|
#define | TXG_INITIAL TXG_SIZE |
| initial txg
|
#define | TXG_IDX (txg & TXG_MASK) |
#define | TXG_DEFER_SIZE 2 |
| Number of txgs worth of frees we defer adding to in-core spacemaps.
|
#define | TXG_WAIT 1ULL |
#define | TXG_NOWAIT 2ULL |
#define | TXG_CLEAN(txg) ((txg) - 1) |
Typedefs |
typedef struct tx_cpu | tx_cpu_t |
typedef struct txg_handle | txg_handle_t |
typedef struct txg_node | txg_node_t |
typedef struct txg_list | txg_list_t |
Functions |
void | txg_init (struct dsl_pool *dp, uint64_t txg) |
| Prepares the txg subsystem.
|
void | txg_fini (struct dsl_pool *dp) |
| Closes down the txg subsystem.
|
void | txg_sync_start (struct dsl_pool *dp) |
| Starts syncing transaction groups.
|
void | txg_sync_stop (struct dsl_pool *dp) |
| Stops syncing transaction groups.
|
uint64_t | txg_hold_open (struct dsl_pool *dp, txg_handle_t *txghp) |
void | txg_rele_to_quiesce (txg_handle_t *txghp) |
void | txg_rele_to_sync (txg_handle_t *txghp) |
void | txg_register_callbacks (txg_handle_t *txghp, list_t *tx_callbacks) |
void | txg_delay (struct dsl_pool *dp, uint64_t txg, int ticks) |
| Delay the caller by the specified number of ticks or until the txg closes (whichever comes first).
|
void | txg_wait_synced (struct dsl_pool *dp, uint64_t txg) |
| Wait until the given transaction group has finished syncing.
|
void | txg_wait_open (struct dsl_pool *dp, uint64_t txg) |
| Wait until the given transaction group, or one after it, is the open transaction group.
|
boolean_t | txg_stalled (struct dsl_pool *dp) |
| Are we waiting for the syncing transaction to complete?
|
boolean_t | txg_sync_waiting (struct dsl_pool *dp) |
void | txg_list_create (txg_list_t *tl, size_t offset) |
| Per-txg object lists.
|
void | txg_list_destroy (txg_list_t *tl) |
boolean_t | txg_list_empty (txg_list_t *tl, uint64_t txg) |
int | txg_list_add (txg_list_t *tl, void *p, uint64_t txg) |
| Add an entry to the list.
|
int | txg_list_add_tail (txg_list_t *tl, void *p, uint64_t txg) |
| Add an entry to the end of the list (walks list to find end).
|
void * | txg_list_remove (txg_list_t *tl, uint64_t txg) |
| Remove the head of the list and return it.
|
void * | txg_list_remove_this (txg_list_t *tl, void *p, uint64_t txg) |
| Remove a specific item from the list and return it.
|
int | txg_list_member (txg_list_t *tl, void *p, uint64_t txg) |
void * | txg_list_head (txg_list_t *tl, uint64_t txg) |
| Walk a txg list - only safe if you know it's not changing.
|
void * | txg_list_next (txg_list_t *tl, void *p, uint64_t txg) |
void txg_delay |
( |
dsl_pool_t * |
dp, |
|
|
uint64_t |
txg, |
|
|
int |
ticks |
|
) |
| |
Delay the caller by the specified number of ticks or until the txg closes (whichever comes first).
This is intended to be used to throttle writers when the system nears its capacity.
Delay the caller by the specified number of ticks or until the txg closes (whichever comes first).
Abort the delay if this txg stalls or enters the quiesing state.
Definition at line 509 of file txg.c.
void txg_wait_open |
( |
struct dsl_pool * |
dp, |
|
|
uint64_t |
txg |
|
) |
| |
Wait until the given transaction group, or one after it, is the open transaction group.
Try to make this happen as soon as possible (eg. kick off any necessary syncs immediately). If txg == 0, wait for the next open txg.
Definition at line 557 of file txg.c.