summaryrefslogtreecommitdiffstats
path: root/kernel/sched/fair.c
diff options
context:
space:
mode:
authorTakashi Iwai2016-05-27 17:16:53 +0200
committerTakashi Iwai2016-05-27 17:16:53 +0200
commiteb4606e64a7d548f5d60a9583baa8104890b2c6e (patch)
tree2dc8e587fc79c207dab2fb74830963cc84dcf801 /kernel/sched/fair.c
parentALSA: hda - Fix headset mic detection problem for one Dell machine (diff)
parentMerge remote-tracking branch 'asoc/topic/wm8962' into asoc-next (diff)
downloadkernel-qcow2-linux-eb4606e64a7d548f5d60a9583baa8104890b2c6e.tar.gz
kernel-qcow2-linux-eb4606e64a7d548f5d60a9583baa8104890b2c6e.tar.xz
kernel-qcow2-linux-eb4606e64a7d548f5d60a9583baa8104890b2c6e.zip
Merge tag 'asoc-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v4.7 part 2 Really sorry about this late pull request. It looks like at the time I sent my pull request for v4.7 there was some conflict or other issue which caused my script to stop merging the ASoC branches at some point after the HDMI changes. It's all specific driver updates, including: - New drivers for MAX98371 and TAS5720. - SPI support for TLV320AIC32x4. - TDM support for STI Uniperf IPs. This code should all have been in -next prior to the merge window apart from some fixes, it dropped out on the 18th.
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r--kernel/sched/fair.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 0fe30e66aff1..e7dd0ec169be 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3030,7 +3030,14 @@ static int idle_balance(struct rq *this_rq);
#else /* CONFIG_SMP */
-static inline void update_load_avg(struct sched_entity *se, int update_tg) {}
+static inline void update_load_avg(struct sched_entity *se, int not_used)
+{
+ struct cfs_rq *cfs_rq = cfs_rq_of(se);
+ struct rq *rq = rq_of(cfs_rq);
+
+ cpufreq_trigger_update(rq_clock(rq));
+}
+
static inline void
enqueue_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) {}
static inline void
@@ -3181,25 +3188,17 @@ static inline void check_schedstat_required(void)
static void
enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
{
- bool renorm = !(flags & ENQUEUE_WAKEUP) || (flags & ENQUEUE_WAKING);
- bool curr = cfs_rq->curr == se;
-
/*
- * If we're the current task, we must renormalise before calling
- * update_curr().
+ * Update the normalized vruntime before updating min_vruntime
+ * through calling update_curr().
*/
- if (renorm && curr)
+ if (!(flags & ENQUEUE_WAKEUP) || (flags & ENQUEUE_WAKING))
se->vruntime += cfs_rq->min_vruntime;
- update_curr(cfs_rq);
-
/*
- * Otherwise, renormalise after, such that we're placed at the current
- * moment in time, instead of some random moment in the past.
+ * Update run-time statistics of the 'current'.
*/
- if (renorm && !curr)
- se->vruntime += cfs_rq->min_vruntime;
-
+ update_curr(cfs_rq);
enqueue_entity_load_avg(cfs_rq, se);
account_entity_enqueue(cfs_rq, se);
update_cfs_shares(cfs_rq);
@@ -3215,7 +3214,7 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
update_stats_enqueue(cfs_rq, se);
check_spread(cfs_rq, se);
}
- if (!curr)
+ if (se != cfs_rq->curr)
__enqueue_entity(cfs_rq, se);
se->on_rq = 1;