Messages in this thread Patch in this message | | | Subject | [PATCH] sched: CPU_THRESHOLD | From | Frank Cornelis <> | Date | 22 Aug 2003 14:43:01 +0200 |
| |
Hi,
Next patch provides a CPU_THRESHOLD; makes sense since we also have a NODE_THRESHOLD as tuning knob.
Frank.
sched.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff -Nru a/kernel/sched.c b/kernel/sched.c --- a/kernel/sched.c Fri Aug 22 14:20:23 2003 +++ b/kernel/sched.c Fri Aug 22 14:20:23 2003 @@ -76,6 +76,7 @@ #define MAX_SLEEP_AVG (10*HZ) #define STARVATION_LIMIT (10*HZ) #define NODE_THRESHOLD 125 +#define CPU_THRESHOLD 75 /* * If a task is 'interactive' then we reinsert it in the active @@ -963,10 +964,9 @@ if (likely(!busiest)) goto out; - *imbalance = (max_load - nr_running) / 2; + *imbalance = (max_load - nr_running) >> 1; - /* It needs an at least ~25% imbalance to trigger balancing. */ - if (!idle && (*imbalance < (max_load + 3)/4)) { + if (!idle && (*imbalance*100 < nr_running*CPU_THRESHOLD)) { busiest = NULL; goto out; }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |