login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2011
»
January
»
4
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sched_class::select_task_rq()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Peter Zijlstra
Subject:
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sched_class::select_task_rq()
Date: Tuesday, January 4, 2011 - 6:01 am
On Mon, 2011-01-03 at 19:05 +0100, Oleg Nesterov wrote:
quoted text
> On 12/24, Peter Zijlstra wrote: > > > > @@ -2680,24 +2681,17 @@ void wake_up_new_task(struct task_struct > > { > > unsigned long flags; > > struct rq *rq; > > - int cpu __maybe_unused = get_cpu(); > > Wait, I think this not right. > > > #ifdef CONFIG_SMP > > rq = task_rq_lock(p, &flags); > > - p->state = TASK_WAKING; > > > > /* > > * Fork balancing, do it here and not earlier because: > > * - cpus_allowed can change in the fork path > > * - any previously selected cpu might disappear through hotplug > > - * > > - * We set TASK_WAKING so that select_task_rq() can drop rq->lock > > - * without people poking at ->cpus_allowed. > > */ > > - cpu = select_task_rq(rq, p, SD_BALANCE_FORK, 0); > > - set_task_cpu(p, cpu); > > + set_task_cpu(p, select_task_rq(p, SD_BALANCE_FORK, 0)); > > > > - p->state = TASK_RUNNING; > > task_rq_unlock(rq, &flags); > > We need preempt_disable() to protect us against CPU hotplug. This task > was never activated, it won't be found/migrated if that CPU goes away > before we take task_rq_lock().
Ah, indeed. I've replaced it by keeping IRQs disabled over the whole function, no need to restore and save them in the middle. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[RFC][PATCH 00/17] sched: Reduce runqueue lock contention -v3
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 02/17] mutex: Use p->on_cpu for the adaptive spin
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 03/17] sched: Change the ttwu success details
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 04/17] sched: Clean up ttwu stats
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 05/17] x86: Optimize arch_spin_unlock_wait()
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 06/17] sched: Provide p->on_rq
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 07/17] sched: Serialize p->cpus_allowed and tt ...
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 08/17] sched: Drop the rq argument to sched_cl ...
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 11/17] sched: Delay task_contributes_to_load()
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 12/17] sched: Also serialize ttwu_local() with ...
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 13/17] sched: Remove rq->lock from the first h ...
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 14/17] sched: Remove rq argument to ttwu_stat()
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 15/17] sched: Rename ttwu_post_activation
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 16/17] sched: Move the second half of ttwu() t ...
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
[RFC][PATCH 17/17] sched: Sort hotplug vs ttwu queueing
, Peter Zijlstra
, (Fri Dec 24, 5:23 am)
Re: [RFC][PATCH 00/17] sched: Reduce runqueue lock content ...
, Peter Zijlstra
, (Fri Dec 24, 6:15 am)
Re: [RFC][PATCH 05/17] x86: Optimize arch_spin_unlock_wait()
, Linus Torvalds
, (Fri Dec 24, 11:26 am)
Re: [RFC][PATCH 06/17] sched: Provide p->on_rq
, Yong Zhang
, (Wed Dec 29, 7:14 am)
Re: [RFC][PATCH 07/17] sched: Serialize p->cpus_allowed an ...
, Yong Zhang
, (Wed Dec 29, 7:20 am)
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sche ...
, Yong Zhang
, (Wed Dec 29, 7:31 am)
Re: [RFC][PATCH 14/17] sched: Remove rq argument to ttwu_s ...
, Yong Zhang
, (Wed Dec 29, 7:40 am)
Re: [RFC][PATCH 17/17] sched: Sort hotplug vs ttwu queueing
, Yong Zhang
, (Wed Dec 29, 7:51 am)
Re: [RFC][PATCH 07/17] sched: Serialize p->cpus_allowed an ...
, Peter Zijlstra
, (Mon Jan 3, 4:12 am)
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sche ...
, Peter Zijlstra
, (Mon Jan 3, 4:16 am)
Re: [RFC][PATCH 14/17] sched: Remove rq argument to ttwu_s ...
, Peter Zijlstra
, (Mon Jan 3, 4:20 am)
Re: [RFC][PATCH 17/17] sched: Sort hotplug vs ttwu queueing
, Peter Zijlstra
, (Mon Jan 3, 4:21 am)
Re: [RFC][PATCH 05/17] x86: Optimize arch_spin_unlock_wait()
, Peter Zijlstra
, (Mon Jan 3, 4:32 am)
[RFC][PATCH] sembench: add stddev to the burn stats
, Peter Zijlstra
, (Mon Jan 3, 7:36 am)
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sche ...
, Oleg Nesterov
, (Mon Jan 3, 7:59 am)
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sche ...
, Peter Zijlstra
, (Mon Jan 3, 8:21 am)
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sche ...
, Oleg Nesterov
, (Mon Jan 3, 8:49 am)
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sche ...
, Peter Zijlstra
, (Mon Jan 3, 9:35 am)
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sche ...
, Peter Zijlstra
, (Mon Jan 3, 9:41 am)
Re: [RFC][PATCH 12/17] sched: Also serialize ttwu_local() ...
, Oleg Nesterov
, (Mon Jan 3, 10:32 am)
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sche ...
, Oleg Nesterov
, (Mon Jan 3, 11:05 am)
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sche ...
, Yong Zhang
, (Mon Jan 3, 10:59 pm)
Re: [RFC][PATCH 05/17] x86: Optimize arch_spin_unlock_wait()
, Nick Piggin
, (Mon Jan 3, 11:45 pm)
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sche ...
, Yong Zhang
, (Tue Jan 4, 12:27 am)
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sche ...
, Peter Zijlstra
, (Tue Jan 4, 5:34 am)
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sche ...
, Peter Zijlstra
, (Tue Jan 4, 6:00 am)
Re: [RFC][PATCH 08/17] sched: Drop the rq argument to sche ...
, Peter Zijlstra
, (Tue Jan 4, 6:01 am)
Re: [RFC][PATCH 16/17] sched: Move the second half of ttwu ...
, Oleg Nesterov
, (Tue Jan 4, 7:28 am)
Re: [RFC][PATCH 16/17] sched: Move the second half of ttwu ...
, Peter Zijlstra
, (Tue Jan 4, 7:47 am)
Re: [RFC][PATCH 16/17] sched: Move the second half of ttwu ...
, Oleg Nesterov
, (Tue Jan 4, 8:18 am)
Re: [RFC][PATCH 16/17] sched: Move the second half of ttwu ...
, Peter Zijlstra
, (Tue Jan 4, 8:43 am)
Re: [RFC][PATCH 16/17] sched: Move the second half of ttwu ...
, Oleg Nesterov
, (Tue Jan 4, 9:06 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
David Lang
Re: [patch] MTD: fix DOC2000/2001/2001PLUS build error
Steven Rostedt
Re: [PATCH] input: Fix interrupt enable in i8042_ctr when enabling interrupt fails
Linus Torvalds
Re: [patch] epoll use a single inode ...
David Miller
Re: tg3: unable to handle null pointer dereference
Frank Seidel
Re: [RFC 13/13] Char: nozomi, cleanup read and write
git-commits-head
:
Linux Kernel Mailing List
amba: struct device - replace bus_id with dev_name(), dev_set_name()
Linux Kernel Mailing List
cpumask: make irq_set_affinity() take a const struct cpumask
Linux Kernel Mailing List
cgroups: fix probable race with put_css_set[_taskexit] and find_css_set
Linux Kernel Mailing List
[libata] Export ata_pio_queue_task() so that it can be used from sata_mv.
Linux Kernel Mailing List
[ARM] 5209/1: metronomefb: changes to use platform framebuffer
git
:
Junio C Hamano
Re: mingw, windows, crlf/lf, and git
Junio C Hamano
Re: [PATCH 1/2] Teach git-describe to display distances from tags.
Daniel Barkalow
Re: git and mtime
Linus Torvalds
Re: [PATCH] Teach 'git pull' the '--rebase' option
Alex Riesen
Re: Easy shell question: how to make a script killing all his childs when killed?
freebsd-current
:
Mark Linimon
Why the FreeBSD license will not be changing
Michael Moll
Re: Unable to boot on ECS K7S5A
FreeBSD Tinderbox
[head tinderbox] failure on ia64/ia64
Jille Timmermans
Re: svn commit: r185482 - head/sys/dev/ath/ath_rate/sample
Hayer, Sukhjinder
8_CURRENT boot problem
linux-netdev
:
Timo Teräs
ip xfrm policy semantics
Andi Kleen
Re: [ANNOUNCE]: First release of nftables
John P Poet
Realtek 8111C transmit timed out
Jeff Garzik
Re: [PATCH] fix netxen_pci_tbl[] breakage
Jesper Dangaard Brouer
[PATCH] iputils: arping fails to set correct broadcast address
Colocation donated by:
Syndicate