sched: fix buddie group latency
[safe/jmp/linux-2.6] / kernel / timer.c
index dbd50fa..13dd64f 100644 (file)
@@ -1018,21 +1018,6 @@ unsigned long get_next_timer_interrupt(unsigned long now)
 }
 #endif
 
-#ifndef CONFIG_VIRT_CPU_ACCOUNTING
-void account_process_tick(struct task_struct *p, int user_tick)
-{
-       cputime_t one_jiffy = jiffies_to_cputime(1);
-
-       if (user_tick) {
-               account_user_time(p, one_jiffy);
-               account_user_time_scaled(p, cputime_to_scaled(one_jiffy));
-       } else {
-               account_system_time(p, HARDIRQ_OFFSET, one_jiffy);
-               account_system_time_scaled(p, cputime_to_scaled(one_jiffy));
-       }
-}
-#endif
-
 /*
  * Called from the timer interrupt handler to charge one tick to the current
  * process.  user_tick is 1 if the tick is user time, 0 for system.
@@ -1144,7 +1129,7 @@ void do_timer(unsigned long ticks)
  * For backwards compatibility?  This can be done in libc so Alpha
  * and all newer ports shouldn't need it.
  */
-asmlinkage unsigned long sys_alarm(unsigned int seconds)
+SYSCALL_DEFINE1(alarm, unsigned int, seconds)
 {
        return alarm_setitimer(seconds);
 }
@@ -1167,7 +1152,7 @@ asmlinkage unsigned long sys_alarm(unsigned int seconds)
  *
  * This is SMP safe as current->tgid does not change.
  */
-asmlinkage long sys_getpid(void)
+SYSCALL_DEFINE0(getpid)
 {
        return task_tgid_vnr(current);
 }
@@ -1178,7 +1163,7 @@ asmlinkage long sys_getpid(void)
  * value of ->real_parent under rcu_read_lock(), see
  * release_task()->call_rcu(delayed_put_task_struct).
  */
-asmlinkage long sys_getppid(void)
+SYSCALL_DEFINE0(getppid)
 {
        int pid;
 
@@ -1189,28 +1174,28 @@ asmlinkage long sys_getppid(void)
        return pid;
 }
 
-asmlinkage long sys_getuid(void)
+SYSCALL_DEFINE0(getuid)
 {
        /* Only we change this so SMP safe */
-       return current->uid;
+       return current_uid();
 }
 
-asmlinkage long sys_geteuid(void)
+SYSCALL_DEFINE0(geteuid)
 {
        /* Only we change this so SMP safe */
-       return current->euid;
+       return current_euid();
 }
 
-asmlinkage long sys_getgid(void)
+SYSCALL_DEFINE0(getgid)
 {
        /* Only we change this so SMP safe */
-       return current->gid;
+       return current_gid();
 }
 
-asmlinkage long sys_getegid(void)
+SYSCALL_DEFINE0(getegid)
 {
        /* Only we change this so SMP safe */
-       return  current->egid;
+       return  current_egid();
 }
 
 #endif
@@ -1323,7 +1308,7 @@ signed long __sched schedule_timeout_uninterruptible(signed long timeout)
 EXPORT_SYMBOL(schedule_timeout_uninterruptible);
 
 /* Thread ID - the internal kernel "pid" */
-asmlinkage long sys_gettid(void)
+SYSCALL_DEFINE0(gettid)
 {
        return task_pid_vnr(current);
 }
@@ -1415,7 +1400,7 @@ out:
        return 0;
 }
 
-asmlinkage long sys_sysinfo(struct sysinfo __user *info)
+SYSCALL_DEFINE1(sysinfo, struct sysinfo __user *, info)
 {
        struct sysinfo val;