Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63014
b: refs/heads/master
c: d02c7a8
h: refs/heads/master
v: v3
  • Loading branch information
Con Kolivas authored and Ingo Molnar committed Jul 26, 2007
1 parent 0198c00 commit 9c6e5a3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b762f3ffb797c1281a38a1c82194534055fba5ec
refs/heads/master: d02c7a8cf208eb80a3ccbff40a6bebe8902af35a
16 changes: 16 additions & 0 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,22 @@ extern int partition_sched_domains(cpumask_t *partition1,

#endif /* CONFIG_SMP */

/*
* A runqueue laden with a single nice 0 task scores a weighted_cpuload of
* SCHED_LOAD_SCALE. This function returns 1 if any cpu is laden with a
* task of nice 0 or enough lower priority tasks to bring up the
* weighted_cpuload
*/
static inline int above_background_load(void)
{
unsigned long cpu;

for_each_online_cpu(cpu) {
if (weighted_cpuload(cpu) >= SCHED_LOAD_SCALE)
return 1;
}
return 0;
}

struct io_context; /* See blkdev.h */
struct cpuset;
Expand Down

0 comments on commit 9c6e5a3

Please sign in to comment.