Merge branch 'akpm' (patches from Andrew)
Merge misc updates from Andrew Morton: - a few misc things - ocfs2 updates - most of MM * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (159 commits) tools/testing/selftests/proc/proc-self-syscall.c: remove duplicate include proc: more robust bulk read test proc: test /proc/*/maps, smaps, smaps_rollup, statm proc: use seq_puts() everywhere proc: read kernel cpu stat pointer once proc: remove unused argument in proc_pid_lookup() fs/proc/thread_self.c: code cleanup for proc_setup_thread_self() fs/proc/self.c: code cleanup for proc_setup_self() proc: return exit code 4 for skipped tests mm,mremap: bail out earlier in mremap_to under map pressure mm/sparse: fix a bad comparison mm/memory.c: do_fault: avoid usage of stale vm_area_struct writeback: fix inode cgroup switching comment mm/huge_memory.c: fix "orig_pud" set but not used mm/hotplug: fix an imbalance with DEBUG_PAGEALLOC mm/memcontrol.c: fix bad line in comment mm/cma.c: cma_declare_contiguous: correct err handling mm/page_ext.c: fix an imbalance with kmemleak mm/compaction: pass pgdat to too_many_isolated() instead of zone mm: remove zone_lru_lock() function, access ->lru_lock directly ...
This commit is contained in:
commit
8dcd175bc3
213 changed files with 4924 additions and 2321 deletions
|
|
@ -2220,6 +2220,9 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p)
|
|||
INIT_HLIST_HEAD(&p->preempt_notifiers);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_COMPACTION
|
||||
p->capture_control = NULL;
|
||||
#endif
|
||||
init_numa_balancing(clone_flags, p);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1173,7 +1173,7 @@ void init_numa_balancing(unsigned long clone_flags, struct task_struct *p)
|
|||
|
||||
/* New address space, reset the preferred nid */
|
||||
if (!(clone_flags & CLONE_VM)) {
|
||||
p->numa_preferred_nid = -1;
|
||||
p->numa_preferred_nid = NUMA_NO_NODE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1193,13 +1193,13 @@ void init_numa_balancing(unsigned long clone_flags, struct task_struct *p)
|
|||
|
||||
static void account_numa_enqueue(struct rq *rq, struct task_struct *p)
|
||||
{
|
||||
rq->nr_numa_running += (p->numa_preferred_nid != -1);
|
||||
rq->nr_numa_running += (p->numa_preferred_nid != NUMA_NO_NODE);
|
||||
rq->nr_preferred_running += (p->numa_preferred_nid == task_node(p));
|
||||
}
|
||||
|
||||
static void account_numa_dequeue(struct rq *rq, struct task_struct *p)
|
||||
{
|
||||
rq->nr_numa_running -= (p->numa_preferred_nid != -1);
|
||||
rq->nr_numa_running -= (p->numa_preferred_nid != NUMA_NO_NODE);
|
||||
rq->nr_preferred_running -= (p->numa_preferred_nid == task_node(p));
|
||||
}
|
||||
|
||||
|
|
@ -1413,7 +1413,7 @@ bool should_numa_migrate_memory(struct task_struct *p, struct page * page,
|
|||
* two full passes of the "multi-stage node selection" test that is
|
||||
* executed below.
|
||||
*/
|
||||
if ((p->numa_preferred_nid == -1 || p->numa_scan_seq <= 4) &&
|
||||
if ((p->numa_preferred_nid == NUMA_NO_NODE || p->numa_scan_seq <= 4) &&
|
||||
(cpupid_pid_unset(last_cpupid) || cpupid_match_pid(p, last_cpupid)))
|
||||
return true;
|
||||
|
||||
|
|
@ -1861,7 +1861,7 @@ static void numa_migrate_preferred(struct task_struct *p)
|
|||
unsigned long interval = HZ;
|
||||
|
||||
/* This task has no NUMA fault statistics yet */
|
||||
if (unlikely(p->numa_preferred_nid == -1 || !p->numa_faults))
|
||||
if (unlikely(p->numa_preferred_nid == NUMA_NO_NODE || !p->numa_faults))
|
||||
return;
|
||||
|
||||
/* Periodically retry migrating the task to the preferred node */
|
||||
|
|
@ -2108,7 +2108,7 @@ static int preferred_group_nid(struct task_struct *p, int nid)
|
|||
|
||||
static void task_numa_placement(struct task_struct *p)
|
||||
{
|
||||
int seq, nid, max_nid = -1;
|
||||
int seq, nid, max_nid = NUMA_NO_NODE;
|
||||
unsigned long max_faults = 0;
|
||||
unsigned long fault_types[2] = { 0, 0 };
|
||||
unsigned long total_faults;
|
||||
|
|
@ -2651,7 +2651,8 @@ static void update_scan_period(struct task_struct *p, int new_cpu)
|
|||
* the preferred node.
|
||||
*/
|
||||
if (dst_nid == p->numa_preferred_nid ||
|
||||
(p->numa_preferred_nid != -1 && src_nid != p->numa_preferred_nid))
|
||||
(p->numa_preferred_nid != NUMA_NO_NODE &&
|
||||
src_nid != p->numa_preferred_nid))
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue