login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
December
»
16
Re: [RFC][PATCH 3/5] sched: Change the ttwu success details
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Frederic Weisbecker
Subject:
Re: [RFC][PATCH 3/5] sched: Change the ttwu success details
Date: Thursday, December 16, 2010 - 8:23 am
On Thu, Dec 16, 2010 at 03:56:05PM +0100, Peter Zijlstra wrote:
quoted text
> try_to_wake_up() would only return a success when it would have to > place a task on a rq, change that to every time we change p->state to > TASK_RUNNING, because that's the real measure of wakeups. > > This results in that success is always true for the tracepoint, so > remove its success argument. > > Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> > --- > include/trace/events/sched.h | 18 ++++++++---------- > kernel/sched.c | 18 ++++++++---------- > kernel/trace/trace_sched_wakeup.c | 3 +-- > 3 files changed, 17 insertions(+), 22 deletions(-) > > Index: linux-2.6/kernel/sched.c > =================================================================== > --- linux-2.6.orig/kernel/sched.c > +++ linux-2.6/kernel/sched.c > @@ -2327,10 +2327,10 @@ static inline void ttwu_activate(struct > activate_task(rq, p, en_flags); > } > > -static inline void ttwu_post_activation(struct task_struct *p, struct rq *rq, > - int wake_flags, bool success) > +static void > +ttwu_post_activation(struct task_struct *p, struct rq *rq, int wake_flags) > { > - trace_sched_wakeup(p, success); > + trace_sched_wakeup(p); > check_preempt_curr(rq, p, wake_flags); > > p->state = TASK_RUNNING; > @@ -2350,7 +2350,7 @@ static inline void ttwu_post_activation( > } > #endif > /* if a worker is waking up, notify workqueue */ > - if ((p->flags & PF_WQ_WORKER) && success) > + if (p->flags & PF_WQ_WORKER) > wq_worker_waking_up(p, cpu_of(rq)); > } > > @@ -2449,9 +2449,9 @@ static int try_to_wake_up(struct task_st > #endif /* CONFIG_SMP */ > ttwu_activate(p, rq, wake_flags & WF_SYNC, orig_cpu != cpu, > cpu == this_cpu, en_flags); > - success = 1; > out_running: > - ttwu_post_activation(p, rq, wake_flags, success); > + ttwu_post_activation(p, rq, wake_flags); > + success = 1; > out: > task_rq_unlock(rq, &flags); > put_cpu(); > @@ -2470,7 +2470,6 @@ static int try_to_wake_up(struct task_st > static void try_to_wake_up_local(struct task_struct *p) > { > struct rq *rq = task_rq(p); > - bool success = false; > > BUG_ON(rq != this_rq()); > BUG_ON(p == current); > @@ -2485,9 +2484,8 @@ static void try_to_wake_up_local(struct > schedstat_inc(rq, ttwu_local); > } > ttwu_activate(p, rq, false, false, true, ENQUEUE_WAKEUP); > - success = true; > } > - ttwu_post_activation(p, rq, 0, success); > + ttwu_post_activation(p, rq, 0); > } > > /** > @@ -2649,7 +2647,7 @@ void wake_up_new_task(struct task_struct > > rq = task_rq_lock(p, &flags); > activate_task(rq, p, 0); > - trace_sched_wakeup_new(p, 1); > + trace_sched_wakeup_new(p); > check_preempt_curr(rq, p, WF_FORK); > #ifdef CONFIG_SMP > if (p->sched_class->task_woken) > Index: linux-2.6/include/trace/events/sched.h > =================================================================== > --- linux-2.6.orig/include/trace/events/sched.h > +++ linux-2.6/include/trace/events/sched.h > @@ -54,15 +54,14 @@ TRACE_EVENT(sched_kthread_stop_ret, > */ > DECLARE_EVENT_CLASS(sched_wakeup_template, > > - TP_PROTO(struct task_struct *p, int success), > + TP_PROTO(struct task_struct *p), > > - TP_ARGS(p, success), > + TP_ARGS(p), > > TP_STRUCT__entry( > __array( char, comm, TASK_COMM_LEN ) > __field( pid_t, pid ) > __field( int, prio ) > - __field( int, success ) > __field( int, target_cpu ) > ), > > @@ -70,25 +69,24 @@ DECLARE_EVENT_CLASS(sched_wakeup_templat > memcpy(__entry->comm, p->comm, TASK_COMM_LEN); > __entry->pid = p->pid; > __entry->prio = p->prio; > - __entry->success = success; > __entry->target_cpu = task_cpu(p); > ), > > - TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d", > + TP_printk("comm=%s pid=%d prio=%d target_cpu=%03d", > __entry->comm, __entry->pid, __entry->prio, > - __entry->success, __entry->target_cpu) > + __entry->target_cpu)
Note we'll need to fix some perf scripts after that. And also perf sched, probably perf timechart and so on... --
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 0/5] Reduce runqueue lock contention -v2
, Peter Zijlstra
, (Thu Dec 16, 7:56 am)
[RFC][PATCH 1/5] sched: Always provide p->oncpu
, Peter Zijlstra
, (Thu Dec 16, 7:56 am)
[RFC][PATCH 2/5] mutex: Use p->oncpu for the adaptive spin
, Peter Zijlstra
, (Thu Dec 16, 7:56 am)
[RFC][PATCH 3/5] sched: Change the ttwu success details
, Peter Zijlstra
, (Thu Dec 16, 7:56 am)
[RFC][PATCH 4/5] sched: Clean up ttwu stats
, Peter Zijlstra
, (Thu Dec 16, 7:56 am)
[RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Peter Zijlstra
, (Thu Dec 16, 7:56 am)
Re: [RFC][PATCH 3/5] sched: Change the ttwu success details
, Frederic Weisbecker
, (Thu Dec 16, 8:23 am)
Re: [RFC][PATCH 3/5] sched: Change the ttwu success details
, Peter Zijlstra
, (Thu Dec 16, 8:27 am)
Re: [RFC][PATCH 3/5] sched: Change the ttwu success details
, Peter Zijlstra
, (Thu Dec 16, 8:30 am)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Frederic Weisbecker
, (Thu Dec 16, 8:31 am)
Re: [RFC][PATCH 3/5] sched: Change the ttwu success details
, Frederic Weisbecker
, (Thu Dec 16, 8:35 am)
Re: [RFC][PATCH 3/5] sched: Change the ttwu success details
, Frederic Weisbecker
, (Thu Dec 16, 8:45 am)
Re: [RFC][PATCH 2/5] mutex: Use p->oncpu for the adaptive spin
, Oleg Nesterov
, (Thu Dec 16, 10:34 am)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Oleg Nesterov
, (Thu Dec 16, 10:58 am)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Oleg Nesterov
, (Thu Dec 16, 11:42 am)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Peter Zijlstra
, (Thu Dec 16, 11:58 am)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Peter Zijlstra
, (Thu Dec 16, 12:03 pm)
Re: [RFC][PATCH 0/5] Reduce runqueue lock contention -v2
, Frank Rowand
, (Thu Dec 16, 12:12 pm)
Re: [RFC][PATCH 2/5] mutex: Use p->oncpu for the adaptive spin
, Peter Zijlstra
, (Thu Dec 16, 12:29 pm)
Re: [RFC][PATCH 0/5] Reduce runqueue lock contention -v2
, Frank Rowand
, (Thu Dec 16, 12:36 pm)
Re: [RFC][PATCH 0/5] Reduce runqueue lock contention -v2
, Frank Rowand
, (Thu Dec 16, 12:36 pm)
Re: [RFC][PATCH 0/5] Reduce runqueue lock contention -v2
, Frank Rowand
, (Thu Dec 16, 12:39 pm)
Re: [RFC][PATCH 0/5] Reduce runqueue lock contention -v2
, Peter Zijlstra
, (Thu Dec 16, 12:42 pm)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Peter Zijlstra
, (Thu Dec 16, 12:47 pm)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Peter Zijlstra
, (Thu Dec 16, 1:32 pm)
Re: [RFC][PATCH 0/5] Reduce runqueue lock contention -v2
, Frank Rowand
, (Thu Dec 16, 1:45 pm)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Yan, Zheng
, (Thu Dec 16, 8:06 pm)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Peter Zijlstra
, (Fri Dec 17, 6:23 am)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Oleg Nesterov
, (Fri Dec 17, 9:54 am)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Peter Zijlstra
, (Fri Dec 17, 10:43 am)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Oleg Nesterov
, (Fri Dec 17, 10:50 am)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Peter Zijlstra
, (Fri Dec 17, 11:15 am)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Oleg Nesterov
, (Fri Dec 17, 11:21 am)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Peter Zijlstra
, (Fri Dec 17, 11:24 am)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Peter Zijlstra
, (Fri Dec 17, 11:41 am)
Re: [RFC][PATCH 2/5] mutex: Use p->oncpu for the adaptive spin
, Oleg Nesterov
, (Fri Dec 17, 12:17 pm)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Oleg Nesterov
, (Fri Dec 17, 12:28 pm)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Peter Zijlstra
, (Fri Dec 17, 2:02 pm)
Re: [RFC][PATCH 1/5] sched: Always provide p->oncpu
, Frank Rowand
, (Fri Dec 17, 6:03 pm)
Re: [RFC][PATCH 3/5] sched: Change the ttwu success details
, Frank Rowand
, (Fri Dec 17, 6:05 pm)
Re: [RFC][PATCH 4/5] sched: Clean up ttwu stats
, Frank Rowand
, (Fri Dec 17, 6:09 pm)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Yong Zhang
, (Sat Dec 18, 7:49 am)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Oleg Nesterov
, (Sat Dec 18, 1:08 pm)
Re: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
, Yong Zhang
, (Sun Dec 19, 4:20 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Ingo Molnar
Re: [PATCH v3] x86: merge the simple bitops and move them to bitops.h
Jan Engelhardt
Re: [PATCH] Allow Kconfig to set default mmap_min_addr protection
Dmitry Torokhov
Re: [2.6 patch] input/serio/hp_sdc.c section fix
Rafael J. Wysocki
[Bug #16380] Loop devices act strangely in 2.6.35
git
:
Steven Grimm
Using git as a general backup mechanism (was Re: Using GIT to store /etc)
Jeff King
Re: [PATCH] git-reset: allow --soft in a bare repo
Johannes Sixt
Re: [PATCH 01/14] msvc: Fix compilation errors in compat/win32/sys/poll.c
Johannes Schindelin
Re: [PATCH] Uninstall rule for top level Makefile
Shawn O. Pearce
Re: [PATCH v2] Speed up bash completion loading
git-commits-head
:
Linux Kernel Mailing List
cgroups: clean up cgroup_pidlist_find() a bit
Linux Kernel Mailing List
sony-laptop: Add support for extended hotkeys
Linux Kernel Mailing List
IB/core: Add support for masked atomic operations
Linux Kernel Mailing List
V4L/DVB (8939): cx18: fix sparse warnings
Linux Kernel Mailing List
ipv6 mcast: Check address family of gf_group in getsockopt(MS_FILTER).
linux-netdev
:
Inaky Perez-Gonzalez
[PATCH 40/40] wimax/i2400m: add CREDITS and MAINTAINERS entries
Karsten Keil
[mISDN PATCH v2 05/19] Reduce stack size in dsp_cmx_send()
linux
Re: 2.6.23-rc8 network problem. Mem leak? ip1000a?
David Miller
Re: tun: Use netif_receive_skb instead of netif_rx
David Miller
Re: [net-next PATCH v2] llc enhancements
freebsd-current
:
Matthew Fleming
Re: [RFC] Outline of USB process integration in the kernel taskqueue system
illoai@gmail.com
Re: OT: 2d password
Hartmut Brandt
Re: problem with nss_ldap
Andrew Reilly
Re: FreeBSD's problems as seen by the BSDForen.de community
Max Laier
Re: Upcoming ABI Breakage in RELENG_7
Colocation donated by:
Syndicate