User: | Jiri Slaby |
Error type: | Leaving function in locked state |
Error type description: | Some lock is not unlocked on all paths of a function, so it is leaked |
File location: | kernel/sched.c |
Line in file: | 3988 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2012-05-29 20:11:37 UTC |
3958#ifdef CONFIG_NO_HZ 3959 /* 3960 * If this cpu is the owner for idle load balancing, then do the 3961 * balancing on behalf of the other idle cpus whose ticks are 3962 * stopped. 3963 */ 3964 if (this_rq->idle_at_tick && 3965 atomic_read(&nohz.load_balancer) == this_cpu) { 3966 cpumask_t cpus = nohz.cpu_mask; 3967 struct rq *rq; 3968 int balance_cpu; 3969 3970 cpu_clear(this_cpu, cpus); 3971 for_each_cpu_mask_nr(balance_cpu, cpus) { 3972 /* 3973 * If this cpu gets work to do, stop the load balancing 3974 * work being done for other cpus. Next load 3975 * balancing owner will pick it up. 3976 */ 3977 if (need_resched()) 3978 break; 3979 3980 rebalance_domains(balance_cpu, CPU_IDLE); 3981 3982 rq = cpu_rq(balance_cpu); 3983 if (time_after(this_rq->next_balance, rq->next_balance)) 3984 this_rq->next_balance = rq->next_balance; 3985 } 3986 } 3987#endif 3988} 3989 3990/* 3991 * Trigger the SCHED_SOFTIRQ if it is time to do periodic load balancing. 3992 * 3993 * In case of CONFIG_NO_HZ, this is the place where we nominate a new 3994 * idle load balancing owner or decide to stop the periodic load balancing, 3995 * if the whole system is idle. 3996 */ 3997static inline void trigger_load_balance(struct rq *rq, int cpu) 3998{