All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/numa: kill the wrong/dead TASK_DEAD check in task_numa_fault()
@ 2014-09-21 19:47 Oleg Nesterov
  2014-09-22  6:54 ` Mel Gorman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Oleg Nesterov @ 2014-09-21 19:47 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra; +Cc: Rik van Riel, Mel Gorman, linux-kernel

current->state == TASK_DEAD means that the task is doing its last
schedule(), page fault is obviously impossible at this stage.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
 kernel/sched/fair.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 82088b2..0090e8c 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1804,10 +1804,6 @@ void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags)
 	if (!p->mm)
 		return;
 
-	/* Do not worry about placement if exiting */
-	if (p->state == TASK_DEAD)
-		return;
-
 	/* Allocate buffer to track faults on a per-node basis */
 	if (unlikely(!p->numa_faults_memory)) {
 		int size = sizeof(*p->numa_faults_memory) *
-- 
1.5.5.1



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

* Re: [PATCH] sched/numa: kill the wrong/dead TASK_DEAD check in task_numa_fault()
  2014-09-21 19:47 [PATCH] sched/numa: kill the wrong/dead TASK_DEAD check in task_numa_fault() Oleg Nesterov
@ 2014-09-22  6:54 ` Mel Gorman
  2014-09-22 14:42 ` Rik van Riel
  2014-09-24  7:57 ` [tip:sched/core] sched/numa: Kill the wrong/ dead " tip-bot for Oleg Nesterov
  2 siblings, 0 replies; 4+ messages in thread
From: Mel Gorman @ 2014-09-22  6:54 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: Ingo Molnar, Peter Zijlstra, Rik van Riel, linux-kernel

On Sun, Sep 21, 2014 at 09:47:43PM +0200, Oleg Nesterov wrote:
> current->state == TASK_DEAD means that the task is doing its last
> schedule(), page fault is obviously impossible at this stage.
> 
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>

I was going to complain that the check would protect against a spurious
allocation during fault but a task in this state should not be faulting
any more.

Acked-by: Mel Gorman <mgorman@suse.de>

Thanks.

-- 
Mel Gorman
SUSE Labs

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

* Re: [PATCH] sched/numa: kill the wrong/dead TASK_DEAD check in task_numa_fault()
  2014-09-21 19:47 [PATCH] sched/numa: kill the wrong/dead TASK_DEAD check in task_numa_fault() Oleg Nesterov
  2014-09-22  6:54 ` Mel Gorman
@ 2014-09-22 14:42 ` Rik van Riel
  2014-09-24  7:57 ` [tip:sched/core] sched/numa: Kill the wrong/ dead " tip-bot for Oleg Nesterov
  2 siblings, 0 replies; 4+ messages in thread
From: Rik van Riel @ 2014-09-22 14:42 UTC (permalink / raw)
  To: Oleg Nesterov, Ingo Molnar, Peter Zijlstra; +Cc: Mel Gorman, linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/21/2014 03:47 PM, Oleg Nesterov wrote:
> current->state == TASK_DEAD means that the task is doing its last 
> schedule(), page fault is obviously impossible at this stage.
> 
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>

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

- -- 
All rights reversed
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUIDVyAAoJEM553pKExN6D50oH/A5RpFUhx5zsDYgFjyq071+n
NYgwgy6Nr6DDkmfEGtRePxQY7CmysKCTWdPzAFxmvhaFfOg2zP+P7uh85/lbIYXM
7ATj4yO8u3Loa8zdz+VjwrOR0lJr/Y/nsjQC0q+50oNM0pwFC+HPuSPTrpz4o+HB
ReeZ6BKNtFoiC5RfR0XpNHk4ozwT5qW2oCDEIT6bsMQiV0413CXksHFg6Flz7Acb
2EFCzwY2BgfKRawGR6e4Q09UZ0aG1gW9RkLkUuIWlmbOHiMzduLCIKQNCZaXTgVn
xVJcsgdANnQk1BGSU5rozqtlDUmRoKq3teXlE00CcJEEfzUrUHMw0HYZ62xbQ+s=
=fg3H
-----END PGP SIGNATURE-----

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

* [tip:sched/core] sched/numa: Kill the wrong/ dead TASK_DEAD check in task_numa_fault()
  2014-09-21 19:47 [PATCH] sched/numa: kill the wrong/dead TASK_DEAD check in task_numa_fault() Oleg Nesterov
  2014-09-22  6:54 ` Mel Gorman
  2014-09-22 14:42 ` Rik van Riel
@ 2014-09-24  7:57 ` tip-bot for Oleg Nesterov
  2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Oleg Nesterov @ 2014-09-24  7:57 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, torvalds, peterz, riel, mgorman, tglx, oleg

Commit-ID:  be34f0f3e6aed6e828a8059247d169d38da128d7
Gitweb:     http://git.kernel.org/tip/be34f0f3e6aed6e828a8059247d169d38da128d7
Author:     Oleg Nesterov <oleg@redhat.com>
AuthorDate: Sun, 21 Sep 2014 21:47:43 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 24 Sep 2014 09:35:05 +0200

sched/numa: Kill the wrong/dead TASK_DEAD check in task_numa_fault()

current->state == TASK_DEAD means that the task is doing its
last schedule(), page fault is obviously impossible at this
stage.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20140921194743.GA30114@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/fair.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 2a1e6ac..9ee3d4f 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1817,10 +1817,6 @@ void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags)
 	if (!p->mm)
 		return;
 
-	/* Do not worry about placement if exiting */
-	if (p->state == TASK_DEAD)
-		return;
-
 	/* Allocate buffer to track faults on a per-node basis */
 	if (unlikely(!p->numa_faults_memory)) {
 		int size = sizeof(*p->numa_faults_memory) *

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

end of thread, other threads:[~2014-09-24  7:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-21 19:47 [PATCH] sched/numa: kill the wrong/dead TASK_DEAD check in task_numa_fault() Oleg Nesterov
2014-09-22  6:54 ` Mel Gorman
2014-09-22 14:42 ` Rik van Riel
2014-09-24  7:57 ` [tip:sched/core] sched/numa: Kill the wrong/ dead " tip-bot for Oleg Nesterov

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.