From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx124.postini.com [74.125.245.124]) by kanga.kvack.org (Postfix) with SMTP id EF5C26B0089 for ; Sun, 8 Jul 2012 14:34:36 -0400 (EDT) Message-ID: <4FF9D29D.8030903@redhat.com> Date: Sun, 08 Jul 2012 14:34:05 -0400 From: Rik van Riel MIME-Version: 1.0 Subject: Re: [RFC][PATCH 25/26] sched, numa: Only migrate long-running entities References: <20120316144028.036474157@chello.nl> <20120316144241.749359061@chello.nl> In-Reply-To: <20120316144241.749359061@chello.nl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Peter Zijlstra Cc: Linus Torvalds , Andrew Morton , Thomas Gleixner , Ingo Molnar , Paul Turner , Suresh Siddha , Mike Galbraith , "Paul E. McKenney" , Lai Jiangshan , Dan Smith , Bharata B Rao , Lee Schermerhorn , Andrea Arcangeli , Johannes Weiner , linux-kernel@vger.kernel.org, linux-mm@kvack.org 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org