Skip to content

Commit

Permalink
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/linux/kernel/git/tip/tip

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched: Fix lockup by limiting load-balance retries on lock-break
  sched: Fix CONFIG_CGROUP_SCHED dependency
  sched: Remove empty #ifdefs
  • Loading branch information
Linus Torvalds committed Jan 12, 2012
2 parents 9fc5c3e + bced76a commit b8bf17d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
1 change: 0 additions & 1 deletion init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,6 @@ config CGROUP_PERF

menuconfig CGROUP_SCHED
bool "Group CPU scheduler"
depends on EXPERIMENTAL
default n
help
This feature lets CPU scheduler recognize task groups and control CPU
Expand Down
7 changes: 0 additions & 7 deletions kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -7134,10 +7134,6 @@ void set_curr_task(int cpu, struct task_struct *p)

#endif

#ifdef CONFIG_RT_GROUP_SCHED
#else /* !CONFIG_RT_GROUP_SCHED */
#endif /* CONFIG_RT_GROUP_SCHED */

#ifdef CONFIG_CGROUP_SCHED
/* task_group_lock serializes the addition/removal of task groups */
static DEFINE_SPINLOCK(task_group_lock);
Expand Down Expand Up @@ -7246,9 +7242,6 @@ void sched_move_task(struct task_struct *tsk)
}
#endif /* CONFIG_CGROUP_SCHED */

#ifdef CONFIG_FAIR_GROUP_SCHED
#endif

#if defined(CONFIG_RT_GROUP_SCHED) || defined(CONFIG_CFS_BANDWIDTH)
static unsigned long to_ratio(u64 period, u64 runtime)
{
Expand Down
10 changes: 7 additions & 3 deletions kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -3130,8 +3130,10 @@ task_hot(struct task_struct *p, u64 now, struct sched_domain *sd)
}

#define LBF_ALL_PINNED 0x01
#define LBF_NEED_BREAK 0x02
#define LBF_ABORT 0x04
#define LBF_NEED_BREAK 0x02 /* clears into HAD_BREAK */
#define LBF_HAD_BREAK 0x04
#define LBF_HAD_BREAKS 0x0C /* count HAD_BREAKs overflows into ABORT */
#define LBF_ABORT 0x10

/*
* can_migrate_task - may task p from runqueue rq be migrated to this_cpu?
Expand Down Expand Up @@ -4508,7 +4510,9 @@ static int load_balance(int this_cpu, struct rq *this_rq,
goto out_balanced;

if (lb_flags & LBF_NEED_BREAK) {
lb_flags &= ~LBF_NEED_BREAK;
lb_flags += LBF_HAD_BREAK - LBF_NEED_BREAK;
if (lb_flags & LBF_ABORT)
goto out_balanced;
goto redo;
}

Expand Down

0 comments on commit b8bf17d

Please sign in to comment.