Skip to content

Commit

Permalink
sched/core: Remove the obsolete and unused nr_uninterruptible() function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sha Zhengju authored and Ingo Molnar committed Feb 20, 2013
1 parent ece8e0b commit 1c3e826
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
1 change: 0 additions & 1 deletion include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ extern int nr_threads;
DECLARE_PER_CPU(unsigned long, process_counts);
extern int nr_processes(void);
extern unsigned long nr_running(void);
extern unsigned long nr_uninterruptible(void);
extern unsigned long nr_iowait(void);
extern unsigned long nr_iowait_cpu(int cpu);
extern unsigned long this_cpu_load(void);
Expand Down
22 changes: 2 additions & 20 deletions kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1969,11 +1969,10 @@ context_switch(struct rq *rq, struct task_struct *prev,
}

/*
* nr_running, nr_uninterruptible and nr_context_switches:
* nr_running and nr_context_switches:
*
* externally visible scheduler statistics: current number of runnable
* threads, current number of uninterruptible-sleeping threads, total
* number of context switches performed since bootup.
* threads, total number of context switches performed since bootup.
*/
unsigned long nr_running(void)
{
Expand All @@ -1985,23 +1984,6 @@ unsigned long nr_running(void)
return sum;
}

unsigned long nr_uninterruptible(void)
{
unsigned long i, sum = 0;

for_each_possible_cpu(i)
sum += cpu_rq(i)->nr_uninterruptible;

/*
* Since we read the counters lockless, it might be slightly
* inaccurate. Do not allow it to go below zero though:
*/
if (unlikely((long)sum < 0))
sum = 0;

return sum;
}

unsigned long long nr_context_switches(void)
{
int i;
Expand Down

0 comments on commit 1c3e826

Please sign in to comment.