[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FF9D29D.8030903@redhat.com>
Date: Sun, 08 Jul 2012 14:34:05 -0400
From: Rik van Riel <riel@...hat.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC: Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...e.hu>, Paul Turner <pjt@...gle.com>,
Suresh Siddha <suresh.b.siddha@...el.com>,
Mike Galbraith <efault@....de>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Lai Jiangshan <laijs@...fujitsu.com>,
Dan Smith <danms@...ibm.com>,
Bharata B Rao <bharata.rao@...il.com>,
Lee Schermerhorn <Lee.Schermerhorn@...com>,
Andrea Arcangeli <aarcange@...hat.com>,
Johannes Weiner <hannes@...xchg.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [RFC][PATCH 25/26] sched, numa: Only migrate long-running entities
On 03/16/2012 10:40 AM, Peter Zijlstra wrote:
> +static u64 process_cpu_runtime(struct numa_entity *ne)
> +{
> + struct task_struct *p, *t;
> + u64 runtime = 0;
> +
> + rcu_read_lock();
> + t = p = ne_owner(ne);
> + if (p) do {
> + runtime += t->se.sum_exec_runtime; // @#$#@ 32bit
> + } while ((t = next_thread(t)) != p);
> + rcu_read_unlock();
> +
> + return runtime;
> +}
> + /*
> + * Don't bother migrating memory if there's less than 1 second
> + * of runtime on the tasks.
> + */
> + if (ne->nops->cpu_runtime(ne) < NSEC_PER_SEC)
> + return false;
Do we really want to calculate the amount of CPU time used
by a process, and start migrating after just one second?
Or would it be ok to start migrating once a process has
been scanned once or twice by the NUMA code?
--
All rights reversed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists