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.
63 * By covering, we mean changing the h_tail_lsn in the last on-disk
64 * log write such that no allocation transactions will be re-done during
65 * recovery after a system crash. Recovery starts at the last on-disk
69 * space allocation transactions which can undo non-transactional changes
82 * non-dummy transaction. The first dummy changes the h_tail_lsn to
91 * IDLE -- no logging has been done on the file system or
93 * NEED -- logging has occurred and we need a dummy transaction
95 * DONE -- we were in the NEED state and have committed a dummy
97 * NEED2 -- we detected that a dummy transaction has gone to the
99 * DONE2 -- we committed a dummy transaction when in the NEED2 state.
107 * 2.) When we finish writing the on-disk log (xlog_state_clean_log).
170 * - A log record header is 512 bytes. There is plenty of room to grow the
171 * xlog_rec_header_t into the reserved space.
172 * - ic_data follows, so a write to disk can start at the beginning of
174 * - ic_forcewait is used to implement synchronous forcing of the iclog to disk.
175 * - ic_next is the pointer to the next iclog in the ring.
176 * - ic_log is a pointer back to the global log structure.
177 * - ic_size is the full size of the log buffer, minus the cycle headers.
178 * - ic_offset is the current number of bytes written to in this iclog.
179 * - ic_refcnt is bumped when someone is writing to the log.
180 * - ic_state is the state of the iclog.
187 * - ic_callbacks
188 * - ic_refcnt
189 * - fields protected by the global l_icloglock
192 * We'll put all the read-only and l_icloglock fields in the first cacheline,
213 #define ic_header ic_data->hic_header
224 * The CIL context is used to aggregate per-transaction details as well be
225 * passed to the iclog for checkpoint post-commit processing. After being
285 * track both space consumed and the number of vectors in the checkpoint
288 * Every log buffer we write out during a push needs a header reserved, which
293 * io vectors, so limiting on a specific number of vectors is going to result
321 * CIL is large enough to maintain sufficient in-memory relogging to avoid
325 * issues when we are running low on memory - pinned memory cannot be reclaimed,
332 * - a threshold large enough that it allows CIL to be pushed and progress to be
334 * defined to be 12.5% of the log space - half the 25% push threshold of the
336 * - small enough that it doesn't pin excessive amounts of memory but maintains
346 * yeild the CPU, giving the CIL push work a chance to be scheduled and start
348 * the CIL because it is not yielding the CPU. We set the blocking limit at
352 * Note: this is not a -hard- limit as blocking is applied after the transaction
363 min_t(int, (log)->l_logsize >> 3, BBTOB(XLOG_TOTAL_REC_SHIFT(log)) << 4)
442 ((log)->l_buf_cancel_table + ((uint64_t)blkno % XLOG_BC_TABLE_SIZE))
445 (unlikely((log)->l_flags & XLOG_IO_ERROR))
473 *len -= bytes; in xlog_write_adv_cnt()
562 xlog_cil_force_lsn(log, log->l_cilp->xc_current_sequence); in xlog_cil_force()
612 cur_cycle = READ_ONCE(log->l_curr_cycle); in xlog_valid_lsn()
614 cur_block = READ_ONCE(log->l_curr_block); in xlog_valid_lsn()
623 spin_lock(&log->l_icloglock); in xlog_valid_lsn()
624 cur_cycle = log->l_curr_cycle; in xlog_valid_lsn()
625 cur_block = log->l_curr_block; in xlog_valid_lsn()
626 spin_unlock(&log->l_icloglock); in xlog_valid_lsn()