diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-26 16:59:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-26 16:59:59 -0400 |
commit | 257f49251c802c67030c11f63cee4ed7b50f6639 (patch) | |
tree | 99fcefa267be1b2ae63b48bf2094157732ecece1 /include/linux/sched.h | |
parent | 293a032eb95f3c6c212c1541e94c14b111731313 (diff) | |
parent | e692ab53473c93c0d0820618c97aa74a62ab67da (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
[PATCH] sched: debug feature - make the sched-domains tree runtime-tweakable
[PATCH] sched: add above_background_load() function
[PATCH] sched: update Documentation/sched-stats.txt
[PATCH] sched: mark sysrq_sched_debug_show() static
[PATCH] sched: make cpu_clock() not use the rq clock
[PATCH] sched: remove unused rq->load_balance_class
[PATCH] sched: arch preempt notifier mechanism
[PATCH] sched: increase SCHED_LOAD_SCALE_FUZZ
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 33b9b4841ee7..2e490271acf6 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -681,7 +681,7 @@ enum cpu_idle_type { | |||
681 | #define SCHED_LOAD_SHIFT 10 | 681 | #define SCHED_LOAD_SHIFT 10 |
682 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) | 682 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) |
683 | 683 | ||
684 | #define SCHED_LOAD_SCALE_FUZZ (SCHED_LOAD_SCALE >> 5) | 684 | #define SCHED_LOAD_SCALE_FUZZ (SCHED_LOAD_SCALE >> 1) |
685 | 685 | ||
686 | #ifdef CONFIG_SMP | 686 | #ifdef CONFIG_SMP |
687 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ | 687 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ |
@@ -786,6 +786,22 @@ extern int partition_sched_domains(cpumask_t *partition1, | |||
786 | 786 | ||
787 | #endif /* CONFIG_SMP */ | 787 | #endif /* CONFIG_SMP */ |
788 | 788 | ||
789 | /* | ||
790 | * A runqueue laden with a single nice 0 task scores a weighted_cpuload of | ||
791 | * SCHED_LOAD_SCALE. This function returns 1 if any cpu is laden with a | ||
792 | * task of nice 0 or enough lower priority tasks to bring up the | ||
793 | * weighted_cpuload | ||
794 | */ | ||
795 | static inline int above_background_load(void) | ||
796 | { | ||
797 | unsigned long cpu; | ||
798 | |||
799 | for_each_online_cpu(cpu) { | ||
800 | if (weighted_cpuload(cpu) >= SCHED_LOAD_SCALE) | ||
801 | return 1; | ||
802 | } | ||
803 | return 0; | ||
804 | } | ||
789 | 805 | ||
790 | struct io_context; /* See blkdev.h */ | 806 | struct io_context; /* See blkdev.h */ |
791 | struct cpuset; | 807 | struct cpuset; |
@@ -935,6 +951,11 @@ struct task_struct { | |||
935 | struct sched_class *sched_class; | 951 | struct sched_class *sched_class; |
936 | struct sched_entity se; | 952 | struct sched_entity se; |
937 | 953 | ||
954 | #ifdef CONFIG_PREEMPT_NOTIFIERS | ||
955 | /* list of struct preempt_notifier: */ | ||
956 | struct hlist_head preempt_notifiers; | ||
957 | #endif | ||
958 | |||
938 | unsigned short ioprio; | 959 | unsigned short ioprio; |
939 | #ifdef CONFIG_BLK_DEV_IO_TRACE | 960 | #ifdef CONFIG_BLK_DEV_IO_TRACE |
940 | unsigned int btrace_seq; | 961 | unsigned int btrace_seq; |