7 Matching Annotations
  1. Last 7 days
    1. if (start != vma->vm_start) { error = split_vma(&vmi, vma, start, 1); if (error) return error; } if (end != vma->vm_end) { error = split_vma(&vmi, vma, end, 0); if (error) return error; }

      The VMA is split at the start address if the specified start is different from the current beginning of the VMA, or if the specified end address is different from the current end of the VMA, the VMA is split.

    2. pgoff = vma->vm_pgoff + ((start - vma->vm_start) >> PAGE_SHIFT); *prev = vma_merge(&vmi, mm, *prev, start, end, new_flags, vma->anon_vma, vma->vm_file, pgoff, vma_policy(vma), vma->vm_userfaultfd_ctx, anon_name); if (*prev) { vma = *prev; goto success; }

      This attempts to merge a VMA with a previous one based on the vma's parameters.

    3. if (new_flags == vma->vm_flags && anon_vma_name_eq(anon_vma_name(vma), anon_name)) { *prev = vma; return 0; }

      This check decides not to update if the new flags for theVMA are the same as the existing flags and if the anonymous VMA name is equal to the provided name. This decision is probably used to prevent unnecessary updates.

    1. if (memcg && !mm_match_cgroup(vma->vm_mm, memcg)) return true;

      The decision being made here is whether to ignore references from a VMA based on whether the current reclaim operation is associated with a specific cgroup. If the condition is met, references from this mapping will be excluded from counting and disregarded in the reclaim process.

    2. if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) { if (pmdp_clear_flush_young_notify(vma, address, pvmw.pmd)) referenced++;

      CONFIG_TRANSPARENT_HUGEPAGE option determines whether the code will perform specific operations updating the reference status of a huge page.

    3. if (lru_gen_enabled() && pte_young(ptep_get(pvmw.pte))) { lru_gen_look_around(&pvmw); referenced++; }

      This is used to manage how memory pages are tracked. If LRU generation feature is active, it adjusts the reference counts of memory pages to reflect their recent usage..

    4. if (pending != flushed) { arch_flush_tlb_batched_pending(mm);

      This code decides whether to perform a TLB flush based on whether there are pending flushes that haven't been completed.