Lines Matching full:we
72 * By covering, we mean changing the h_tail_lsn in the last on-disk
81 * might include space beyond the EOF. So if we just push the EOF a
89 * system is idle. We need two dummy transaction because the h_tail_lsn
101 * we are done covering previous transactions.
102 * NEED -- logging has occurred and we need a dummy transaction
104 * DONE -- we were in the NEED state and have committed a dummy
106 * NEED2 -- we detected that a dummy transaction has gone to the
108 * DONE2 -- we committed a dummy transaction when in the NEED2 state.
110 * There are two places where we switch states:
112 * 1.) In xfs_sync, when we detect an idle log and are in NEED or NEED2.
113 * We commit the dummy transaction and switch to DONE or DONE2,
114 * respectively. In all other states, we don't do anything.
116 * 2.) When we finish writing the on-disk log (xlog_state_clean_log).
118 * No matter what state we are in, if this isn't the dummy
120 * So, if we aren't in the DONE or DONE2 states, the next state
121 * is NEED. We can't be finishing a write of the dummy record
124 * If we are in the DONE state and this was a write of the
125 * dummy transaction, we move to NEED2.
127 * If we are in the DONE2 state and this was a write of the
128 * dummy transaction, we move to IDLE.
134 * This is why we have the NEED2 and DONE2 states before going idle.
171 * Because of cacheline contention on large machines, we need to separate
180 * so we need to ensure that these fields are located in separate cachelines.
181 * We'll put all the read-only and l_icloglock fields in the first cacheline,
254 * we can avoid the problem of having to hold out new transactions during a
255 * flush until we have a the commit record LSN of the checkpoint. We can
258 * checkpoint is still in the process of committing, we can block waiting for
291 * The amount of log space we allow the CIL to aggregate is difficult to size.
292 * Whatever we choose, we have to make sure we can get a reservation for the
295 * the log or induces too much latency when writing out through the iclogs. We
297 * context, so we need to decide which to use for limiting.
299 * Every log buffer we write out during a push needs a header reserved, which
300 * is at least one sector and more for v2 logs. Hence we need a reservation of
302 * 16KB of reservation per megabyte of delayed logging space we will consume,
312 * can block on log pushes. Hence if we have to regrant log space during a log
313 * push, we can deadlock.
315 * However, we can avoid this by use of a dynamic "reservation stealing"
318 * space needed by the checkpoint transaction. This means that we never need to
319 * specifically reserve space for the CIL checkpoint transaction, nor do we
324 * With dynamic reservations, we can effectively make up arbitrary limits for
326 * Recovery imposes a rule that no transaction exceed half the log, so we are
328 * tries to keep 25% of the log free, so we need to keep below that limit or we
331 * In order to keep background CIL push efficient, we only need to ensure the
333 * repeated physical writes of frequently modified metadata. If we allow the CIL
334 * to grow to a substantial fraction of the log, then we may be pinning hundreds
336 * issues when we are running low on memory - pinned memory cannot be reclaimed,
337 * and the CIL consumes a lot of memory. Hence we need to set an upper physical
353 * To prevent the CIL from overflowing upper commit size bounds, we introduce a
354 * new threshold at which we block committing transactions until the background
359 * the CIL because it is not yielding the CPU. We set the blocking limit at
360 * twice the background push space threshold so we keep in line with the AIL
367 * in the CIL commit fast path, and it's not at all clear that we actually need
368 * such hard limits given the ~7 years we've run without a hard limit before
371 * 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
547 * When we crack the grant head, we sample it first so that the value will not
548 * change while we are cracking it into the component values. This means we
647 * a transiently forward state. Instead, we can see the LSN in a in xlog_valid_lsn()
648 * transiently behind state if we happen to race with a cycle wrap. in xlog_valid_lsn()
675 * Log vector and shadow buffers can be large, so we need to use kvmalloc() here
677 * to fall back to vmalloc, so we can't actually do anything useful with gfp
680 * horrendously expensive. We just want kmalloc to fail fast and fall back to
682 * buddy allocator. Hence we have to open code kvmalloc outselves here.
685 * despite the use of GFP_KERNEL here, we are going to be doing GFP_NOFS