]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 16 Jan 2009 00:55:00 +0000 (16:55 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 16 Jan 2009 00:55:00 +0000 (16:55 -0800)
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: sched_slice() fixlet
  sched: fix update_min_vruntime
  sched: SCHED_OTHER vs SCHED_IDLE isolation
  sched: SCHED_IDLE weight change
  sched: fix bandwidth validation for UID grouping
  Revert "sched: improve preempt debugging"

1  2 
kernel/sched.c

diff --combined kernel/sched.c
index eb1931eef58716ac12aed1c473141136caa5d378,6acfb3c2398b988cd0dc907f7f4996237c156a58..52bbf1c842a8e0baecd1cd9f53883806eaab1350
@@@ -1323,8 -1323,8 +1323,8 @@@ static inline void update_load_sub(stru
   * slice expiry etc.
   */
  
- #define WEIGHT_IDLEPRIO               2
- #define WMULT_IDLEPRIO                (1 << 31)
+ #define WEIGHT_IDLEPRIO                3
+ #define WMULT_IDLEPRIO         1431655765
  
  /*
   * Nice levels are multiplicative, with a gentle 10% change for every
@@@ -4440,7 -4440,7 +4440,7 @@@ void __kprobes sub_preempt_count(int va
        /*
         * Underflow?
         */
-        if (DEBUG_LOCKS_WARN_ON(val > preempt_count() - (!!kernel_locked())))
+       if (DEBUG_LOCKS_WARN_ON(val > preempt_count()))
                return;
        /*
         * Is the spinlock portion underflowing?
@@@ -5126,7 -5126,7 +5126,7 @@@ int can_nice(const struct task_struct *
   * sys_setpriority is a more generic, but much slower function that
   * does similar things.
   */
 -asmlinkage long sys_nice(int increment)
 +SYSCALL_DEFINE1(nice, int, increment)
  {
        long nice, retval;
  
@@@ -5433,8 -5433,8 +5433,8 @@@ do_sched_setscheduler(pid_t pid, int po
   * @policy: new policy.
   * @param: structure containing the new RT priority.
   */
 -asmlinkage long
 -sys_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
 +SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy,
 +              struct sched_param __user *, param)
  {
        /* negative values for policy are not valid */
        if (policy < 0)
   * @pid: the pid in question.
   * @param: structure containing the new RT priority.
   */
 -asmlinkage long sys_sched_setparam(pid_t pid, struct sched_param __user *param)
 +SYSCALL_DEFINE2(sched_setparam, pid_t, pid, struct sched_param __user *, param)
  {
        return do_sched_setscheduler(pid, -1, param);
  }
   * sys_sched_getscheduler - get the policy (scheduling class) of a thread
   * @pid: the pid in question.
   */
 -asmlinkage long sys_sched_getscheduler(pid_t pid)
 +SYSCALL_DEFINE1(sched_getscheduler, pid_t, pid)
  {
        struct task_struct *p;
        int retval;
   * @pid: the pid in question.
   * @param: structure containing the RT priority.
   */
 -asmlinkage long sys_sched_getparam(pid_t pid, struct sched_param __user *param)
 +SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param)
  {
        struct sched_param lp;
        struct task_struct *p;
@@@ -5600,8 -5600,8 +5600,8 @@@ static int get_user_cpu_mask(unsigned l
   * @len: length in bytes of the bitmask pointed to by user_mask_ptr
   * @user_mask_ptr: user-space pointer to the new cpu mask
   */
 -asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len,
 -                                    unsigned long __user *user_mask_ptr)
 +SYSCALL_DEFINE3(sched_setaffinity, pid_t, pid, unsigned int, len,
 +              unsigned long __user *, user_mask_ptr)
  {
        cpumask_var_t new_mask;
        int retval;
@@@ -5648,8 -5648,8 +5648,8 @@@ out_unlock
   * @len: length in bytes of the bitmask pointed to by user_mask_ptr
   * @user_mask_ptr: user-space pointer to hold the current cpu mask
   */
 -asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len,
 -                                    unsigned long __user *user_mask_ptr)
 +SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
 +              unsigned long __user *, user_mask_ptr)
  {
        int ret;
        cpumask_var_t mask;
   * This function yields the current CPU to other tasks. If there are no
   * other threads running on this CPU then this function will return.
   */
 -asmlinkage long sys_sched_yield(void)
 +SYSCALL_DEFINE0(sched_yield)
  {
        struct rq *rq = this_rq_lock();
  
@@@ -5819,7 -5819,7 +5819,7 @@@ long __sched io_schedule_timeout(long t
   * this syscall returns the maximum rt_priority that can be used
   * by a given scheduling class.
   */
 -asmlinkage long sys_sched_get_priority_max(int policy)
 +SYSCALL_DEFINE1(sched_get_priority_max, int, policy)
  {
        int ret = -EINVAL;
  
   * this syscall returns the minimum rt_priority that can be used
   * by a given scheduling class.
   */
 -asmlinkage long sys_sched_get_priority_min(int policy)
 +SYSCALL_DEFINE1(sched_get_priority_min, int, policy)
  {
        int ret = -EINVAL;
  
   * this syscall writes the default timeslice value of a given process
   * into the user-space timespec buffer. A value of '0' means infinity.
   */
 -asmlinkage
 -long sys_sched_rr_get_interval(pid_t pid, struct timespec __user *interval)
 +SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid,
 +              struct timespec __user *, interval)
  {
        struct task_struct *p;
        unsigned int time_slice;
@@@ -9050,6 -9050,13 +9050,13 @@@ static int tg_schedulable(struct task_g
                runtime = d->rt_runtime;
        }
  
+ #ifdef CONFIG_USER_SCHED
+       if (tg == &root_task_group) {
+               period = global_rt_period();
+               runtime = global_rt_runtime();
+       }
+ #endif
        /*
         * Cannot have more runtime than the period.
         */