diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/MuQSS.c | 26 | ||||
-rw-r--r-- | kernel/sysctl.c | 10 |
2 files changed, 29 insertions, 7 deletions
diff --git a/kernel/sched/MuQSS.c b/kernel/sched/MuQSS.c index 18cb55ded3b7..7617ae49ab09 100644 --- a/kernel/sched/MuQSS.c +++ b/kernel/sched/MuQSS.c @@ -137,19 +137,20 @@ void print_scheduler_version(void) { - printk(KERN_INFO "MuQSS CPU scheduler v0.144 by Con Kolivas.\n"); + printk(KERN_INFO "MuQSS CPU scheduler v0.150 by Con Kolivas.\n"); } /* * This is the time all tasks within the same priority round robin. - * Value is in ms and set to a minimum of 6ms. Scales with number of cpus. + * Value is in ms and set to a minimum of 6ms. * Tunable via /proc interface. */ int rr_interval __read_mostly = 6; -/* Tunable to choose whether to prioritise latency or throughput, simple - * binary yes or no */ - +/* + * Tunable to choose whether to prioritise latency or throughput, simple + * binary yes or no + */ int sched_interactive __read_mostly = 1; /* @@ -160,6 +161,14 @@ int sched_interactive __read_mostly = 1; int sched_iso_cpu __read_mostly = 70; /* + * sched_yield_type - Choose what sort of yield sched_yield will perform. + * 0: No yield. + * 1: Yield only to better priority/deadline tasks. (default) + * 2: Expire timeslice and recalculate deadline. + */ +int sched_yield_type __read_mostly = 1; + +/* * The relative length of deadline for each priority(nice) level. */ static int prio_ratios[NICE_WIDTH] __read_mostly; @@ -5077,9 +5086,12 @@ SYSCALL_DEFINE0(sched_yield) struct task_struct *p; struct rq *rq; + if (!sched_yield_type) + goto out; p = current; rq = this_rq_lock(); - time_slice_expired(p, rq); + if (sched_yield_type > 1) + time_slice_expired(p, rq); schedstat_inc(rq->yld_count); /* @@ -5092,7 +5104,7 @@ SYSCALL_DEFINE0(sched_yield) sched_preempt_enable_no_resched(); schedule(); - +out: return 0; } diff --git a/kernel/sysctl.c b/kernel/sysctl.c index d7a4df09cf58..2557e03c3c0d 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -131,6 +131,7 @@ static int __read_mostly one_thousand = 1000; extern int rr_interval; extern int sched_interactive; extern int sched_iso_cpu; +extern int sched_yield_type; #endif #ifdef CONFIG_PRINTK static int ten_thousand = 10000; @@ -1048,6 +1049,15 @@ static struct ctl_table kern_table[] = { .extra1 = &zero, .extra2 = &one_hundred, }, + { + .procname = "yield_type", + .data = &sched_yield_type, + .maxlen = sizeof (int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, + .extra1 = &zero, + .extra2 = &two, + }, #endif #if defined(CONFIG_S390) && defined(CONFIG_SMP) { |