login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
September
»
25
Re: sched:
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Peter Zijlstra
Subject:
Re: sched:
Date: Thursday, September 25, 2008 - 2:14 am
On Thu, 2008-09-25 at 09:51 +0530, Bharata B Rao wrote:
quoted text
> Hi, > > sched: Maintain only task entities in cfs_rq->tasks list. > > cfs_rq->tasks list is used by the load balancer to iterate > over all the tasks. Currently it holds all the entities > (both task and group entities) because of which there is > a need to check for group entities explicitly during load > balancing. This patch changes the cfs_rq->tasks list to > hold only task entities.
Looks fine. Thanks Bharata!
quoted text
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> > CC: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> > CC: Peter Zijlstra <a.p.zijlstra@chello.nl> > CC: Ingo Molnar <mingo@elte.hu> > --- > kernel/sched_fair.c | 26 +++++++++----------------- > 1 file changed, 9 insertions(+), 17 deletions(-) > > --- a/kernel/sched_fair.c > +++ b/kernel/sched_fair.c > @@ -586,11 +586,12 @@ account_entity_enqueue(struct cfs_rq *cf > update_load_add(&cfs_rq->load, se->load.weight); > if (!parent_entity(se)) > inc_cpu_load(rq_of(cfs_rq), se->load.weight); > - if (entity_is_task(se)) > + if (entity_is_task(se)) { > add_cfs_task_weight(cfs_rq, se->load.weight); > + list_add(&se->group_node, &cfs_rq->tasks); > + } > cfs_rq->nr_running++; > se->on_rq = 1; > - list_add(&se->group_node, &cfs_rq->tasks); > } > > static void > @@ -599,11 +600,12 @@ account_entity_dequeue(struct cfs_rq *cf > update_load_sub(&cfs_rq->load, se->load.weight); > if (!parent_entity(se)) > dec_cpu_load(rq_of(cfs_rq), se->load.weight); > - if (entity_is_task(se)) > + if (entity_is_task(se)) { > add_cfs_task_weight(cfs_rq, -se->load.weight); > + list_del_init(&se->group_node); > + } > cfs_rq->nr_running--; > se->on_rq = 0; > - list_del_init(&se->group_node); > } > > static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se) > @@ -1445,19 +1447,9 @@ __load_balance_iterator(struct cfs_rq *c > if (next == &cfs_rq->tasks) > return NULL; > > - /* Skip over entities that are not tasks */ > - do { > - se = list_entry(next, struct sched_entity, group_node); > - next = next->next; > - } while (next != &cfs_rq->tasks && !entity_is_task(se)); > - > - if (next == &cfs_rq->tasks) > - return NULL; > - > - cfs_rq->balance_iterator = next; > - > - if (entity_is_task(se)) > - p = task_of(se); > + se = list_entry(next, struct sched_entity, group_node); > + p = task_of(se); > + cfs_rq->balance_iterator = next->next; > > return p; > } > > Regards, > Bharata.
--
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:
sched:
, Bharata B Rao
, (Wed Sep 24, 9:21 pm)
sched: Maintain only task entities in cfs_rq->tasks list.
, Bharata B Rao
, (Wed Sep 24, 9:23 pm)
Re: sched:
, Peter Zijlstra
, (Thu Sep 25, 2:14 am)
Re: sched:
, Ingo Molnar
, (Thu Sep 25, 2:19 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
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Andi Kleen
Re: - romsignature-checksum-cleanup-2.patch removed from -mm tree
Stefano Stabellini
Re: [PATCH 09/22] xen: Find an unbound irq number in reverse order (high to low).
git
:
Junio C Hamano
Re: Teach "git checkout" to use git-show-ref
Christian Jaeger
Re: Problem with Git.pm bidi_pipe methods
Linus Torvalds
[PATCH 1/7] Make unpack_trees_options bit flags actual bitfields
Jon Smirl
stgit: managing signed-off-by lines
Junio C Hamano
GIT 1.4.3-rc2
git-commits-head
:
Linux Kernel Mailing List
MIPS: Bonito64: Make Loongson independent from Bonito64 code.
Linux Kernel Mailing List
iwlwifi: initialize spinlock before use
Linux Kernel Mailing List
i2c-i801: Add Intel Cougar Point device IDs
Linux Kernel Mailing List
drm/i915: Add information on pinning and fencing to the i915 list debug.
Linux Kernel Mailing List
cirrusfb: GD5434 (aka SD64) support fixed
linux-netdev
:
Gerrit Renker
v2 [PATCH 1/4] dccp: Limit feature negotiation to connection setup phase
Richard Cochran
Re: [PATCH v3 3/3] ptp: Added a clock that uses the eTSEC found on the MPC85xx.
Inaky Perez-Gonzalez
[PATCH 40/40] wimax/i2400m: add CREDITS and MAINTAINERS entries
Sathya Perla
[PATCH net-next-2.6] be2net: add multiple RX queue support
Changli Gao
Re: [PATCH 3/3] ifb: move tq from ifb_private
freebsd-current
:
Boris Samorodov
Re: twa + dump = sbwait
韓家標 Bill Hacker
Re: ZFS honesty
Bjoern A. Zeeb
Re: Can not boot 7.0-BETA3 with IPSEC
rmgls
man usb2_core(4)
Sam Leffler
Re: Lots of "ath0: bad series0 hwrate 0x1b" in 8.0-BETA2
Colocation donated by:
Syndicate