/* * Copyright (C) 2014 Davidlohr Bueso. */ #include <linux/sched/signal.h> #include <linux/sched/task.h> #include <linux/mm.h> #include <linux/vmacache.h> /* * Flush vma caches for threads that share a given mm. * * The operation is safe because the caller holds the mmap_sem * exclusively and other threads accessing the vma cache will * have mmap_sem held at least for read, so no extra locking * is required to maintain the vma cache. */
void vmacache_flush_all(struct mm_struct *mm) { struct task_struct *g, *p; count_vm_vmacache_event(VMACACHE_FULL_FLUSHES); /* * Single threaded tasks need not iterate the entire * list of process. We can avoid the flushing as well * since the mm's seqnum was increased and don't have * to worry about other threads' seqnum. Current's * flush will occur upon the next lookup. */ if (atomic_read(&mm->mm_users) == 1) return; rcu_read_lock(); for_each_process_thread(g, p) { /* * Only flush the vmacache pointers as the * mm seqnum is already set and curr's will * be set upon invalidation when the next * lookup is done. */ if (mm == p->mm) vmacache_flush(p); } rcu_read_unlock(); }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Davidlohr Bueso A | 65 | 100.00% | 3 | 100.00% |
Total | 65 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Davidlohr Bueso A | 28 | 100.00% | 2 | 100.00% |
Total | 28 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Davidlohr Bueso A | 35 | 94.59% | 1 | 50.00% |
Ingo Molnar | 2 | 5.41% | 1 | 50.00% |
Total | 37 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Davidlohr Bueso A | 61 | 91.04% | 1 | 50.00% |
Ingo Molnar | 6 | 8.96% | 1 | 50.00% |
Total | 67 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Davidlohr Bueso A | 85 | 77.98% | 2 | 40.00% |
Linus Torvalds | 17 | 15.60% | 1 | 20.00% |
Alexey Dobriyan | 5 | 4.59% | 1 | 20.00% |
Ingo Molnar | 2 | 1.83% | 1 | 20.00% |
Total | 109 | 100.00% | 5 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Davidlohr Bueso A | 90 | 92.78% | 2 | 50.00% |
Alexey Dobriyan | 5 | 5.15% | 1 | 25.00% |
Ingo Molnar | 2 | 2.06% | 1 | 25.00% |
Total | 97 | 100.00% | 4 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Davidlohr Bueso A | 380 | 89.83% | 5 | 50.00% |
Linus Torvalds | 17 | 4.02% | 1 | 10.00% |
Ingo Molnar | 16 | 3.78% | 3 | 30.00% |
Alexey Dobriyan | 10 | 2.36% | 1 | 10.00% |
Total | 423 | 100.00% | 10 | 100.00% |