All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] sched/numa: document CLONE_VM behavior
@ 2014-01-15 19:01 Davidlohr Bueso
  2014-01-17  1:59 ` Rik van Riel
  0 siblings, 1 reply; 2+ messages in thread
From: Davidlohr Bueso @ 2014-01-15 19:01 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Peter Zijlstra, Rik van Riel, Mel Gorman, Andrea Arcangeli,
	Srikar Dronamraju, Johannes Weiner, linux-kernel

From: Davidlohr Bueso <davidlohr@hp.com>

The changelog for Rik's "sched/numa: Stay on the same node if CLONE_VM" patch
serves well documented in the code.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
---
 kernel/sched/core.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 7f45fd5..a2d690c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1743,10 +1743,16 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p)
 
 #ifdef CONFIG_NUMA_BALANCING
 	if (p->mm && atomic_read(&p->mm->mm_users) == 1) {
-		p->mm->numa_next_scan = jiffies + msecs_to_jiffies(sysctl_numa_balancing_scan_delay);
 		p->mm->numa_scan_seq = 0;
+		p->mm->numa_next_scan = jiffies +
+			msecs_to_jiffies(sysctl_numa_balancing_scan_delay);
 	}
 
+	/*
+	 * A newly spawned thread should stay on the same NUMA node as its
+	 * parent. This prevents processes from being "torn" across multiple
+	 * NUMA nodes every time they spawn a new thread.
+	 */
 	if (clone_flags & CLONE_VM)
 		p->numa_preferred_nid = current->numa_preferred_nid;
 	else
-- 
1.8.1.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] sched/numa: document CLONE_VM behavior
  2014-01-15 19:01 [PATCH -next] sched/numa: document CLONE_VM behavior Davidlohr Bueso
@ 2014-01-17  1:59 ` Rik van Riel
  0 siblings, 0 replies; 2+ messages in thread
From: Rik van Riel @ 2014-01-17  1:59 UTC (permalink / raw)
  To: Davidlohr Bueso, Ingo Molnar
  Cc: Peter Zijlstra, Mel Gorman, Andrea Arcangeli, Srikar Dronamraju,
	Johannes Weiner, linux-kernel

On 01/15/2014 02:01 PM, Davidlohr Bueso wrote:
> From: Davidlohr Bueso <davidlohr@hp.com>
> 
> The changelog for Rik's "sched/numa: Stay on the same node if CLONE_VM" patch
> serves well documented in the code.
> 
> Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>

Reviewed-by: Rik van Riel <riel@redhat.com>

-- 
All rights reversed

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-17  1:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-15 19:01 [PATCH -next] sched/numa: document CLONE_VM behavior Davidlohr Bueso
2014-01-17  1:59 ` Rik van Riel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.