| Date | Tue, 30 Oct 2012 15:23:22 -0400 | From | Rik van Riel <> | Subject | Re: [PATCH 26/31] sched, numa, mm: Add fault driven placement and migration policy |
| |
On 10/25/2012 08:16 AM, Peter Zijlstra wrote: > +/* > + * Drive the periodic memory faults.. > + */ > +void task_tick_numa(struct rq *rq, struct task_struct *curr) > +{ > + struct callback_head *work = &curr->numa_work; > + u64 period, now; > + > + /* > + * We don't care about NUMA placement if we don't have memory. > + */ > + if (!curr->mm || (curr->flags & PF_EXITING) || work->next != work) > + return;
We should probably skip the whole unmap-and-refault business if we are running on a system that is not NUMA. Ie. a system with just one node...
> + /* > + * Using runtime rather than walltime has the dual advantage that > + * we (mostly) drive the selection from busy threads and that the > + * task needs to have done some actual work before we bother with > + * NUMA placement. > + */ > + now = curr->se.sum_exec_runtime; > + period = (u64)curr->numa_scan_period * NSEC_PER_MSEC; > +
|