login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
December
»
16
Re: [patch 2/2] sched: charge unaccounted run-time on entity re-weight
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Paul Turner
Subject:
Re: [patch 2/2] sched: charge unaccounted run-time on entity re-weight
Date: Wednesday, December 15, 2010 - 8:36 pm
On 12/15/10 19:35, Paul Turner wrote:
quoted text
> Hum -- forgot to refresh mbx file, slightly cleaner version (we can > still charge unaccounted time against our queuing cfs_rq). > > - Paul >
.... Obviously this is in lieu of the first patch and not this one. I'm tired :(
quoted text
> ----- > > sched: move periodic share updates to entity_tick() > > Long running entities that do not block (dequeue) require periodic > updates to > maintain accurate share values. (Note: group entities with several > threads are > quite likely to be non-blocking in many circumstances). > > By virtue of being long-running however, we will see entity ticks > (otherwise > the required update occurs in dequeue/put and we are done). Thus we can > move > the detection (and associated work) for these updates into the periodic > path. > > This restores the 'atomicity' of update_curr() with respect to accounting. > > Signed-off-by: Paul Turner <pjt@google.com> > > --- > kernel/sched_fair.c | 21 +++++++++++++++++---- > 1 file changed, 17 insertions(+), 4 deletions(-) > > Index: tip3/kernel/sched_fair.c > =================================================================== > --- tip3.orig/kernel/sched_fair.c > +++ tip3/kernel/sched_fair.c > @@ -564,11 +564,8 @@ __update_curr(struct cfs_rq *cfs_rq, str > > #if defined CONFIG_SMP && defined CONFIG_FAIR_GROUP_SCHED > cfs_rq->load_unacc_exec_time += delta_exec; > - if (cfs_rq->load_unacc_exec_time > sysctl_sched_shares_window) { > - update_cfs_load(cfs_rq, 0); > - update_cfs_shares(cfs_rq, 0); > - } > #endif > } > > static void update_curr(struct cfs_rq *cfs_rq) > @@ -809,6 +806,15 @@ static void update_cfs_shares(struct cfs > > reweight_entity(cfs_rq_of(se), se, shares); > } > + > +static void update_cfs_rq_shares_tick(struct cfs_rq *cfs_rq) > +{ > + /* rate limit updates by the averaging window */ > + if (cfs_rq->load_unacc_exec_time > sysctl_sched_shares_window) { > + update_cfs_load(cfs_rq, 0); > + update_cfs_shares(cfs_rq, 0); > + } > +} > #else /* CONFIG_FAIR_GROUP_SCHED */ > static void update_cfs_load(struct cfs_rq *cfs_rq, int global_update) > { > @@ -1133,6 +1139,13 @@ entity_tick(struct cfs_rq *cfs_rq, struc > */ > update_curr(cfs_rq); > > +#if defined CONFIG_SMP && defined CONFIG_FAIR_GROUP_SCHED > + /* > + * Update share accounting for long-running entities. > + */ > + update_cfs_rq_shares_tick(cfs_rq); > +#endif > + > #ifdef CONFIG_SCHED_HRTICK > /* > * queued ticks are scheduled to match the slice, so don't bother
--
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:
[patch 2/2] sched: charge unaccounted run-time on entity r ...
, Paul Turner
, (Wed Dec 15, 8:10 pm)
Re: [patch 2/2] sched: charge unaccounted run-time on enti ...
, Paul Turner
, (Wed Dec 15, 8:35 pm)
Re: [patch 2/2] sched: charge unaccounted run-time on enti ...
, Paul Turner
, (Wed Dec 15, 8:36 pm)
Re: [patch 2/2] sched: charge unaccounted run-time on enti ...
, Paul Turner
, (Wed Dec 15, 8:38 pm)
Re: [patch 2/2] sched: charge unaccounted run-time on enti ...
, Peter Zijlstra
, (Thu Dec 16, 4:03 am)
Re: [patch 2/2] sched: charge unaccounted run-time on enti ...
, Paul Turner
, (Thu Dec 16, 3:31 pm)
Re: [patch 2/2] sched: charge unaccounted run-time on enti ...
, Peter Zijlstra
, (Fri Dec 17, 5:38 am)
[tip:sched/core] sched: Fix interactivity bug by