diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:53:30 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:53:30 +0200 |
commit | c2da06c175b7ce286c2acdf44d891bfdf8cd8def (patch) | |
tree | c8a087a3fc67757076dad105f45ed86d618e2ae6 /recipes-kernel | |
download | meta-nohz-daisy.tar.gz |
initial commit for Enea Linux 4.0HEADdaisy-eneadaisy
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'recipes-kernel')
5 files changed, 163 insertions, 0 deletions
diff --git a/recipes-kernel/linux/files/patches/nohz-Drop-generic-vtime-obsolete-dependency-on-CONFI.patch b/recipes-kernel/linux/files/patches/nohz-Drop-generic-vtime-obsolete-dependency-on-CONFI.patch new file mode 100644 index 0000000..d43249e --- /dev/null +++ b/recipes-kernel/linux/files/patches/nohz-Drop-generic-vtime-obsolete-dependency-on-CONFI.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 6f8a3d2a1ea680295815e5460fc13ca596893e3c Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Borg <martin.borg@enea.com> | ||
3 | Date: Mon, 3 Mar 2014 13:35:08 +0100 | ||
4 | Subject: [PATCH 2/2] nohz: Drop generic vtime obsolete dependency on | ||
5 | CONFIG_64BIT | ||
6 | |||
7 | --- | ||
8 | init/Kconfig | 2 +- | ||
9 | kernel/time/Kconfig | 1 - | ||
10 | 2 files changed, 1 insertion(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/init/Kconfig b/init/Kconfig | ||
13 | index 0b5d0c8..d7411e5 100644 | ||
14 | --- a/init/Kconfig | ||
15 | +++ b/init/Kconfig | ||
16 | @@ -325,7 +325,7 @@ config VIRT_CPU_ACCOUNTING_NATIVE | ||
17 | |||
18 | config VIRT_CPU_ACCOUNTING_GEN | ||
19 | bool "Full dynticks CPU time accounting" | ||
20 | - depends on HAVE_CONTEXT_TRACKING && 64BIT | ||
21 | + depends on HAVE_CONTEXT_TRACKING | ||
22 | select VIRT_CPU_ACCOUNTING | ||
23 | select CONTEXT_TRACKING | ||
24 | help | ||
25 | diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig | ||
26 | index 70f27e8..c270b48 100644 | ||
27 | --- a/kernel/time/Kconfig | ||
28 | +++ b/kernel/time/Kconfig | ||
29 | @@ -100,7 +100,6 @@ config NO_HZ_FULL | ||
30 | # RCU_USER_QS dependency | ||
31 | depends on HAVE_CONTEXT_TRACKING | ||
32 | # VIRT_CPU_ACCOUNTING_GEN dependency | ||
33 | - depends on 64BIT | ||
34 | select NO_HZ_COMMON | ||
35 | select RCU_USER_QS | ||
36 | select RCU_NOCB_CPU | ||
37 | -- | ||
38 | 1.7.10.4 | ||
39 | |||
diff --git a/recipes-kernel/linux/files/patches/sched-nohz-Fix-overflow-error-in-scheduler_tick_max_.patch b/recipes-kernel/linux/files/patches/sched-nohz-Fix-overflow-error-in-scheduler_tick_max_.patch new file mode 100644 index 0000000..0c60d55 --- /dev/null +++ b/recipes-kernel/linux/files/patches/sched-nohz-Fix-overflow-error-in-scheduler_tick_max_.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 619480006f78ebf87d80b73d4085a52a1de56feb Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Borg <martin.borg@enea.com> | ||
3 | Date: Mon, 3 Mar 2014 13:34:43 +0100 | ||
4 | Subject: [PATCH 1/2] sched/nohz: Fix overflow error in | ||
5 | scheduler_tick_max_deferment() | ||
6 | |||
7 | --- | ||
8 | include/linux/jiffies.h | 4 ++++ | ||
9 | kernel/sched/core.c | 2 +- | ||
10 | 2 files changed, 5 insertions(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h | ||
13 | index 8fb8edf..ac69959 100644 | ||
14 | --- a/include/linux/jiffies.h | ||
15 | +++ b/include/linux/jiffies.h | ||
16 | @@ -290,6 +290,10 @@ extern unsigned long preset_lpj; | ||
17 | */ | ||
18 | extern unsigned int jiffies_to_msecs(const unsigned long j); | ||
19 | extern unsigned int jiffies_to_usecs(const unsigned long j); | ||
20 | +static inline u64 jiffies_to_nsecs(const unsigned long j) | ||
21 | +{ | ||
22 | + return (u64)jiffies_to_usecs(j) * NSEC_PER_USEC; | ||
23 | +} | ||
24 | extern unsigned long msecs_to_jiffies(const unsigned int m); | ||
25 | extern unsigned long usecs_to_jiffies(const unsigned int u); | ||
26 | extern unsigned long timespec_to_jiffies(const struct timespec *value); | ||
27 | diff --git a/kernel/sched/core.c b/kernel/sched/core.c | ||
28 | index 59c7367..8c3d8bf 100644 | ||
29 | --- a/kernel/sched/core.c | ||
30 | +++ b/kernel/sched/core.c | ||
31 | @@ -2779,7 +2779,7 @@ u64 scheduler_tick_max_deferment(void) | ||
32 | if (time_before_eq(next, now)) | ||
33 | return 0; | ||
34 | |||
35 | - return jiffies_to_usecs(next - now) * NSEC_PER_USEC; | ||
36 | + return jiffies_to_nsecs(next - now); | ||
37 | } | ||
38 | |||
39 | static __init int sched_nohz_full_init_debug(void) | ||
40 | -- | ||
41 | 1.7.10.4 | ||
42 | |||
diff --git a/recipes-kernel/linux/files/patches/sched-nohz-add-debugfs-control-over-sched_tick_max_d.patch b/recipes-kernel/linux/files/patches/sched-nohz-add-debugfs-control-over-sched_tick_max_d.patch new file mode 100644 index 0000000..349604c --- /dev/null +++ b/recipes-kernel/linux/files/patches/sched-nohz-add-debugfs-control-over-sched_tick_max_d.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From 92f0d4f695198fcb935cf0360f93a15bf0a6af1e Mon Sep 17 00:00:00 2001 | ||
2 | From: Kevin Hilman <khilman@linaro.org> | ||
3 | Date: Mon, 16 Sep 2013 15:43:48 -0700 | ||
4 | Subject: [PATCH 3/3] sched/nohz: add debugfs control over | ||
5 | sched_tick_max_deferment | ||
6 | |||
7 | Allow debugfs override of sched_tick_max_deferment in order to ease | ||
8 | finding/fixing the remaining issues with full nohz. | ||
9 | |||
10 | The value to be written is in jiffies, and -1 means the max deferment | ||
11 | is disabled (scheduler_tick_max_deferment() returns KTIME_MAX.) | ||
12 | |||
13 | Cc: Frederic Weisbecker <fweisbec@gmail.com> | ||
14 | Signed-off-by: Kevin Hilman <khilman@linaro.org> | ||
15 | --- | ||
16 | kernel/sched/core.c | 16 +++++++++++++++- | ||
17 | 1 file changed, 15 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/kernel/sched/core.c b/kernel/sched/core.c | ||
20 | index e8b3350..59c7367 100644 | ||
21 | --- a/kernel/sched/core.c | ||
22 | +++ b/kernel/sched/core.c | ||
23 | @@ -2753,6 +2753,8 @@ void scheduler_tick(void) | ||
24 | } | ||
25 | |||
26 | #ifdef CONFIG_NO_HZ_FULL | ||
27 | +static u32 sched_tick_max_deferment = HZ; | ||
28 | + | ||
29 | /** | ||
30 | * scheduler_tick_max_deferment | ||
31 | * | ||
32 | @@ -2769,13 +2771,25 @@ u64 scheduler_tick_max_deferment(void) | ||
33 | struct rq *rq = this_rq(); | ||
34 | unsigned long next, now = ACCESS_ONCE(jiffies); | ||
35 | |||
36 | - next = rq->last_sched_tick + HZ; | ||
37 | + if (sched_tick_max_deferment == -1) | ||
38 | + return KTIME_MAX; | ||
39 | + | ||
40 | + next = rq->last_sched_tick + sched_tick_max_deferment; | ||
41 | |||
42 | if (time_before_eq(next, now)) | ||
43 | return 0; | ||
44 | |||
45 | return jiffies_to_usecs(next - now) * NSEC_PER_USEC; | ||
46 | } | ||
47 | + | ||
48 | +static __init int sched_nohz_full_init_debug(void) | ||
49 | +{ | ||
50 | + debugfs_create_u32("sched_tick_max_deferment", 0644, NULL, | ||
51 | + &sched_tick_max_deferment); | ||
52 | + | ||
53 | + return 0; | ||
54 | +} | ||
55 | +late_initcall(sched_nohz_full_init_debug); | ||
56 | #endif | ||
57 | |||
58 | notrace unsigned long get_parent_ip(unsigned long addr) | ||
59 | -- | ||
60 | 1.7.10.4 | ||
61 | |||
diff --git a/recipes-kernel/linux/linux-keystone_3.10.bbappend b/recipes-kernel/linux/linux-keystone_3.10.bbappend new file mode 100644 index 0000000..b7f72dc --- /dev/null +++ b/recipes-kernel/linux/linux-keystone_3.10.bbappend | |||
@@ -0,0 +1,12 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
2 | |||
3 | SRC_URI += "\ | ||
4 | file://cfg/00039-nohz.cfg \ | ||
5 | file://patches/sched-nohz-add-debugfs-control-over-sched_tick_max_d.patch \ | ||
6 | file://patches/sched-nohz-Fix-overflow-error-in-scheduler_tick_max_.patch \ | ||
7 | file://patches/nohz-Drop-generic-vtime-obsolete-dependency-on-CONFI.patch \ | ||
8 | " | ||
9 | |||
10 | KERNEL_FEATURES += " \ | ||
11 | cfg/00039-nohz \ | ||
12 | " | ||
diff --git a/recipes-kernel/linux/linux-yocto_3.10.bbappend b/recipes-kernel/linux/linux-yocto_3.10.bbappend new file mode 100644 index 0000000..c7365b1 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto_3.10.bbappend | |||
@@ -0,0 +1,9 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
2 | |||
3 | SRC_URI += "\ | ||
4 | file://cfg/00038-hotplug_cpu.cfg \ | ||
5 | file://cfg/00039-nohz.cfg \ | ||
6 | file://patches/sched-nohz-add-debugfs-control-over-sched_tick_max_d.patch \ | ||
7 | file://patches/sched-nohz-Fix-overflow-error-in-scheduler_tick_max_.patch \ | ||
8 | file://patches/nohz-Drop-generic-vtime-obsolete-dependency-on-CONFI.patch \ | ||
9 | " | ||