Lines Matching full:we
74 * By covering, we mean changing the h_tail_lsn in the last on-disk
83 * might include space beyond the EOF. So if we just push the EOF a
91 * system is idle. We need two dummy transaction because the h_tail_lsn
103 * we are done covering previous transactions.
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.
112 * There are two places where we switch states:
114 * 1.) In xfs_sync, when we detect an idle log and are in NEED or NEED2.
115 * We commit the dummy transaction and switch to DONE or DONE2,
116 * respectively. In all other states, we don't do anything.
118 * 2.) When we finish writing the on-disk log (xlog_state_clean_log).
120 * No matter what state we are in, if this isn't the dummy
122 * So, if we aren't in the DONE or DONE2 states, the next state
123 * is NEED. We can't be finishing a write of the dummy record
126 * If we are in the DONE state and this was a write of the
127 * dummy transaction, we move to NEED2.
129 * If we are in the DONE2 state and this was a write of the
130 * dummy transaction, we move to IDLE.
136 * This is why we have the NEED2 and DONE2 states before going idle.
173 * Because of cacheline contention on large machines, we need to separate
182 * so we need to ensure that these fields are located in separate cachelines.
183 * We'll put all the read-only and l_icloglock fields in the first cacheline,
261 * we can avoid the problem of having to hold out new transactions during a
262 * flush until we have a the commit record LSN of the checkpoint. We can
265 * checkpoint is still in the process of committing, we can block waiting for
295 * The amount of log space we allow the CIL to aggregate is difficult to size.
296 * Whatever we choose, we have to make sure we can get a reservation for the
299 * the log or induces too much latency when writing out through the iclogs. We
301 * context, so we need to decide which to use for limiting.
303 * Every log buffer we write out during a push needs a header reserved, which
304 * is at least one sector and more for v2 logs. Hence we need a reservation of
306 * 16KB of reservation per megabyte of delayed logging space we will consume,
316 * can block on log pushes. Hence if we have to regrant log space during a log
317 * push, we can deadlock.
319 * However, we can avoid this by use of a dynamic "reservation stealing"
322 * space needed by the checkpoint transaction. This means that we never need to
323 * specifically reserve space for the CIL checkpoint transaction, nor do we
328 * With dynamic reservations, we can effectively make up arbitrary limits for
330 * Recovery imposes a rule that no transaction exceed half the log, so we are
332 * tries to keep 25% of the log free, so we need to keep below that limit or we
335 * In order to keep background CIL push efficient, we only need to ensure the
337 * repeated physical writes of frequently modified metadata. If we allow the CIL
338 * to grow to a substantial fraction of the log, then we may be pinning hundreds
340 * issues when we are running low on memory - pinned memory cannot be reclaimed,
341 * and the CIL consumes a lot of memory. Hence we need to set an upper physical
357 * To prevent the CIL from overflowing upper commit size bounds, we introduce a
358 * new threshold at which we block committing transactions until the background
363 * the CIL because it is not yielding the CPU. We set the blocking limit at
364 * twice the background push space threshold so we keep in line with the AIL
371 * in the CIL commit fast path, and it's not at all clear that we actually need
372 * such hard limits given the ~7 years we've run without a hard limit before
375 * we've overrun the max size.
522 * When we crack an atomic LSN, we sample it first so that the value will not
523 * change while we are cracking it into the component values. This means we
639 * a transiently forward state. Instead, we can see the LSN in a in xlog_valid_lsn()
640 * transiently behind state if we happen to race with a cycle wrap. in xlog_valid_lsn()
667 * Log vector and shadow buffers can be large, so we need to use kvmalloc() here
669 * to fall back to vmalloc, so we can't actually do anything useful with gfp
672 * horrendously expensive. We just want kmalloc to fail fast and fall back to
674 * buddy allocator. Hence we have to open code kvmalloc outselves here.
677 * despite the use of GFP_KERNEL here, we are going to be doing GFP_NOFS