Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69035
b: refs/heads/master
c: 495eca4
h: refs/heads/master
i:
  69033: 3991e49
  69031: 9e77039
v: v3
  • Loading branch information
Dmitry Adamushko authored and Ingo Molnar committed Oct 15, 2007
1 parent 453c5bf commit 39809f0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a62eabc4d60980eb39fff659f168d903b55c6d7
refs/heads/master: 495eca494aa6006df55e3a04e105462c5940ca17
18 changes: 7 additions & 11 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,6 @@ struct rt_prio_array {
struct list_head queue[MAX_RT_PRIO];
};

struct load_stat {
struct load_weight load;
};

/* CFS-related fields in a runqueue */
struct cfs_rq {
struct load_weight load;
Expand Down Expand Up @@ -236,7 +232,7 @@ struct rq {
#ifdef CONFIG_NO_HZ
unsigned char in_nohz_recently;
#endif
struct load_stat ls; /* capture load from *all* tasks on this cpu */
struct load_weight load; /* capture load from *all* tasks on this cpu */
unsigned long nr_load_updates;
u64 nr_switches;

Expand Down Expand Up @@ -831,25 +827,25 @@ static int balance_tasks(struct rq *this_rq, int this_cpu, struct rq *busiest,
* Update delta_exec, delta_fair fields for rq.
*
* delta_fair clock advances at a rate inversely proportional to
* total load (rq->ls.load.weight) on the runqueue, while
* total load (rq->load.weight) on the runqueue, while
* delta_exec advances at the same rate as wall-clock (provided
* cpu is not idle).
*
* delta_exec / delta_fair is a measure of the (smoothened) load on this
* runqueue over any given interval. This (smoothened) load is used
* during load balance.
*
* This function is called /before/ updating rq->ls.load
* This function is called /before/ updating rq->load
* and when switching tasks.
*/
static inline void inc_load(struct rq *rq, const struct task_struct *p)
{
update_load_add(&rq->ls.load, p->se.load.weight);
update_load_add(&rq->load, p->se.load.weight);
}

static inline void dec_load(struct rq *rq, const struct task_struct *p)
{
update_load_sub(&rq->ls.load, p->se.load.weight);
update_load_sub(&rq->load, p->se.load.weight);
}

static void inc_nr_running(struct task_struct *p, struct rq *rq)
Expand Down Expand Up @@ -996,7 +992,7 @@ inline int task_curr(const struct task_struct *p)
/* Used instead of source_load when we know the type == 0 */
unsigned long weighted_cpuload(const int cpu)
{
return cpu_rq(cpu)->ls.load.weight;
return cpu_rq(cpu)->load.weight;
}

static inline void __set_task_cpu(struct task_struct *p, unsigned int cpu)
Expand Down Expand Up @@ -1979,7 +1975,7 @@ unsigned long nr_active(void)
*/
static void update_cpu_load(struct rq *this_rq)
{
unsigned long this_load = this_rq->ls.load.weight;
unsigned long this_load = this_rq->load.weight;
int i, scale;

this_rq->nr_load_updates++;
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/sched_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static void print_cpu(struct seq_file *m, int cpu)

P(nr_running);
SEQ_printf(m, " .%-30s: %lu\n", "load",
rq->ls.load.weight);
rq->load.weight);
P(nr_switches);
P(nr_load_updates);
P(nr_uninterruptible);
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
* least twice that of our own weight (i.e. dont track it
* when there are only lesser-weight tasks around):
*/
if (rq_of(cfs_rq)->ls.load.weight >= 2*se->load.weight) {
if (rq_of(cfs_rq)->load.weight >= 2*se->load.weight) {
se->slice_max = max(se->slice_max,
se->sum_exec_runtime - se->prev_sum_exec_runtime);
}
Expand Down

0 comments on commit 39809f0

Please sign in to comment.