Lines Matching +full:reserved +full:- +full:cpu +full:- +full:vectors
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
74 * By covering, we mean changing the h_tail_lsn in the last on-disk
75 * log write such that no allocation transactions will be re-done during
76 * recovery after a system crash. Recovery starts at the last on-disk
80 * space allocation transactions which can undo non-transactional changes
93 * non-dummy transaction. The first dummy changes the h_tail_lsn to
102 * IDLE -- no logging has been done on the file system or
104 * NEED -- logging has occurred and we need a dummy transaction
106 * DONE -- we were in the NEED state and have committed a dummy
108 * NEED2 -- we detected that a dummy transaction has gone to the
110 * DONE2 -- we committed a dummy transaction when in the NEED2 state.
118 * 2.) When we finish writing the on-disk log (xlog_state_clean_log).
161 * - A log record header is 512 bytes. There is plenty of room to grow the
162 * xlog_rec_header_t into the reserved space.
163 * - ic_data follows, so a write to disk can start at the beginning of
165 * - ic_forcewait is used to implement synchronous forcing of the iclog to disk.
166 * - ic_next is the pointer to the next iclog in the ring.
167 * - ic_log is a pointer back to the global log structure.
168 * - ic_size is the full size of the log buffer, minus the cycle headers.
169 * - ic_offset is the current number of bytes written to in this iclog.
170 * - ic_refcnt is bumped when someone is writing to the log.
171 * - ic_state is the state of the iclog.
178 * - ic_callbacks
179 * - ic_refcnt
180 * - fields protected by the global l_icloglock
183 * We'll put all the read-only and l_icloglock fields in the first cacheline,
202 #define ic_header ic_data->hic_header
213 * The CIL context is used to aggregate per-transaction details as well be
214 * passed to the iclog for checkpoint post-commit processing. After being
244 * Per-cpu CIL tracking items
300 * track both space consumed and the number of vectors in the checkpoint
303 * Every log buffer we write out during a push needs a header reserved, which
308 * io vectors, so limiting on a specific number of vectors is going to result
336 * CIL is large enough to maintain sufficient in-memory relogging to avoid
340 * issues when we are running low on memory - pinned memory cannot be reclaimed,
347 * - a threshold large enough that it allows CIL to be pushed and progress to be
349 * defined to be 12.5% of the log space - half the 25% push threshold of the
351 * - small enough that it doesn't pin excessive amounts of memory but maintains
361 * yeild the CPU, giving the CIL push work a chance to be scheduled and start
363 * the CIL because it is not yielding the CPU. We set the blocking limit at
367 * Note: this is not a -hard- limit as blocking is applied after the transaction
378 min_t(int, (log)->l_logsize >> 3, BBTOB(XLOG_TOTAL_REC_SHIFT(log)) << 4)
465 return test_bit(XLOG_RECOVERY_NEEDED, &log->l_opstate); in xlog_recovery_needed()
471 return test_bit(XLOG_ACTIVE_RECOVERY, &log->l_opstate); in xlog_in_recovery()
477 return test_bit(XLOG_IO_ERROR, &log->l_opstate); in xlog_is_shutdown()
488 wait_var_event(&log->l_opstate, xlog_is_shutdown(log)); in xlog_shutdown_wait()
568 xlog_cil_force_seq(log, log->l_cilp->xc_current_sequence); in xlog_cil_force()
592 __releases(iclog->ic_log->l_icloglock);
607 return BBTOB(hi_block - lo_block); in xlog_lsn_sub()
609 return (uint64_t)log->l_logsize - BBTOB(lo_block - hi_block); in xlog_lsn_sub()
642 cur_cycle = READ_ONCE(log->l_curr_cycle); in xlog_valid_lsn()
644 cur_block = READ_ONCE(log->l_curr_block); in xlog_valid_lsn()
653 spin_lock(&log->l_icloglock); in xlog_valid_lsn()
654 cur_cycle = log->l_curr_cycle; in xlog_valid_lsn()
655 cur_block = log->l_curr_block; in xlog_valid_lsn()
656 spin_unlock(&log->l_icloglock); in xlog_valid_lsn()