| /linux/fs/btrfs/ |
| H A D | space-info.c | 29 * 1) space_info. This is the ultimate arbiter of how much space we can use. 32 * reservations we care about total_bytes - SUM(space_info->bytes_) when 37 * metadata reservation we have. You can see the comment in the block_rsv 41 * 3) btrfs_calc*_size. These are the worst case calculations we used based 42 * on the number of items we will want to modify. We have one for changing 43 * items, and one for inserting new items. Generally we use these helpers to 49 * We call into either btrfs_reserve_data_bytes() or 50 * btrfs_reserve_metadata_bytes(), depending on which we're looking for, with 51 * num_bytes we wan [all...] |
| H A D | direct-io.c | 65 * We're concerned with the entire range that we're going to be in lock_extent_direct() 66 * doing DIO to, so we need to make sure there's no ordered in lock_extent_direct() 73 * We need to make sure there are no buffered pages in this in lock_extent_direct() 74 * range either, we could have raced between the invalidate in in lock_extent_direct() 93 * If we are doing a DIO read and the ordered extent we in lock_extent_direct() 94 * found is for a buffered write, we can not wait for it in lock_extent_direct() 95 * to complete and retry, because if we do so we ca in lock_extent_direct() [all...] |
| H A D | fiemap.c | 30 * - Cache the next entry to be emitted to the fiemap buffer, so that we can 35 * buffer is memory mapped to the fiemap target file, we don't deadlock 36 * during btrfs_page_mkwrite(). This is because during fiemap we are locking 40 * if the fiemap buffer is memory mapped to the file we are running fiemap 53 * the next file extent item we must search for in the inode's subvolume 59 * This matches struct fiemap_extent_info::fi_mapped_extents, we use it 61 * fiemap_fill_next_extent() because we buffer ready fiemap entries at 62 * the @entries array, and we want to stop as soon as we hit the max 86 * Ignore 1 (reached max entries) because we kee in flush_fiemap_cache() [all...] |
| /linux/fs/xfs/ |
| H A D | xfs_log_cil.c | 23 * recover, so we don't allow failure here. Also, we allocate in a context that 24 * we don't want to be issuing transactions from, so we need to tell the 27 * We don't reserve any space for the ticket - we are going to steal whatever 28 * space we require from transactions as they commit. To ensure we reserve all 29 * the space required, we need to set the current reservation of the ticket to 30 * zero so that we kno [all...] |
| H A D | xfs_log_priv.h | 94 * By covering, we mean changing the h_tail_lsn in the last on-disk 103 * might include space beyond the EOF. So if we just push the EOF a 111 * system is idle. We need two dummy transaction because the h_tail_lsn 123 * we are done covering previous transactions. 124 * NEED -- logging has occurred and we need a dummy transaction 126 * DONE -- we were in the NEED state and have committed a dummy 128 * NEED2 -- we detected that a dummy transaction has gone to the 130 * DONE2 -- we committed a dummy transaction when in the NEED2 state. 132 * There are two places where we switch states: 134 * 1.) In xfs_sync, when we detec [all...] |
| H A D | xfs_log.c | 122 * we have overrun available reservation space, return 0. The memory barrier 240 * path. Hence any lock will be globally hot if we take it unconditionally on 243 * As tickets are only ever moved on and off head->waiters under head->lock, we 244 * only need to take that lock if we are going to add the ticket to the queue 245 * and sleep. We can avoid taking the lock if the ticket was never added to 246 * head->waiters because the t_queue list head will be empty and we hold the 263 * logspace before us. Wake up the first waiters, if we do not wake in xlog_grant_head_check() 325 * This is a new transaction on the ticket, so we need to change the in xfs_log_regrant() 327 * the log. Just add one to the existing tid so that we can see chains in xfs_log_regrant() 348 * If we ar in xfs_log_regrant() [all...] |
| H A D | xfs_log_recover.c | 78 * Pass log block 0 since we don't have an addr yet, buffer will be in xlog_alloc_buffer() 88 * We do log I/O in units of log sectors (a power-of-2 multiple of the in xlog_alloc_buffer() 89 * basic block size), so we round up the requested size to accommodate in xlog_alloc_buffer() 97 * blocks (sector size 1). But otherwise we extend the buffer by one in xlog_alloc_buffer() 249 * h_fs_uuid is null, we assume this log was last mounted in xlog_header_check_mount() 328 * range of basic blocks we'll be examining. If that fails, in xlog_find_verify_cycle() 329 * try a smaller size. We need to be able to read at least in xlog_find_verify_cycle() 330 * a log sector, or we're out of luck. in xlog_find_verify_cycle() 385 * a good log record. Therefore, we subtract one to get the block number 387 * of blocks we woul [all...] |
| H A D | xfs_reflink.c | 45 * alter the blocks in a different file; the way that we'll do that is 47 * means that when we want to write to a shared block, we allocate a new 48 * block, write the data to the new block, and if that succeeds we map the 54 * for bigger chunks less often, which is exactly what we want for CoW. 57 * writable (write_begin or page_mkwrite). If the offset is not mapped, we 82 * We want to adapt the delalloc mechanism for copy-on-write, since the 85 * the mappings must be stored in a separate CoW fork because we do not want 86 * to disturb the mapping in the data fork until we're sure that the write 95 * Just prior to submitting the actual disk write requests, we conver [all...] |
| /linux/arch/powerpc/mm/nohash/ |
| H A D | tlb_low_64e.S | 91 /* We need _PAGE_PRESENT and _PAGE_ACCESSED set */ 93 /* We do the user/kernel test for the PID here along with the RW test 95 /* We pre-test some combination of permissions to avoid double 98 * We move the ESR:ST bit into the position of _PAGE_BAP_SW in the PTE 103 * writeable, we will take a new fault later, but that should be 106 * We also move ESR_ST in _PAGE_DIRTY position 109 * MAS1 is preset for all we need except for TID that needs to 137 * We are entered with: 176 /* Now we build the MAS: 219 /* We need to check if it was an instruction miss */ [all …]
|
| /linux/drivers/usb/dwc2/ |
| H A D | hcd_queue.c | 32 /* If we get a NAK, wait this long before retrying */ 121 * @num_bits: The number of bits we need per period we want to reserve 123 * @interval: How often we need to be scheduled for the reservation this 127 * the interval or we return failure right away. 128 * @only_one_period: Normally we'll allow picking a start anywhere within the 129 * first interval, since we can still make all repetition 131 * here then we'll return failure if we can't fit within 134 * The idea here is that we want to schedule time for repeating events that all 139 * To keep things "simple", we'll represent our schedule with a bitmap that 141 * but does mean that we need to handle things specially (and non-ideally) if [all …]
|
| /linux/drivers/misc/vmw_vmci/ |
| H A D | vmci_route.c | 33 * which comes from the VMX, so we know it is coming from a in vmci_route() 36 * To avoid inconsistencies, test these once. We will test in vmci_route() 37 * them again when we do the actual send to ensure that we do in vmci_route() 49 * If this message already came from a guest then we in vmci_route() 57 * We must be acting as a guest in order to send to in vmci_route() 63 /* And we cannot send if the source is the host context. */ in vmci_route() 71 * then they probably mean ANY, in which case we in vmci_route() 87 * If it is not from a guest but we are acting as a in vmci_route() 88 * guest, then we need to send it down to the host. in vmci_route() 89 * Note that if we are also acting as a host then this in vmci_route() [all …]
|
| /linux/fs/xfs/scrub/ |
| H A D | alloc_repair.c | 48 * AG. Therefore, we can recreate the free extent records in an AG by looking 60 * walking the rmapbt records, we create a second bitmap @not_allocbt_blocks to 72 * The OWN_AG bitmap itself isn't needed after this point, so what we really do 83 * written to the new btree indices. We reconstruct both bnobt and cntbt at 84 * the same time since we've already done all the work. 86 * We use the prefix 'xrep_abt' here because we regenerate both free space 115 * Next block we anticipate seeing in the rmap records. If the next 116 * rmap record is greater than next_agbno, we have found unused space. 123 /* Longest free extent we foun [all...] |
| H A D | fscounters.c | 32 * The basics of filesystem summary counter checking are that we iterate the 35 * Then we compare what we computed against the in-core counters. 38 * While we /could/ freeze the filesystem and scramble around the AGs counting 39 * the free blocks, in practice we prefer not do that for a scan because 40 * freezing is costly. To get around this, we added a per-cpu counter of the 41 * delalloc reservations so that we can rotor around the AGs relatively 42 * quickly, and we allow the counts to be slightly off because we're not taking 43 * any locks while we d [all...] |
| /linux/Documentation/filesystems/ |
| H A D | directory-locking.rst | 10 When taking the i_rwsem on multiple non-directory objects, we 11 always acquire the locks in order by increasing address. We'll call 22 * lock the directory we are accessing (shared) 26 * lock the directory we are accessing (exclusive) 73 in its own right; it may happen as part of lookup. We speak of the 74 operations on directory trees, but we obviously do not have the full 75 picture of those - especially for network filesystems. What we have 77 Trees grow as we do operations; memory pressure prunes them. Normally 78 that's not a problem, but there is a nasty twist - what should we do 83 possibility that directory we see in one place gets moved by the server [all …]
|
| H A D | propagate_umount.txt | 3 Umount propagation starts with a set of mounts we are already going to 4 take out. Ideally, we would like to add all downstream cognates to 39 However, we rely upon umount_tree() doing that pretty much immediately 51 We are given a closed set U and we want to find all mounts that have 64 subtrees of U, in which case we'd end up examining the same candidates 70 Note that if we run into a candidate we'd already seen, it must've been 73 if we find a child already added to the set, we know that everything 93 keep walking Propagation(p) from q until we find something 96 would get rid of that problem, but we need a sane implementation of 99 skip_them() being "repeat the forward-and-up part until we get NULL [all …]
|
| H A D | idmappings.rst | 23 on, we will always prefix ids with ``u`` or ``k`` to make it clear whether 24 we're talking about an id in the upper or lower idmapset. 42 that make it easier to understand how we can translate between idmappings. For 43 example, we know that the inverse idmapping is an order isomorphism as well:: 49 Given that we are dealing with order isomorphisms plus the fact that we're 50 dealing with subsets we can embed idmappings into each other, i.e. we can 51 sensibly translate between different idmappings. For example, assume we've been 61 Because we're dealing with order isomorphic subsets it is meaningful to ask 64 mapping ``k11000`` up to ``u1000``. Afterwards, we can map ``u1000`` down using 69 If we were given the same task for the following three idmappings:: [all …]
|
| /linux/drivers/gpu/drm/i915/gt/ |
| H A D | intel_execlists_submission.c | 24 * shouldn't we just need a set of those per engine command streamer? This is 35 * Regarding the creation of contexts, we have: 43 * like before) we need: 50 * more complex, because we don't know at creation time which engine is going 51 * to use them. To handle this, we have implemented a deferred creation of LR 55 * gets populated for a given engine once we receive an execbuffer. If later 56 * on we receive another execbuffer ioctl for the same context but a different 57 * engine, we allocate/populate a new ringbuffer and context backing object and 61 * only allowed with the render ring, we can allocate & populate them right 96 * we us [all...] |
| /linux/arch/openrisc/mm/ |
| H A D | fault.c | 59 * We fault-in kernel-space virtual memory on-demand. The in do_page_fault() 62 * NOTE! We MUST NOT take any locks for this case. We may in do_page_fault() 68 * mappings we don't have to walk all processes pgdirs and in do_page_fault() 69 * add the high mappings all at once. Instead we do it as they in do_page_fault() 82 /* If exceptions were enabled, we can reenable them here */ in do_page_fault() 100 * If we're in an interrupt or have no user in do_page_fault() 101 * context, we must not take the fault.. in do_page_fault() 125 * we get page-aligned addresses so we can only check in do_page_fault() 126 * if we're within a page from usp, but that might be in do_page_fault() 137 * Ok, we have a good vm_area for this memory access, so in do_page_fault() [all …]
|
| /linux/Documentation/driver-api/thermal/ |
| H A D | cpu-idle-cooling.rst | 25 because of the OPP density, we can only choose an OPP with a power 35 If we can remove the static and the dynamic leakage for a specific 38 injection period, we can mitigate the temperature by modulating the 47 At a specific OPP, we can assume that injecting idle cycle on all CPUs 49 idle state target residency, we lead to dropping the static and the 69 We use a fixed duration of idle injection that gives an acceptable 132 - It is less than or equal to the latency we tolerate when the 134 user experience, reactivity vs performance trade off we want. This 137 - It is greater than the idle state’s target residency we want to go 138 for thermal mitigation, otherwise we en [all...] |
| /linux/drivers/scsi/aic7xxx/ |
| H A D | aic79xx.seq | 85 * If we have completions stalled waiting for the qfreeze 109 * ENSELO is cleared by a SELDO, so we must test for SELDO 149 * We have received good status for this transaction. There may 169 * Since this status did not consume a FIFO, we have to 170 * be a bit more dilligent in how we check for FIFOs pertaining 178 * count in the SCB. In this case, we allow the routine servicing 183 * we detect case 1, we will properly defer the post of the SCB 222 * bad SCSI status (currently only for underruns), we 223 * queue the SCB for normal completion. Otherwise, we 258 * If we have relatively few commands outstanding, don't [all …]
|
| /linux/fs/jbd2/ |
| H A D | transaction.c | 70 * have an existing running transaction: we only make a new transaction 71 * once we have started to commit the old one). 74 * The journal MUST be locked. We don't perform atomic mallocs on the 75 * new transaction and we can't block without protecting against other 175 * We don't call jbd2_might_wait_for_commit() here as there's no in wait_transaction_switching() 198 * Wait until we can add credits for handle to the running transaction. Called 200 * transaction. Returns 1 if we had to wait, j_state_lock is dropped, and 204 * value, we need to fake out sparse so ti doesn't complain about a 229 * potential buffers requested by this operation, we need to in add_transaction_credits() 236 * then start to commit it: we can then go back and in add_transaction_credits() [all …]
|
| /linux/drivers/md/bcache/ |
| H A D | bcache.h | 29 * "cached" data is always dirty. The end result is that we get thin 38 * operation all of our available space will be allocated. Thus, we need an 39 * efficient way of deleting things from the cache so we can write new things to 42 * To do this, we first divide the cache device up into buckets. A bucket is the 51 * The priority is used to implement an LRU. We reset a bucket's priority when 52 * we allocate it or on cache it, and every so often we decrement the priority 59 * we have to do is increment its gen (and write its new gen to disk; we batch 62 * Bcache is entirely COW - we never write twice to a bucket, even buckets that 110 * Our unit of allocation is a bucket, and we can't arbitrarily allocate and 113 * (If buckets are really big we'll only use part of the bucket for a btree node [all …]
|
| /linux/arch/x86/entry/ |
| H A D | entry_64.S | 124 * Try to use SYSRET instead of IRET if we're returning to 125 * a completely clean 64-bit userspace context. If we're not, 127 * In the Xen PV case we must use iret anyway. 134 * We win! This label is here just for ease of understanding 153 * We are on the trampoline stack. All regs except RDI are live. 154 * We can do future final exit work right here. 223 * rax: prev task we switched from 605 * We are on the trampoline stack. All regs except RDI are live. 606 * We can do future final exit work right here. 643 * Are we returnin [all...] |
| /linux/Documentation/arch/powerpc/ |
| H A D | pci_iov_resource_on_powernv.rst | 40 The following section provides a rough description of what we have on P8 52 For DMA, MSIs and inbound PCIe error messages, we have a table (in 55 We call this the RTT. 57 - For DMA we then provide an entire address space for each PE that can 63 - For MSIs, we have two windows in the address space (one at the top of 87 32-bit PCIe accesses. We configure that window at boot from FW and 91 reserved for MSIs but this is not a problem at this point; we just 93 ignores that however and will forward in that space if we try). 100 Now, this is the "main" window we use in Linux today (excluding 101 SR-IOV). We basically use the trick of forcing the bridge MMIO windows [all …]
|
| /linux/scripts/ |
| H A D | generate_builtin_ranges.awk | 12 # If we have seen this object before, return information from the cache. 36 # name (e.g. core). We check the associated module file name, and if 55 # We use a modified absolute start address (soff + base) as index because we 58 # So, we use (addr << 1) + 1 to allow a possible anchor record to be placed at 75 # and we record the object name "crypto/lzo-rle". 89 # We collect the base address of the section in order to convert all addresses 92 # We collect the address of the anchor (or first symbol in the section if there 96 # We collect the start address of any sub-section (section included in the top 108 # which format we ar [all...] |