summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-12-16 14:55:49 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-12-16 14:55:49 -0300
commitf3a16ba6a1152b8966dcadc668af4cf00623c7b1 (patch)
tree5fee49a027f6fddf70b29369d24703946370eb77 /kernel
parentb652965369918b9d992dc42fb060240f94d98769 (diff)
Linux-libre 4.3.3-gnu
Diffstat (limited to 'kernel')
-rw-r--r--kernel/.gitignore1
-rw-r--r--kernel/bpf/arraymap.c2
-rw-r--r--kernel/sched/bfs.c38
-rw-r--r--kernel/sysctl.c10
4 files changed, 27 insertions, 24 deletions
diff --git a/kernel/.gitignore b/kernel/.gitignore
index 790d83c7d..b3097bde4 100644
--- a/kernel/.gitignore
+++ b/kernel/.gitignore
@@ -5,4 +5,3 @@ config_data.h
config_data.gz
timeconst.h
hz.bc
-x509_certificate_list
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
index 29ace107f..7a0decf47 100644
--- a/kernel/bpf/arraymap.c
+++ b/kernel/bpf/arraymap.c
@@ -104,7 +104,7 @@ static int array_map_update_elem(struct bpf_map *map, void *key, void *value,
/* all elements already exist */
return -EEXIST;
- memcpy(array->value + array->elem_size * index, value, array->elem_size);
+ memcpy(array->value + array->elem_size * index, value, map->value_size);
return 0;
}
diff --git a/kernel/sched/bfs.c b/kernel/sched/bfs.c
index e414fed91..a4e9de738 100644
--- a/kernel/sched/bfs.c
+++ b/kernel/sched/bfs.c
@@ -135,7 +135,7 @@
void print_scheduler_version(void)
{
- printk(KERN_INFO "BFS CPU scheduler v0.465 by Con Kolivas.\n");
+ printk(KERN_INFO "BFS CPU scheduler v0.467 by Con Kolivas.\n");
}
/*
@@ -149,6 +149,11 @@ int rr_interval __read_mostly = 3;
int rr_interval __read_mostly = 6;
#endif
+/* Tunable to choose whether to prioritise latency or throughput, simple
+ * binary yes or no */
+
+int sched_interactive __read_mostly = 1;
+
/*
* sched_iso_cpu - sysctl which determines the cpu percentage SCHED_ISO tasks
* are allowed to run five seconds as real time tasks. This is the total over
@@ -869,9 +874,9 @@ static inline bool scaling_rq(struct rq *rq)
return rq->scaling;
}
-static inline int locality_diff(struct task_struct *p, struct rq *rq)
+static inline int locality_diff(int cpu, struct rq *rq)
{
- return rq->cpu_locality[task_cpu(p)];
+ return rq->cpu_locality[cpu];
}
#else /* CONFIG_SMP */
static inline void set_cpuidle_map(int cpu)
@@ -2688,20 +2693,6 @@ void account_idle_time(cputime_t cputime)
{
}
-#ifdef CONFIG_NO_HZ_COMMON
-void update_cpu_load_nohz(void)
-{
-}
-
-void calc_load_enter_idle(void)
-{
-}
-
-void calc_load_exit_idle(void)
-{
-}
-#endif /* CONFIG_NO_HZ_COMMON */
-
/*
* Account guest cpu time to a process.
* @p: the process that the cpu time gets accounted to
@@ -3227,12 +3218,15 @@ task_struct *earliest_deadline_task(struct rq *rq, int cpu, struct task_struct *
* against its deadline when not, based on cpu cache
* locality.
*/
- if (task_sticky(p) && task_rq(p) != rq) {
- if (scaling_rq(rq))
- continue;
- dl = p->deadline << locality_diff(p, rq);
- } else
+ if (sched_interactive)
dl = p->deadline;
+ else {
+ int tcpu = task_cpu(p);
+
+ if (tcpu != cpu && task_sticky(p) && scaling_rq(rq))
+ continue;
+ dl = p->deadline << locality_diff(tcpu, rq);
+ }
if (deadline_before(dl, earliest_deadline)) {
earliest_deadline = dl;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 973e3b4f2..079357ab2 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -127,6 +127,7 @@ static unsigned long one_ul = 1;
static int __maybe_unused one_hundred = 100;
#ifdef CONFIG_SCHED_BFS
extern int rr_interval;
+extern int sched_interactive;
extern int sched_iso_cpu;
static int __read_mostly one_thousand = 1000;
#endif
@@ -988,6 +989,15 @@ static struct ctl_table kern_table[] = {
.extra2 = &one_thousand,
},
{
+ .procname = "interactive",
+ .data = &sched_interactive,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+ .extra1 = &zero,
+ .extra2 = &one,
+ },
+ {
.procname = "iso_cpu",
.data = &sched_iso_cpu,
.maxlen = sizeof (int),