login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
June
»
7
Re: [patch] Re: PostgreSQL pgbench performance regression in 2.6.23+
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Peter Zijlstra
Subject:
Re: [patch] Re: PostgreSQL pgbench performance regression in 2.6.23+
Date: Saturday, June 7, 2008 - 6:08 am
On Sat, 2008-06-07 at 13:38 +0200, Mike Galbraith wrote: Interesting.. Looks good.
quoted text
> Index: linux-2.6.26.git/kernel/sched_fair.c > =================================================================== > --- linux-2.6.26.git.orig/kernel/sched_fair.c > +++ linux-2.6.26.git/kernel/sched_fair.c > @@ -664,6 +664,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, st > > update_stats_dequeue(cfs_rq, se); > if (sleep) { > + se->last_preempter = NULL; > update_avg_stats(cfs_rq, se); > #ifdef CONFIG_SCHEDSTATS > if (entity_is_task(se)) { > @@ -692,8 +693,10 @@ check_preempt_tick(struct cfs_rq *cfs_rq > > ideal_runtime = sched_slice(cfs_rq, curr); > delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; > - if (delta_exec > ideal_runtime) > + if (delta_exec > ideal_runtime) { > + curr->last_preempter = NULL; > resched_task(rq_of(cfs_rq)->curr); > + } > } > > static void > @@ -994,6 +997,7 @@ wake_affine(struct rq *rq, struct sched_ > unsigned int imbalance) > { > struct task_struct *curr = this_rq->curr; > + struct sched_entity *se = &curr->se, *pse = &p->se; > unsigned long tl = this_load; > unsigned long tl_per_task; > int balanced; > @@ -1002,14 +1006,26 @@ wake_affine(struct rq *rq, struct sched_ > return 0; > > /* > + * If the current task is being wakeup preempted by multiple tasks > + * that it awakened, such that it can't get significant work done > + * between preemptions, try to spread these preemption sources. > + */ > + if (sync && se->last_preempter && se->last_preempter != pse) { > + u64 se_last_exec = se->sum_exec_runtime - se->prev_sum_exec_runtime; > + > + if (se_last_exec < sysctl_sched_migration_cost) > + return 0; > + } > + > + /* > * If sync wakeup then subtract the (maximum possible) > * effect of the currently running task from the load > * of the current CPU: > */ > if (sync) > - tl -= current->se.load.weight; > + tl -= se->load.weight; > > - balanced = 100*(tl + p->se.load.weight) <= imbalance*load; > + balanced = 100*(tl + pse->load.weight) <= imbalance*load; > > /* > * If the currently running task will sleep within > @@ -1017,8 +1033,8 @@ wake_affine(struct rq *rq, struct sched_ > * woken task: > */ > if (sync && balanced && curr->sched_class == &fair_sched_class) { > - if (curr->se.avg_overlap < sysctl_sched_migration_cost && > - p->se.avg_overlap < sysctl_sched_migration_cost) > + if (se->avg_overlap < sysctl_sched_migration_cost && > + pse->avg_overlap < sysctl_sched_migration_cost) > return 1; > } > > @@ -1219,8 +1235,27 @@ static void check_preempt_wakeup(struct > pse = parent_entity(pse); > } > > - if (wakeup_preempt_entity(se, pse) == 1) > - resched_task(curr); > + if (wakeup_preempt_entity(se, pse) == 1) { > + int preempt = 1; > + > + /* > + * If current task is being prempted by multiple wakees, > + * tag it for 1:N affine wakeup preemption avoidance. > + */ > + if (se->last_preempter && se->last_preempter != pse && > + se->load.weight >= pse->load.weight) { > + u64 exec = se->sum_exec_runtime - se->prev_sum_exec_runtime; > + > + if (exec < sysctl_sched_migration_cost) > + preempt = 0; > + } > + > + if (se == ¤t->se) > + se->last_preempter = pse; > + > + if (preempt) > + resched_task(curr); > + } > } > > static struct task_struct *pick_next_task_fair(struct rq *rq) > Index: linux-2.6.26.git/include/linux/sched.h > =================================================================== > --- linux-2.6.26.git.orig/include/linux/sched.h > +++ linux-2.6.26.git/include/linux/sched.h > @@ -963,6 +963,7 @@ struct sched_entity { > > u64 last_wakeup; > u64 avg_overlap; > + struct sched_entity *last_preempter; > > #ifdef CONFIG_SCHEDSTATS > u64 wait_start; > Index: linux-2.6.26.git/kernel/sched.c > =================================================================== > --- linux-2.6.26.git.orig/kernel/sched.c > +++ linux-2.6.26.git/kernel/sched.c > @@ -2176,6 +2176,7 @@ static void __sched_fork(struct task_str > p->se.prev_sum_exec_runtime = 0; > p->se.last_wakeup = 0; > p->se.avg_overlap = 0; > + p->se.last_preempter = NULL; > > #ifdef CONFIG_SCHEDSTATS > p->se.wait_start = 0; > >
--
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:
PostgreSQL pgbench performance regression in 2.6.23+
, Greg Smith
, (Wed May 21, 10:34 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Mike Galbraith
, (Thu May 22, 12:10 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Dhaval Giani
, (Thu May 22, 1:28 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Mike Galbraith
, (Thu May 22, 2:05 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Mike Galbraith
, (Thu May 22, 3:34 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Mike Galbraith
, (Thu May 22, 4:25 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Peter Zijlstra
, (Thu May 22, 4:44 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Mike Galbraith
, (Thu May 22, 5:09 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Peter Zijlstra
, (Thu May 22, 5:24 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Mike Galbraith
, (Thu May 22, 6:16 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Greg Smith
, (Fri May 23, 12:13 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Mike Galbraith
, (Fri May 23, 3:00 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Ingo Molnar
, (Fri May 23, 3:10 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Mike Galbraith
, (Fri May 23, 3:15 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Mike Galbraith
, (Fri May 23, 6:05 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Mike Galbraith
, (Fri May 23, 6:35 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Greg Smith
, (Fri May 23, 4:18 pm)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Mike Galbraith
, (Fri May 23, 4:46 pm)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Mike Galbraith
, (Sat May 24, 1:08 am)
Re: PostgreSQL pgbench performance regression in 2.6.23+
, Greg Smith
, (Mon May 26, 5:28 pm)
[patch] Re: PostgreSQL pgbench performance regression in 2 ...
, Mike Galbraith
, (Mon May 26, 10:59 pm)
Re: [patch] Re: PostgreSQL pgbench performance regression ...
, Mike Galbraith
, (Tue May 27, 1:20 am)
Re: [patch] Re: PostgreSQL pgbench performance regression ...
, Mike Galbraith
, (Tue May 27, 1:35 am)
Re: [patch] Re: PostgreSQL pgbench performance regression ...
, Greg Smith
, (Thu Jun 5, 10:03 pm)
Re: [patch] Re: PostgreSQL pgbench performance regression ...
, Mike Galbraith
, (Thu Jun 5, 11:13 pm)
Re: [patch] Re: PostgreSQL pgbench performance regression ...
, Mike Galbraith
, (Sat Jun 7, 4:38 am)
Re: [patch] Re: PostgreSQL pgbench performance regression ...
, Mike Galbraith
, (Sat Jun 7, 5:50 am)
Re: [patch] Re: PostgreSQL pgbench performance regression ...
, Peter Zijlstra
, (Sat Jun 7, 6:07 am)
Re: [patch] Re: PostgreSQL pgbench performance regression ...
, Peter Zijlstra
, (Sat Jun 7, 6:08 am)
Re: [patch] Re: PostgreSQL pgbench performance regression ...
, Mike Galbraith
, (Sat Jun 7, 7:16 am)
[patch part 2] Re: [patch] Re: PostgreSQL pgbench performa ...
, Mike Galbraith
, (Sat Jun 7, 7:54 am)
Re: [patch part 2] Re: [patch] Re: PostgreSQL pgbench perf ...
, Peter Zijlstra
, (Sat Jun 7, 9:12 am)
Re: [patch] Re: PostgreSQL pgbench performance regression ...
, Peter Zijlstra
, (Sat Jun 7, 9:16 am)
Re: [patch part 2] Re: [patch] Re: PostgreSQL pgbench perf ...
, Mike Galbraith
, (Sat Jun 7, 10:53 am)
Re: [patch] Re: PostgreSQL pgbench performance regression ...
, Mike Galbraith
, (Sat Jun 7, 10:56 am)
Re: [patch part 2] Re: [patch] Re: PostgreSQL pgbench perf ...
, Mike Galbraith
, (Sat Jun 7, 11:19 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Linus Torvalds
Linux 2.6.34-rc4
David Miller
Re: 'global' rq->clock
Vivek Goyal
Re: perf hw in kexeced kernel broken in tip
git
:
Len Brown
Re: fatal: unable to create '.git/index': File exists
Oliver Hoffmann
git init --bare versus git --bare init
Sam Vilain
Re: RFC: Flat directory for notes, or fan-out? Both!
Erik Mouw
Re: cpio command not found
Andy Parkins
Re: cloning/pulling hooks
linux-netdev
:
Kurt Van Dijck
Re: [PATCH net-next-2.6 1/2] can: add driver for Softing card
Eric Dumazet
Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
David Miller
Re: [PATCH v2] net: typos in comments in include/linux/igmp.h
Paulius Zaleckas
Re: [RFC] Patch to option HSO driver to the kernel
git-commits-head
:
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
nfsd41: sanity check client drc maxreqs
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
checkpatch: add check for too short Kconfig descriptions
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
Gilles Chehade
Re: Longest Uptime?
Colocation donated by:
Syndicate