diff options
author | Sha Zhengju <handai.szj@taobao.com> | 2013-02-20 04:14:38 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-02-20 05:39:24 -0500 |
commit | 1c3e826482ab698e418c7a894440e62c76aac893 (patch) | |
tree | 308b6ec83faaf1185c937ef4d2a5387bef00ff99 | |
parent | ece8e0b2f9c980e5511fe8db2d68c6f1859b9d83 (diff) |
sched/core: Remove the obsolete and unused nr_uninterruptible() function
Signed-off-by: Sha Zhengju <handai.szj@taobao.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1361351678-8065-1-git-send-email-handai.szj@taobao.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | include/linux/sched.h | 1 | ||||
-rw-r--r-- | kernel/sched/core.c | 22 |
2 files changed, 2 insertions, 21 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 33cc42130371..f9ca237df7e8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -98,7 +98,6 @@ extern int nr_threads; | |||
98 | DECLARE_PER_CPU(unsigned long, process_counts); | 98 | DECLARE_PER_CPU(unsigned long, process_counts); |
99 | extern int nr_processes(void); | 99 | extern int nr_processes(void); |
100 | extern unsigned long nr_running(void); | 100 | extern unsigned long nr_running(void); |
101 | extern unsigned long nr_uninterruptible(void); | ||
102 | extern unsigned long nr_iowait(void); | 101 | extern unsigned long nr_iowait(void); |
103 | extern unsigned long nr_iowait_cpu(int cpu); | 102 | extern unsigned long nr_iowait_cpu(int cpu); |
104 | extern unsigned long this_cpu_load(void); | 103 | extern unsigned long this_cpu_load(void); |
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 03d7784b7bd2..b7b03cd2d4cd 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -1969,11 +1969,10 @@ context_switch(struct rq *rq, struct task_struct *prev, | |||
1969 | } | 1969 | } |
1970 | 1970 | ||
1971 | /* | 1971 | /* |
1972 | * nr_running, nr_uninterruptible and nr_context_switches: | 1972 | * nr_running and nr_context_switches: |
1973 | * | 1973 | * |
1974 | * externally visible scheduler statistics: current number of runnable | 1974 | * externally visible scheduler statistics: current number of runnable |
1975 | * threads, current number of uninterruptible-sleeping threads, total | 1975 | * threads, total number of context switches performed since bootup. |
1976 | * number of context switches performed since bootup. | ||
1977 | */ | 1976 | */ |
1978 | unsigned long nr_running(void) | 1977 | unsigned long nr_running(void) |
1979 | { | 1978 | { |
@@ -1985,23 +1984,6 @@ unsigned long nr_running(void) | |||
1985 | return sum; | 1984 | return sum; |
1986 | } | 1985 | } |
1987 | 1986 | ||
1988 | unsigned long nr_uninterruptible(void) | ||
1989 | { | ||
1990 | unsigned long i, sum = 0; | ||
1991 | |||
1992 | for_each_possible_cpu(i) | ||
1993 | sum += cpu_rq(i)->nr_uninterruptible; | ||
1994 | |||
1995 | /* | ||
1996 | * Since we read the counters lockless, it might be slightly | ||
1997 | * inaccurate. Do not allow it to go below zero though: | ||
1998 | */ | ||
1999 | if (unlikely((long)sum < 0)) | ||
2000 | sum = 0; | ||
2001 | |||
2002 | return sum; | ||
2003 | } | ||
2004 | |||
2005 | unsigned long long nr_context_switches(void) | 1987 | unsigned long long nr_context_switches(void) |
2006 | { | 1988 | { |
2007 | int i; | 1989 | int i; |