Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135704
b: refs/heads/master
c: 57310a9
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Mar 10, 2009
1 parent e78b4c5 commit aa41a2a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 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: 8c54436ae9f59146b3d02820a3ebbf71e61f2aee
refs/heads/master: 57310a98a354e84279d7c8af2f48805a62372e53
16 changes: 15 additions & 1 deletion trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,13 @@ static DEFINE_PER_CPU(struct rt_rq, init_rt_rq) ____cacheline_aligned_in_smp;
*/
static DEFINE_SPINLOCK(task_group_lock);

#ifdef CONFIG_SMP
static int root_task_group_empty(void)
{
return list_empty(&root_task_group.children);
}
#endif

#ifdef CONFIG_FAIR_GROUP_SCHED
#ifdef CONFIG_USER_SCHED
# define INIT_TASK_GROUP_LOAD (2*NICE_0_LOAD)
Expand Down Expand Up @@ -391,6 +398,13 @@ static inline void set_task_rq(struct task_struct *p, unsigned int cpu)

#else

#ifdef CONFIG_SMP
static int root_task_group_empty(void)
{
return 1;
}
#endif

static inline void set_task_rq(struct task_struct *p, unsigned int cpu) { }
static inline struct task_group *task_group(struct task_struct *p)
{
Expand Down Expand Up @@ -2318,7 +2332,7 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
sync = 0;

#ifdef CONFIG_SMP
if (sched_feat(LB_WAKEUP_UPDATE)) {
if (sched_feat(LB_WAKEUP_UPDATE) && !root_task_group_empty()) {
struct sched_domain *sd;

this_cpu = raw_smp_processor_id();
Expand Down

0 comments on commit aa41a2a

Please sign in to comment.