diff options
author | Adrian Calianu <adrian.calianu@enea.com> | 2021-05-11 09:42:24 +0200 |
---|---|---|
committer | Adrian Calianu <Adrian.Calianu@enea.com> | 2021-05-12 21:56:14 +0100 |
commit | c6e89e8a31eeeb82c5711cba8235e7e55d9be6a8 (patch) | |
tree | 93a3d96c027a437fc9b168d07ab2ad62248d77d1 | |
parent | 7a93e54032bb148a92e16b59736a1b76fedae319 (diff) | |
download | enea-kernel-cache-c6e89e8a31eeeb82c5711cba8235e7e55d9be6a8.tar.gz |
boot_time_opt: update patches to 5.10 kernel
Patches used in boot time optimization are coming from
clearlinux distribution. Update patches correspuding to 5.10
kernel: https://github.com/clearlinux-pkgs/linux/tree/5.10.32-1034
We selected a list of patches from ClearLinux. Those we have
considered risky, unknown impact on functionality have been
avoided.
Change-Id: If01459292a5a383b49944645bd8536d9a62d9de3
Signed-off-by: Adrian Calianu <adrian.calianu@enea.com>
37 files changed, 547 insertions, 1666 deletions
diff --git a/patches/boot_time_opt/0101-i8042-decrease-debug-message-level-to-info.patch b/patches/boot_time_opt/0101-i8042-decrease-debug-message-level-to-info.patch index 4c1eb69..1f0635e 100644 --- a/patches/boot_time_opt/0101-i8042-decrease-debug-message-level-to-info.patch +++ b/patches/boot_time_opt/0101-i8042-decrease-debug-message-level-to-info.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 4139c54430520b0afbcedf5306d62ae49e285688 Mon Sep 17 00:00:00 2001 | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Arjan van de Ven <arjan@linux.intel.com> | 2 | From: Arjan van de Ven <arjan@linux.intel.com> |
3 | Date: Tue, 23 Jun 2015 01:26:52 -0500 | 3 | Date: Tue, 23 Jun 2015 01:26:52 -0500 |
4 | Subject: [PATCH 101/126] i8042: decrease debug message level to info | 4 | Subject: [PATCH] i8042: decrease debug message level to info |
5 | 5 | ||
6 | Author: Arjan van de Ven <arjan@linux.intel.com> | 6 | Author: Arjan van de Ven <arjan@linux.intel.com> |
7 | 7 | ||
@@ -12,10 +12,10 @@ Signed-off-by: Jose Carlos Venegas Munoz <jos.c.venegas.munoz@intel.com> | |||
12 | 1 file changed, 5 insertions(+), 5 deletions(-) | 12 | 1 file changed, 5 insertions(+), 5 deletions(-) |
13 | 13 | ||
14 | diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c | 14 | diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c |
15 | index 824f4c1c1f31..a8cd9072481c 100644 | 15 | index abae23af0791..f8617c1b242e 100644 |
16 | --- a/drivers/input/serio/i8042.c | 16 | --- a/drivers/input/serio/i8042.c |
17 | +++ b/drivers/input/serio/i8042.c | 17 | +++ b/drivers/input/serio/i8042.c |
18 | @@ -601,7 +601,7 @@ static int i8042_enable_kbd_port(void) | 18 | @@ -617,7 +617,7 @@ static int i8042_enable_kbd_port(void) |
19 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { | 19 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { |
20 | i8042_ctr &= ~I8042_CTR_KBDINT; | 20 | i8042_ctr &= ~I8042_CTR_KBDINT; |
21 | i8042_ctr |= I8042_CTR_KBDDIS; | 21 | i8042_ctr |= I8042_CTR_KBDDIS; |
@@ -24,7 +24,7 @@ index 824f4c1c1f31..a8cd9072481c 100644 | |||
24 | return -EIO; | 24 | return -EIO; |
25 | } | 25 | } |
26 | 26 | ||
27 | @@ -620,7 +620,7 @@ static int i8042_enable_aux_port(void) | 27 | @@ -636,7 +636,7 @@ static int i8042_enable_aux_port(void) |
28 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { | 28 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { |
29 | i8042_ctr &= ~I8042_CTR_AUXINT; | 29 | i8042_ctr &= ~I8042_CTR_AUXINT; |
30 | i8042_ctr |= I8042_CTR_AUXDIS; | 30 | i8042_ctr |= I8042_CTR_AUXDIS; |
@@ -33,7 +33,7 @@ index 824f4c1c1f31..a8cd9072481c 100644 | |||
33 | return -EIO; | 33 | return -EIO; |
34 | } | 34 | } |
35 | 35 | ||
36 | @@ -712,7 +712,7 @@ static int __init i8042_check_mux(void) | 36 | @@ -728,7 +728,7 @@ static int __init i8042_check_mux(void) |
37 | i8042_ctr &= ~I8042_CTR_AUXINT; | 37 | i8042_ctr &= ~I8042_CTR_AUXINT; |
38 | 38 | ||
39 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { | 39 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { |
@@ -42,7 +42,7 @@ index 824f4c1c1f31..a8cd9072481c 100644 | |||
42 | return -EIO; | 42 | return -EIO; |
43 | } | 43 | } |
44 | 44 | ||
45 | @@ -935,7 +935,7 @@ static int i8042_controller_selftest(void) | 45 | @@ -951,7 +951,7 @@ static int i8042_controller_selftest(void) |
46 | do { | 46 | do { |
47 | 47 | ||
48 | if (i8042_command(¶m, I8042_CMD_CTL_TEST)) { | 48 | if (i8042_command(¶m, I8042_CMD_CTL_TEST)) { |
@@ -51,7 +51,7 @@ index 824f4c1c1f31..a8cd9072481c 100644 | |||
51 | return -ENODEV; | 51 | return -ENODEV; |
52 | } | 52 | } |
53 | 53 | ||
54 | @@ -957,7 +957,7 @@ static int i8042_controller_selftest(void) | 54 | @@ -973,7 +973,7 @@ static int i8042_controller_selftest(void) |
55 | pr_info("giving up on controller selftest, continuing anyway...\n"); | 55 | pr_info("giving up on controller selftest, continuing anyway...\n"); |
56 | return 0; | 56 | return 0; |
57 | #else | 57 | #else |
@@ -61,5 +61,5 @@ index 824f4c1c1f31..a8cd9072481c 100644 | |||
61 | #endif | 61 | #endif |
62 | } | 62 | } |
63 | -- | 63 | -- |
64 | 2.15.0 | 64 | https://clearlinux.org |
65 | 65 | ||
diff --git a/patches/boot_time_opt/0103-Increase-the-ext4-default-commit-age.patch b/patches/boot_time_opt/0102-increase-the-ext4-default-commit-age.patch index bcfddee..21f0c5a 100644 --- a/patches/boot_time_opt/0103-Increase-the-ext4-default-commit-age.patch +++ b/patches/boot_time_opt/0102-increase-the-ext4-default-commit-age.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From d098532daf5eead493d71f9756f8905a18f01e04 Mon Sep 17 00:00:00 2001 | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Arjan van de Ven <arjan@linux.intel.com> | 2 | From: Arjan van de Ven <arjan@linux.intel.com> |
3 | Date: Mon, 11 Jan 2016 10:01:44 -0600 | 3 | Date: Mon, 11 Jan 2016 10:01:44 -0600 |
4 | Subject: [PATCH 103/126] Increase the ext4 default commit age | 4 | Subject: [PATCH] increase the ext4 default commit age |
5 | 5 | ||
6 | Both the VM and EXT4 have a "commit to disk after X seconds" time. | 6 | Both the VM and EXT4 have a "commit to disk after X seconds" time. |
7 | Currently the EXT4 time is shorter than our VM time, which is a bit | 7 | Currently the EXT4 time is shorter than our VM time, which is a bit |
@@ -18,10 +18,10 @@ Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com> | |||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | 18 | 1 file changed, 1 insertion(+), 1 deletion(-) |
19 | 19 | ||
20 | diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h | 20 | diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h |
21 | index 606b6bce3a5b..5dd7d54c40c2 100644 | 21 | index 578ff196b3ce..e8db44307150 100644 |
22 | --- a/include/linux/jbd2.h | 22 | --- a/include/linux/jbd2.h |
23 | +++ b/include/linux/jbd2.h | 23 | +++ b/include/linux/jbd2.h |
24 | @@ -47,7 +47,7 @@ | 24 | @@ -45,7 +45,7 @@ |
25 | /* | 25 | /* |
26 | * The default maximum commit age, in seconds. | 26 | * The default maximum commit age, in seconds. |
27 | */ | 27 | */ |
@@ -31,5 +31,5 @@ index 606b6bce3a5b..5dd7d54c40c2 100644 | |||
31 | #ifdef CONFIG_JBD2_DEBUG | 31 | #ifdef CONFIG_JBD2_DEBUG |
32 | /* | 32 | /* |
33 | -- | 33 | -- |
34 | 2.15.0 | 34 | https://clearlinux.org |
35 | 35 | ||
diff --git a/patches/boot_time_opt/0103-silence-rapl.patch b/patches/boot_time_opt/0103-silence-rapl.patch new file mode 100644 index 0000000..3dae206 --- /dev/null +++ b/patches/boot_time_opt/0103-silence-rapl.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Mon, 14 Mar 2016 11:22:09 -0600 | ||
4 | Subject: [PATCH] silence rapl | ||
5 | |||
6 | --- | ||
7 | drivers/powercap/intel_rapl_common.c | 2 +- | ||
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/drivers/powercap/intel_rapl_common.c b/drivers/powercap/intel_rapl_common.c | ||
11 | index 70d6d52bc1e2..8f49575319b5 100644 | ||
12 | --- a/drivers/powercap/intel_rapl_common.c | ||
13 | +++ b/drivers/powercap/intel_rapl_common.c | ||
14 | @@ -1446,7 +1446,7 @@ static int __init rapl_init(void) | ||
15 | |||
16 | id = x86_match_cpu(rapl_ids); | ||
17 | if (!id) { | ||
18 | - pr_err("driver does not support CPU family %d model %d\n", | ||
19 | + pr_info("driver does not support CPU family %d model %d\n", | ||
20 | boot_cpu_data.x86, boot_cpu_data.x86_model); | ||
21 | |||
22 | return -ENODEV; | ||
23 | -- | ||
24 | https://clearlinux.org | ||
25 | |||
diff --git a/patches/boot_time_opt/0104-pci-pme-wakeups.patch b/patches/boot_time_opt/0104-pci-pme-wakeups.patch new file mode 100644 index 0000000..fbb4a3d --- /dev/null +++ b/patches/boot_time_opt/0104-pci-pme-wakeups.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Mon, 14 Mar 2016 11:10:58 -0600 | ||
4 | Subject: [PATCH] pci pme wakeups | ||
5 | |||
6 | Reduce wakeups for PME checks, which are a workaround for miswired | ||
7 | boards (sadly, too many of them) in laptops. | ||
8 | --- | ||
9 | drivers/pci/pci.c | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c | ||
13 | index 9e971fffeb6a..341054cad201 100644 | ||
14 | --- a/drivers/pci/pci.c | ||
15 | +++ b/drivers/pci/pci.c | ||
16 | @@ -59,7 +59,7 @@ struct pci_pme_device { | ||
17 | struct pci_dev *dev; | ||
18 | }; | ||
19 | |||
20 | -#define PME_TIMEOUT 1000 /* How long between PME checks */ | ||
21 | +#define PME_TIMEOUT 4000 /* How long between PME checks */ | ||
22 | |||
23 | static void pci_dev_d3_sleep(struct pci_dev *dev) | ||
24 | { | ||
25 | -- | ||
26 | https://clearlinux.org | ||
27 | |||
diff --git a/patches/boot_time_opt/0104-silence-rapl.patch b/patches/boot_time_opt/0104-silence-rapl.patch deleted file mode 100644 index f29851c..0000000 --- a/patches/boot_time_opt/0104-silence-rapl.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | From be0a2929159c1b588f2a038df612a5d1437d94a8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Mon, 14 Mar 2016 11:22:09 -0600 | ||
4 | Subject: [PATCH 104/126] silence rapl | ||
5 | |||
6 | --- | ||
7 | drivers/powercap/intel_rapl.c | 2 +- | ||
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c | ||
11 | index d1694f1def72..6be610452765 100644 | ||
12 | --- a/drivers/powercap/intel_rapl.c | ||
13 | +++ b/drivers/powercap/intel_rapl.c | ||
14 | @@ -1540,7 +1540,7 @@ static int __init rapl_init(void) | ||
15 | |||
16 | id = x86_match_cpu(rapl_ids); | ||
17 | if (!id) { | ||
18 | - pr_err("driver does not support CPU family %d model %d\n", | ||
19 | + pr_info("driver does not support CPU family %d model %d\n", | ||
20 | boot_cpu_data.x86, boot_cpu_data.x86_model); | ||
21 | |||
22 | return -ENODEV; | ||
23 | -- | ||
24 | 2.15.0 | ||
25 | |||
diff --git a/patches/boot_time_opt/0105-ksm-wakeups.patch b/patches/boot_time_opt/0105-ksm-wakeups.patch new file mode 100644 index 0000000..201ecd0 --- /dev/null +++ b/patches/boot_time_opt/0105-ksm-wakeups.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Mon, 6 May 2019 12:57:09 -0500 | ||
4 | Subject: [PATCH] ksm-wakeups | ||
5 | |||
6 | reduce wakeups in ksm by adding rounding (aligning) when | ||
7 | the sleep times are 1 second or longer | ||
8 | |||
9 | Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> | ||
10 | --- | ||
11 | kernel/watchdog.c | 2 +- | ||
12 | mm/ksm.c | 11 ++++++++--- | ||
13 | 2 files changed, 9 insertions(+), 4 deletions(-) | ||
14 | |||
15 | diff --git a/kernel/watchdog.c b/kernel/watchdog.c | ||
16 | index 71109065bd8e..44ae1e267d48 100644 | ||
17 | --- a/kernel/watchdog.c | ||
18 | +++ b/kernel/watchdog.c | ||
19 | @@ -41,7 +41,7 @@ unsigned long __read_mostly watchdog_enabled; | ||
20 | int __read_mostly watchdog_user_enabled = 1; | ||
21 | int __read_mostly nmi_watchdog_user_enabled = NMI_WATCHDOG_DEFAULT; | ||
22 | int __read_mostly soft_watchdog_user_enabled = 1; | ||
23 | -int __read_mostly watchdog_thresh = 10; | ||
24 | +int __read_mostly watchdog_thresh = 40; | ||
25 | static int __read_mostly nmi_watchdog_available; | ||
26 | |||
27 | struct cpumask watchdog_cpumask __read_mostly; | ||
28 | diff --git a/mm/ksm.c b/mm/ksm.c | ||
29 | index 0960750bb316..3c51c716b8c5 100644 | ||
30 | --- a/mm/ksm.c | ||
31 | +++ b/mm/ksm.c | ||
32 | @@ -2423,9 +2423,14 @@ static int ksm_scan_thread(void *nothing) | ||
33 | |||
34 | if (ksmd_should_run()) { | ||
35 | sleep_ms = READ_ONCE(ksm_thread_sleep_millisecs); | ||
36 | - wait_event_interruptible_timeout(ksm_iter_wait, | ||
37 | - sleep_ms != READ_ONCE(ksm_thread_sleep_millisecs), | ||
38 | - msecs_to_jiffies(sleep_ms)); | ||
39 | + if (sleep_ms >= 1000) | ||
40 | + wait_event_interruptible_timeout(ksm_iter_wait, | ||
41 | + sleep_ms != READ_ONCE(ksm_thread_sleep_millisecs), | ||
42 | + msecs_to_jiffies(round_jiffies_relative(sleep_ms))); | ||
43 | + else | ||
44 | + wait_event_interruptible_timeout(ksm_iter_wait, | ||
45 | + sleep_ms != READ_ONCE(ksm_thread_sleep_millisecs), | ||
46 | + msecs_to_jiffies(sleep_ms)); | ||
47 | } else { | ||
48 | wait_event_freezable(ksm_thread_wait, | ||
49 | ksmd_should_run() || kthread_should_stop()); | ||
50 | -- | ||
51 | https://clearlinux.org | ||
52 | |||
diff --git a/patches/boot_time_opt/0105-pci-pme-wakeups.patch b/patches/boot_time_opt/0105-pci-pme-wakeups.patch deleted file mode 100644 index 5bb76ad..0000000 --- a/patches/boot_time_opt/0105-pci-pme-wakeups.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | From 1dc7a20946596b24f669fe038a1ae31a28cf59a5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Mon, 14 Mar 2016 11:10:58 -0600 | ||
4 | Subject: [PATCH 105/126] pci pme wakeups | ||
5 | |||
6 | Reduce wakeups for PME checks, which are a workaround for miswired | ||
7 | boards (sadly, too many of them) in laptops. | ||
8 | --- | ||
9 | drivers/misc/vmw_balloon.c | 2 +- | ||
10 | drivers/pci/pci.c | 2 +- | ||
11 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c | ||
14 | index 1e688bfec567..e0a4f3eb0d8e 100644 | ||
15 | --- a/drivers/misc/vmw_balloon.c | ||
16 | +++ b/drivers/misc/vmw_balloon.c | ||
17 | @@ -1142,7 +1142,7 @@ static void vmballoon_work(struct work_struct *work) | ||
18 | * stopped while the system transitions to/from sleep/hibernation. | ||
19 | */ | ||
20 | queue_delayed_work(system_freezable_wq, | ||
21 | - dwork, round_jiffies_relative(HZ)); | ||
22 | + dwork, round_jiffies_relative(10*HZ)); | ||
23 | } | ||
24 | |||
25 | /* | ||
26 | diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c | ||
27 | index 6078dfc11b11..44f61288d508 100644 | ||
28 | --- a/drivers/pci/pci.c | ||
29 | +++ b/drivers/pci/pci.c | ||
30 | @@ -58,7 +58,7 @@ struct pci_pme_device { | ||
31 | struct pci_dev *dev; | ||
32 | }; | ||
33 | |||
34 | -#define PME_TIMEOUT 1000 /* How long between PME checks */ | ||
35 | +#define PME_TIMEOUT 4000 /* How long between PME checks */ | ||
36 | |||
37 | static void pci_dev_d3_sleep(struct pci_dev *dev) | ||
38 | { | ||
39 | -- | ||
40 | 2.15.0 | ||
41 | |||
diff --git a/patches/boot_time_opt/0107-intel_idle-tweak-cpuidle-cstates.patch b/patches/boot_time_opt/0106-intel_idle-tweak-cpuidle-cstates.patch index 43c40cd..b147236 100644 --- a/patches/boot_time_opt/0107-intel_idle-tweak-cpuidle-cstates.patch +++ b/patches/boot_time_opt/0106-intel_idle-tweak-cpuidle-cstates.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 790db86f51a23533d457b361bb61e2845b6de6b8 Mon Sep 17 00:00:00 2001 | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Arjan van de Ven <arjan@linux.intel.com> | 2 | From: Arjan van de Ven <arjan@linux.intel.com> |
3 | Date: Sat, 19 Mar 2016 21:32:19 -0400 | 3 | Date: Sat, 19 Mar 2016 21:32:19 -0400 |
4 | Subject: [PATCH 107/126] intel_idle: tweak cpuidle cstates | 4 | Subject: [PATCH] intel_idle: tweak cpuidle cstates |
5 | 5 | ||
6 | Increase target_residency in cpuidle cstate | 6 | Increase target_residency in cpuidle cstate |
7 | 7 | ||
@@ -10,86 +10,86 @@ Clear linux is cleaner in hygiene (wakupes) than the average linux, | |||
10 | so we can afford changing these in a way that increases | 10 | so we can afford changing these in a way that increases |
11 | performance while keeping power efficiency | 11 | performance while keeping power efficiency |
12 | --- | 12 | --- |
13 | drivers/idle/intel_idle.c | 46 +++++++++++++++++++++++----------------------- | 13 | drivers/idle/intel_idle.c | 44 +++++++++++++++++++-------------------- |
14 | 1 file changed, 23 insertions(+), 23 deletions(-) | 14 | 1 file changed, 22 insertions(+), 22 deletions(-) |
15 | 15 | ||
16 | diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c | 16 | diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c |
17 | index f0b06b14e782..24609fbb1010 100644 | 17 | index d79335506ecd..3154cebef986 100644 |
18 | --- a/drivers/idle/intel_idle.c | 18 | --- a/drivers/idle/intel_idle.c |
19 | +++ b/drivers/idle/intel_idle.c | 19 | +++ b/drivers/idle/intel_idle.c |
20 | @@ -466,7 +466,7 @@ static struct cpuidle_state hsw_cstates[] = { | 20 | @@ -502,7 +502,7 @@ static struct cpuidle_state hsw_cstates[] __initdata = { |
21 | .desc = "MWAIT 0x01", | 21 | .desc = "MWAIT 0x01", |
22 | .flags = MWAIT2flg(0x01), | 22 | .flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE, |
23 | .exit_latency = 10, | 23 | .exit_latency = 10, |
24 | - .target_residency = 20, | 24 | - .target_residency = 20, |
25 | + .target_residency = 120, | 25 | + .target_residency = 120, |
26 | .enter = &intel_idle, | 26 | .enter = &intel_idle, |
27 | .enter_s2idle = intel_idle_s2idle, }, | 27 | .enter_s2idle = intel_idle_s2idle, }, |
28 | { | 28 | { |
29 | @@ -474,7 +474,7 @@ static struct cpuidle_state hsw_cstates[] = { | 29 | @@ -510,7 +510,7 @@ static struct cpuidle_state hsw_cstates[] __initdata = { |
30 | .desc = "MWAIT 0x10", | 30 | .desc = "MWAIT 0x10", |
31 | .flags = MWAIT2flg(0x10) | CPUIDLE_FLAG_TLB_FLUSHED, | 31 | .flags = MWAIT2flg(0x10) | CPUIDLE_FLAG_TLB_FLUSHED, |
32 | .exit_latency = 33, | 32 | .exit_latency = 33, |
33 | - .target_residency = 100, | 33 | - .target_residency = 100, |
34 | + .target_residency = 1000, | 34 | + .target_residency = 900, |
35 | .enter = &intel_idle, | 35 | .enter = &intel_idle, |
36 | .enter_s2idle = intel_idle_s2idle, }, | 36 | .enter_s2idle = intel_idle_s2idle, }, |
37 | { | 37 | { |
38 | @@ -482,7 +482,7 @@ static struct cpuidle_state hsw_cstates[] = { | 38 | @@ -518,7 +518,7 @@ static struct cpuidle_state hsw_cstates[] __initdata = { |
39 | .desc = "MWAIT 0x20", | 39 | .desc = "MWAIT 0x20", |
40 | .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED, | 40 | .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED, |
41 | .exit_latency = 133, | 41 | .exit_latency = 133, |
42 | - .target_residency = 400, | 42 | - .target_residency = 400, |
43 | + .target_residency = 4000, | 43 | + .target_residency = 1000, |
44 | .enter = &intel_idle, | 44 | .enter = &intel_idle, |
45 | .enter_s2idle = intel_idle_s2idle, }, | 45 | .enter_s2idle = intel_idle_s2idle, }, |
46 | { | 46 | { |
47 | @@ -490,7 +490,7 @@ static struct cpuidle_state hsw_cstates[] = { | 47 | @@ -526,7 +526,7 @@ static struct cpuidle_state hsw_cstates[] __initdata = { |
48 | .desc = "MWAIT 0x32", | 48 | .desc = "MWAIT 0x32", |
49 | .flags = MWAIT2flg(0x32) | CPUIDLE_FLAG_TLB_FLUSHED, | 49 | .flags = MWAIT2flg(0x32) | CPUIDLE_FLAG_TLB_FLUSHED, |
50 | .exit_latency = 166, | 50 | .exit_latency = 166, |
51 | - .target_residency = 500, | 51 | - .target_residency = 500, |
52 | + .target_residency = 5000, | 52 | + .target_residency = 1500, |
53 | .enter = &intel_idle, | 53 | .enter = &intel_idle, |
54 | .enter_s2idle = intel_idle_s2idle, }, | 54 | .enter_s2idle = intel_idle_s2idle, }, |
55 | { | 55 | { |
56 | @@ -498,7 +498,7 @@ static struct cpuidle_state hsw_cstates[] = { | 56 | @@ -534,7 +534,7 @@ static struct cpuidle_state hsw_cstates[] __initdata = { |
57 | .desc = "MWAIT 0x40", | 57 | .desc = "MWAIT 0x40", |
58 | .flags = MWAIT2flg(0x40) | CPUIDLE_FLAG_TLB_FLUSHED, | 58 | .flags = MWAIT2flg(0x40) | CPUIDLE_FLAG_TLB_FLUSHED, |
59 | .exit_latency = 300, | 59 | .exit_latency = 300, |
60 | - .target_residency = 900, | 60 | - .target_residency = 900, |
61 | + .target_residency = 9000, | 61 | + .target_residency = 2000, |
62 | .enter = &intel_idle, | 62 | .enter = &intel_idle, |
63 | .enter_s2idle = intel_idle_s2idle, }, | 63 | .enter_s2idle = intel_idle_s2idle, }, |
64 | { | 64 | { |
65 | @@ -506,7 +506,7 @@ static struct cpuidle_state hsw_cstates[] = { | 65 | @@ -542,7 +542,7 @@ static struct cpuidle_state hsw_cstates[] __initdata = { |
66 | .desc = "MWAIT 0x50", | 66 | .desc = "MWAIT 0x50", |
67 | .flags = MWAIT2flg(0x50) | CPUIDLE_FLAG_TLB_FLUSHED, | 67 | .flags = MWAIT2flg(0x50) | CPUIDLE_FLAG_TLB_FLUSHED, |
68 | .exit_latency = 600, | 68 | .exit_latency = 600, |
69 | - .target_residency = 1800, | 69 | - .target_residency = 1800, |
70 | + .target_residency = 18000, | 70 | + .target_residency = 5000, |
71 | .enter = &intel_idle, | 71 | .enter = &intel_idle, |
72 | .enter_s2idle = intel_idle_s2idle, }, | 72 | .enter_s2idle = intel_idle_s2idle, }, |
73 | { | 73 | { |
74 | @@ -514,7 +514,7 @@ static struct cpuidle_state hsw_cstates[] = { | 74 | @@ -550,7 +550,7 @@ static struct cpuidle_state hsw_cstates[] __initdata = { |
75 | .desc = "MWAIT 0x60", | 75 | .desc = "MWAIT 0x60", |
76 | .flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED, | 76 | .flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED, |
77 | .exit_latency = 2600, | 77 | .exit_latency = 2600, |
78 | - .target_residency = 7700, | 78 | - .target_residency = 7700, |
79 | + .target_residency = 77000, | 79 | + .target_residency = 9000, |
80 | .enter = &intel_idle, | 80 | .enter = &intel_idle, |
81 | .enter_s2idle = intel_idle_s2idle, }, | 81 | .enter_s2idle = intel_idle_s2idle, }, |
82 | { | 82 | { |
83 | @@ -534,7 +534,7 @@ static struct cpuidle_state bdw_cstates[] = { | 83 | @@ -570,7 +570,7 @@ static struct cpuidle_state bdw_cstates[] __initdata = { |
84 | .desc = "MWAIT 0x01", | 84 | .desc = "MWAIT 0x01", |
85 | .flags = MWAIT2flg(0x01), | 85 | .flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE, |
86 | .exit_latency = 10, | 86 | .exit_latency = 10, |
87 | - .target_residency = 20, | 87 | - .target_residency = 20, |
88 | + .target_residency = 120, | 88 | + .target_residency = 120, |
89 | .enter = &intel_idle, | 89 | .enter = &intel_idle, |
90 | .enter_s2idle = intel_idle_s2idle, }, | 90 | .enter_s2idle = intel_idle_s2idle, }, |
91 | { | 91 | { |
92 | @@ -542,7 +542,7 @@ static struct cpuidle_state bdw_cstates[] = { | 92 | @@ -578,7 +578,7 @@ static struct cpuidle_state bdw_cstates[] __initdata = { |
93 | .desc = "MWAIT 0x10", | 93 | .desc = "MWAIT 0x10", |
94 | .flags = MWAIT2flg(0x10) | CPUIDLE_FLAG_TLB_FLUSHED, | 94 | .flags = MWAIT2flg(0x10) | CPUIDLE_FLAG_TLB_FLUSHED, |
95 | .exit_latency = 40, | 95 | .exit_latency = 40, |
@@ -98,61 +98,61 @@ index f0b06b14e782..24609fbb1010 100644 | |||
98 | .enter = &intel_idle, | 98 | .enter = &intel_idle, |
99 | .enter_s2idle = intel_idle_s2idle, }, | 99 | .enter_s2idle = intel_idle_s2idle, }, |
100 | { | 100 | { |
101 | @@ -550,7 +550,7 @@ static struct cpuidle_state bdw_cstates[] = { | 101 | @@ -586,7 +586,7 @@ static struct cpuidle_state bdw_cstates[] __initdata = { |
102 | .desc = "MWAIT 0x20", | 102 | .desc = "MWAIT 0x20", |
103 | .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED, | 103 | .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED, |
104 | .exit_latency = 133, | 104 | .exit_latency = 133, |
105 | - .target_residency = 400, | 105 | - .target_residency = 400, |
106 | + .target_residency = 4000, | 106 | + .target_residency = 1000, |
107 | .enter = &intel_idle, | 107 | .enter = &intel_idle, |
108 | .enter_s2idle = intel_idle_s2idle, }, | 108 | .enter_s2idle = intel_idle_s2idle, }, |
109 | { | 109 | { |
110 | @@ -558,7 +558,7 @@ static struct cpuidle_state bdw_cstates[] = { | 110 | @@ -594,7 +594,7 @@ static struct cpuidle_state bdw_cstates[] __initdata = { |
111 | .desc = "MWAIT 0x32", | 111 | .desc = "MWAIT 0x32", |
112 | .flags = MWAIT2flg(0x32) | CPUIDLE_FLAG_TLB_FLUSHED, | 112 | .flags = MWAIT2flg(0x32) | CPUIDLE_FLAG_TLB_FLUSHED, |
113 | .exit_latency = 166, | 113 | .exit_latency = 166, |
114 | - .target_residency = 500, | 114 | - .target_residency = 500, |
115 | + .target_residency = 5000, | 115 | + .target_residency = 2000, |
116 | .enter = &intel_idle, | 116 | .enter = &intel_idle, |
117 | .enter_s2idle = intel_idle_s2idle, }, | 117 | .enter_s2idle = intel_idle_s2idle, }, |
118 | { | 118 | { |
119 | @@ -566,7 +566,7 @@ static struct cpuidle_state bdw_cstates[] = { | 119 | @@ -602,7 +602,7 @@ static struct cpuidle_state bdw_cstates[] __initdata = { |
120 | .desc = "MWAIT 0x40", | 120 | .desc = "MWAIT 0x40", |
121 | .flags = MWAIT2flg(0x40) | CPUIDLE_FLAG_TLB_FLUSHED, | 121 | .flags = MWAIT2flg(0x40) | CPUIDLE_FLAG_TLB_FLUSHED, |
122 | .exit_latency = 300, | 122 | .exit_latency = 300, |
123 | - .target_residency = 900, | 123 | - .target_residency = 900, |
124 | + .target_residency = 9000, | 124 | + .target_residency = 4000, |
125 | .enter = &intel_idle, | 125 | .enter = &intel_idle, |
126 | .enter_s2idle = intel_idle_s2idle, }, | 126 | .enter_s2idle = intel_idle_s2idle, }, |
127 | { | 127 | { |
128 | @@ -574,7 +574,7 @@ static struct cpuidle_state bdw_cstates[] = { | 128 | @@ -610,7 +610,7 @@ static struct cpuidle_state bdw_cstates[] __initdata = { |
129 | .desc = "MWAIT 0x50", | 129 | .desc = "MWAIT 0x50", |
130 | .flags = MWAIT2flg(0x50) | CPUIDLE_FLAG_TLB_FLUSHED, | 130 | .flags = MWAIT2flg(0x50) | CPUIDLE_FLAG_TLB_FLUSHED, |
131 | .exit_latency = 600, | 131 | .exit_latency = 600, |
132 | - .target_residency = 1800, | 132 | - .target_residency = 1800, |
133 | + .target_residency = 18000, | 133 | + .target_residency = 7000, |
134 | .enter = &intel_idle, | 134 | .enter = &intel_idle, |
135 | .enter_s2idle = intel_idle_s2idle, }, | 135 | .enter_s2idle = intel_idle_s2idle, }, |
136 | { | 136 | { |
137 | @@ -582,7 +582,7 @@ static struct cpuidle_state bdw_cstates[] = { | 137 | @@ -618,7 +618,7 @@ static struct cpuidle_state bdw_cstates[] __initdata = { |
138 | .desc = "MWAIT 0x60", | 138 | .desc = "MWAIT 0x60", |
139 | .flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED, | 139 | .flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED, |
140 | .exit_latency = 2600, | 140 | .exit_latency = 2600, |
141 | - .target_residency = 7700, | 141 | - .target_residency = 7700, |
142 | + .target_residency = 77000, | 142 | + .target_residency = 9000, |
143 | .enter = &intel_idle, | 143 | .enter = &intel_idle, |
144 | .enter_s2idle = intel_idle_s2idle, }, | 144 | .enter_s2idle = intel_idle_s2idle, }, |
145 | { | 145 | { |
146 | @@ -603,7 +603,7 @@ static struct cpuidle_state skl_cstates[] = { | 146 | @@ -639,7 +639,7 @@ static struct cpuidle_state skl_cstates[] __initdata = { |
147 | .desc = "MWAIT 0x01", | 147 | .desc = "MWAIT 0x01", |
148 | .flags = MWAIT2flg(0x01), | 148 | .flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE, |
149 | .exit_latency = 10, | 149 | .exit_latency = 10, |
150 | - .target_residency = 20, | 150 | - .target_residency = 20, |
151 | + .target_residency = 120, | 151 | + .target_residency = 120, |
152 | .enter = &intel_idle, | 152 | .enter = &intel_idle, |
153 | .enter_s2idle = intel_idle_s2idle, }, | 153 | .enter_s2idle = intel_idle_s2idle, }, |
154 | { | 154 | { |
155 | @@ -611,7 +611,7 @@ static struct cpuidle_state skl_cstates[] = { | 155 | @@ -647,7 +647,7 @@ static struct cpuidle_state skl_cstates[] __initdata = { |
156 | .desc = "MWAIT 0x10", | 156 | .desc = "MWAIT 0x10", |
157 | .flags = MWAIT2flg(0x10) | CPUIDLE_FLAG_TLB_FLUSHED, | 157 | .flags = MWAIT2flg(0x10) | CPUIDLE_FLAG_TLB_FLUSHED, |
158 | .exit_latency = 70, | 158 | .exit_latency = 70, |
@@ -161,69 +161,60 @@ index f0b06b14e782..24609fbb1010 100644 | |||
161 | .enter = &intel_idle, | 161 | .enter = &intel_idle, |
162 | .enter_s2idle = intel_idle_s2idle, }, | 162 | .enter_s2idle = intel_idle_s2idle, }, |
163 | { | 163 | { |
164 | @@ -619,7 +619,7 @@ static struct cpuidle_state skl_cstates[] = { | 164 | @@ -655,7 +655,7 @@ static struct cpuidle_state skl_cstates[] __initdata = { |
165 | .desc = "MWAIT 0x20", | 165 | .desc = "MWAIT 0x20", |
166 | .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED, | 166 | .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED, |
167 | .exit_latency = 85, | 167 | .exit_latency = 85, |
168 | - .target_residency = 200, | 168 | - .target_residency = 200, |
169 | + .target_residency = 2000, | 169 | + .target_residency = 600, |
170 | .enter = &intel_idle, | 170 | .enter = &intel_idle, |
171 | .enter_s2idle = intel_idle_s2idle, }, | 171 | .enter_s2idle = intel_idle_s2idle, }, |
172 | { | 172 | { |
173 | @@ -627,7 +627,7 @@ static struct cpuidle_state skl_cstates[] = { | 173 | @@ -663,7 +663,7 @@ static struct cpuidle_state skl_cstates[] __initdata = { |
174 | .desc = "MWAIT 0x33", | 174 | .desc = "MWAIT 0x33", |
175 | .flags = MWAIT2flg(0x33) | CPUIDLE_FLAG_TLB_FLUSHED, | 175 | .flags = MWAIT2flg(0x33) | CPUIDLE_FLAG_TLB_FLUSHED, |
176 | .exit_latency = 124, | 176 | .exit_latency = 124, |
177 | - .target_residency = 800, | 177 | - .target_residency = 800, |
178 | + .target_residency = 8000, | 178 | + .target_residency = 3000, |
179 | .enter = &intel_idle, | 179 | .enter = &intel_idle, |
180 | .enter_s2idle = intel_idle_s2idle, }, | 180 | .enter_s2idle = intel_idle_s2idle, }, |
181 | { | 181 | { |
182 | @@ -635,7 +635,7 @@ static struct cpuidle_state skl_cstates[] = { | 182 | @@ -671,7 +671,7 @@ static struct cpuidle_state skl_cstates[] __initdata = { |
183 | .desc = "MWAIT 0x40", | 183 | .desc = "MWAIT 0x40", |
184 | .flags = MWAIT2flg(0x40) | CPUIDLE_FLAG_TLB_FLUSHED, | 184 | .flags = MWAIT2flg(0x40) | CPUIDLE_FLAG_TLB_FLUSHED, |
185 | .exit_latency = 200, | 185 | .exit_latency = 200, |
186 | - .target_residency = 800, | 186 | - .target_residency = 800, |
187 | + .target_residency = 8000, | 187 | + .target_residency = 3200, |
188 | .enter = &intel_idle, | 188 | .enter = &intel_idle, |
189 | .enter_s2idle = intel_idle_s2idle, }, | 189 | .enter_s2idle = intel_idle_s2idle, }, |
190 | { | 190 | { |
191 | @@ -643,7 +643,7 @@ static struct cpuidle_state skl_cstates[] = { | 191 | @@ -679,7 +679,7 @@ static struct cpuidle_state skl_cstates[] __initdata = { |
192 | .desc = "MWAIT 0x50", | 192 | .desc = "MWAIT 0x50", |
193 | .flags = MWAIT2flg(0x50) | CPUIDLE_FLAG_TLB_FLUSHED, | 193 | .flags = MWAIT2flg(0x50) | CPUIDLE_FLAG_TLB_FLUSHED, |
194 | .exit_latency = 480, | 194 | .exit_latency = 480, |
195 | - .target_residency = 5000, | 195 | - .target_residency = 5000, |
196 | + .target_residency = 50000, | 196 | + .target_residency = 9000, |
197 | .enter = &intel_idle, | 197 | .enter = &intel_idle, |
198 | .enter_s2idle = intel_idle_s2idle, }, | 198 | .enter_s2idle = intel_idle_s2idle, }, |
199 | { | 199 | { |
200 | @@ -651,7 +651,7 @@ static struct cpuidle_state skl_cstates[] = { | 200 | @@ -687,7 +687,7 @@ static struct cpuidle_state skl_cstates[] __initdata = { |
201 | .desc = "MWAIT 0x60", | 201 | .desc = "MWAIT 0x60", |
202 | .flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED, | 202 | .flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED, |
203 | .exit_latency = 890, | 203 | .exit_latency = 890, |
204 | - .target_residency = 5000, | 204 | - .target_residency = 5000, |
205 | + .target_residency = 50000, | 205 | + .target_residency = 9000, |
206 | .enter = &intel_idle, | 206 | .enter = &intel_idle, |
207 | .enter_s2idle = intel_idle_s2idle, }, | 207 | .enter_s2idle = intel_idle_s2idle, }, |
208 | { | 208 | { |
209 | @@ -672,7 +672,7 @@ static struct cpuidle_state skx_cstates[] = { | 209 | @@ -708,7 +708,7 @@ static struct cpuidle_state skx_cstates[] __initdata = { |
210 | .desc = "MWAIT 0x01", | 210 | .desc = "MWAIT 0x01", |
211 | .flags = MWAIT2flg(0x01), | 211 | .flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE, |
212 | .exit_latency = 10, | 212 | .exit_latency = 10, |
213 | - .target_residency = 20, | 213 | - .target_residency = 20, |
214 | + .target_residency = 1000, | 214 | + .target_residency = 300, |
215 | .enter = &intel_idle, | ||
216 | .enter_s2idle = intel_idle_s2idle, }, | ||
217 | { | ||
218 | @@ -680,7 +680,7 @@ static struct cpuidle_state skx_cstates[] = { | ||
219 | .desc = "MWAIT 0x20", | ||
220 | .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED, | ||
221 | .exit_latency = 133, | ||
222 | - .target_residency = 600, | ||
223 | + .target_residency = 20000, | ||
224 | .enter = &intel_idle, | 215 | .enter = &intel_idle, |
225 | .enter_s2idle = intel_idle_s2idle, }, | 216 | .enter_s2idle = intel_idle_s2idle, }, |
226 | { | 217 | { |
227 | -- | 218 | -- |
228 | 2.15.0 | 219 | https://clearlinux.org |
229 | 220 | ||
diff --git a/patches/boot_time_opt/0106-ksm-wakeups.patch b/patches/boot_time_opt/0106-ksm-wakeups.patch deleted file mode 100644 index ad82b93..0000000 --- a/patches/boot_time_opt/0106-ksm-wakeups.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | From 8350ca263ae0f06ae6a40b5e9ba280fb09aff895 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Mon, 14 Mar 2016 11:06:46 -0600 | ||
4 | Subject: [PATCH 106/126] ksm-wakeups | ||
5 | |||
6 | reduce wakeups in ksm by adding rounding (aligning) when the sleep times are 1 second or longer | ||
7 | |||
8 | Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> | ||
9 | --- | ||
10 | mm/ksm.c | 8 ++++++-- | ||
11 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/mm/ksm.c b/mm/ksm.c | ||
14 | index 6cb60f46cce5..883a9441e055 100644 | ||
15 | --- a/mm/ksm.c | ||
16 | +++ b/mm/ksm.c | ||
17 | @@ -2335,8 +2335,12 @@ static int ksm_scan_thread(void *nothing) | ||
18 | try_to_freeze(); | ||
19 | |||
20 | if (ksmd_should_run()) { | ||
21 | - schedule_timeout_interruptible( | ||
22 | - msecs_to_jiffies(ksm_thread_sleep_millisecs)); | ||
23 | + if (ksm_thread_sleep_millisecs >= 1000) | ||
24 | + schedule_timeout_interruptible( | ||
25 | + msecs_to_jiffies(round_jiffies_relative(ksm_thread_sleep_millisecs))); | ||
26 | + else | ||
27 | + schedule_timeout_interruptible( | ||
28 | + msecs_to_jiffies(ksm_thread_sleep_millisecs)); | ||
29 | } else { | ||
30 | wait_event_freezable(ksm_thread_wait, | ||
31 | ksmd_should_run() || kthread_should_stop()); | ||
32 | -- | ||
33 | 2.15.0 | ||
34 | |||
35 | --- linux-4.14/kernel/watchdog.c~ 2017-11-12 18:46:13.000000000 +0000 | ||
36 | +++ linux-4.14/kernel/watchdog.c 2017-11-19 17:34:20.740254694 +0000 | ||
37 | @@ -44,7 +44,7 @@ | ||
38 | int __read_mostly watchdog_user_enabled = 1; | ||
39 | int __read_mostly nmi_watchdog_user_enabled = NMI_WATCHDOG_DEFAULT; | ||
40 | int __read_mostly soft_watchdog_user_enabled = 1; | ||
41 | -int __read_mostly watchdog_thresh = 10; | ||
42 | +int __read_mostly watchdog_thresh = 40; | ||
43 | int __read_mostly nmi_watchdog_available; | ||
44 | |||
45 | struct cpumask watchdog_allowed_mask __read_mostly; | ||
diff --git a/patches/boot_time_opt/0107-bootstats-add-printk-s-to-measure-boot-time-in-more-.patch b/patches/boot_time_opt/0107-bootstats-add-printk-s-to-measure-boot-time-in-more-.patch new file mode 100644 index 0000000..9800aa7 --- /dev/null +++ b/patches/boot_time_opt/0107-bootstats-add-printk-s-to-measure-boot-time-in-more-.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Wed, 11 Feb 2015 16:05:23 -0600 | ||
4 | Subject: [PATCH] bootstats: add printk's to measure boot time in more detail | ||
5 | |||
6 | Few distro-tweaks to add printk's to visualize boot time better | ||
7 | |||
8 | Author: Arjan van de Ven <arjan@linux.intel.com> | ||
9 | |||
10 | Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
11 | --- | ||
12 | arch/x86/kernel/alternative.c | 2 ++ | ||
13 | 1 file changed, 2 insertions(+) | ||
14 | |||
15 | diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c | ||
16 | index 2400ad62f330..899eb4b13696 100644 | ||
17 | --- a/arch/x86/kernel/alternative.c | ||
18 | +++ b/arch/x86/kernel/alternative.c | ||
19 | @@ -723,7 +723,9 @@ void __init alternative_instructions(void) | ||
20 | * patching. | ||
21 | */ | ||
22 | |||
23 | + printk("clr: Applying alternatives\n"); | ||
24 | apply_alternatives(__alt_instructions, __alt_instructions_end); | ||
25 | + printk("clr: Applying alternatives done\n"); | ||
26 | |||
27 | #ifdef CONFIG_SMP | ||
28 | /* Patch to UP if other cpus not imminent. */ | ||
29 | -- | ||
30 | https://clearlinux.org | ||
31 | |||
diff --git a/patches/boot_time_opt/0108-smpboot-reuse-timer-calibration.patch b/patches/boot_time_opt/0108-smpboot-reuse-timer-calibration.patch new file mode 100644 index 0000000..7dd298e --- /dev/null +++ b/patches/boot_time_opt/0108-smpboot-reuse-timer-calibration.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Wed, 11 Feb 2015 17:28:14 -0600 | ||
4 | Subject: [PATCH] smpboot: reuse timer calibration | ||
5 | |||
6 | NO point recalibrating for known-constant tsc ... | ||
7 | saves 200ms+ of boot time. | ||
8 | --- | ||
9 | arch/x86/kernel/tsc.c | 3 +++ | ||
10 | 1 file changed, 3 insertions(+) | ||
11 | |||
12 | diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c | ||
13 | index f70dffc2771f..dfb9f60554af 100644 | ||
14 | --- a/arch/x86/kernel/tsc.c | ||
15 | +++ b/arch/x86/kernel/tsc.c | ||
16 | @@ -1546,6 +1546,9 @@ unsigned long calibrate_delay_is_known(void) | ||
17 | if (!constant_tsc || !mask) | ||
18 | return 0; | ||
19 | |||
20 | + if (cpu != 0) | ||
21 | + return cpu_data(0).loops_per_jiffy; | ||
22 | + | ||
23 | sibling = cpumask_any_but(mask, cpu); | ||
24 | if (sibling < nr_cpu_ids) | ||
25 | return cpu_data(sibling).loops_per_jiffy; | ||
26 | -- | ||
27 | https://clearlinux.org | ||
28 | |||
diff --git a/patches/boot_time_opt/0109-init_task-faster-timerslack.patch b/patches/boot_time_opt/0109-init_task-faster-timerslack.patch deleted file mode 100644 index 9687012..0000000 --- a/patches/boot_time_opt/0109-init_task-faster-timerslack.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From 4c35ad2b763bca4e0eaf449d42a0e4c49197da2c Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Wed, 23 Mar 2016 14:52:41 +0000 | ||
4 | Subject: [PATCH 109/126] init_task: faster timerslack | ||
5 | |||
6 | the default tuning is a compromise between client power and server | ||
7 | performance; | ||
8 | for a server distro like Clear Linux, we don't need to compromise. | ||
9 | (for non-server usages we have different kernel binaries) | ||
10 | |||
11 | in principle this can be done as a patch to systemd as well, but we have | ||
12 | a shared | ||
13 | systemd between usages while we have different kernels, so the logistics | ||
14 | for where the patch goes work out better here | ||
15 | --- | ||
16 | include/linux/init_task.h | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/include/linux/init_task.h b/include/linux/init_task.h | ||
20 | index 8062e6cc607c..2903519e2462 100644 | ||
21 | --- a/include/linux/init_task.h | ||
22 | +++ b/include/linux/init_task.h | ||
23 | @@ -275,7 +275,7 @@ extern struct cred init_cred; | ||
24 | .journal_info = NULL, \ | ||
25 | INIT_CPU_TIMERS(tsk) \ | ||
26 | .pi_lock = __RAW_SPIN_LOCK_UNLOCKED(tsk.pi_lock), \ | ||
27 | - .timer_slack_ns = 50000, /* 50 usec default slack */ \ | ||
28 | + .timer_slack_ns = 1000, /* 1 usec default slack */ \ | ||
29 | .pids = { \ | ||
30 | [PIDTYPE_PID] = INIT_PID_LINK(PIDTYPE_PID), \ | ||
31 | [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \ | ||
32 | -- | ||
33 | 2.15.0 | ||
34 | |||
diff --git a/patches/boot_time_opt/0116-Initialize-ata-before-graphics.patch b/patches/boot_time_opt/0109-initialize-ata-before-graphics.patch index 9bc70d6..841a5b3 100644 --- a/patches/boot_time_opt/0116-Initialize-ata-before-graphics.patch +++ b/patches/boot_time_opt/0109-initialize-ata-before-graphics.patch | |||
@@ -1,47 +1,50 @@ | |||
1 | From a8f79e6e347a5d884ea8d351631a6f6e899060cc Mon Sep 17 00:00:00 2001 | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Arjan van de Ven <arjan@linux.intel.com> | 2 | From: Arjan van de Ven <arjan@linux.intel.com> |
3 | Date: Thu, 2 Jun 2016 23:36:32 -0500 | 3 | Date: Thu, 2 Jun 2016 23:36:32 -0500 |
4 | Subject: [PATCH 116/126] Initialize ata before graphics | 4 | Subject: [PATCH] initialize ata before graphics |
5 | 5 | ||
6 | ATA init is the long pole in the boot process, and its asynchronous. | 6 | ATA init is the long pole in the boot process, and its asynchronous. |
7 | move the graphics init after it so that ata and graphics initialize | 7 | move the graphics init after it so that ata and graphics initialize |
8 | in parallel | 8 | in parallel |
9 | --- | 9 | --- |
10 | drivers/Makefile | 11 ++++++----- | 10 | drivers/Makefile | 15 ++++++++------- |
11 | 1 file changed, 6 insertions(+), 5 deletions(-) | 11 | 1 file changed, 8 insertions(+), 7 deletions(-) |
12 | 12 | ||
13 | diff --git a/drivers/Makefile b/drivers/Makefile | 13 | diff --git a/drivers/Makefile b/drivers/Makefile |
14 | index d242d3514d30..b73656e2caa0 100644 | 14 | index 576228037718..cf79337dd279 100644 |
15 | --- a/drivers/Makefile | 15 | --- a/drivers/Makefile |
16 | +++ b/drivers/Makefile | 16 | +++ b/drivers/Makefile |
17 | @@ -61,14 +61,9 @@ obj-y += char/ | 17 | @@ -59,15 +59,8 @@ obj-y += char/ |
18 | # iommu/ comes before gpu as gpu are using iommu controllers | 18 | # iommu/ comes before gpu as gpu are using iommu controllers |
19 | obj-$(CONFIG_IOMMU_SUPPORT) += iommu/ | 19 | obj-y += iommu/ |
20 | 20 | ||
21 | -# gpu/ comes after char for AGP vs DRM startup and after iommu | 21 | -# gpu/ comes after char for AGP vs DRM startup and after iommu |
22 | -obj-y += gpu/ | 22 | -obj-y += gpu/ |
23 | 23 | - | |
24 | obj-$(CONFIG_CONNECTOR) += connector/ | 24 | obj-$(CONFIG_CONNECTOR) += connector/ |
25 | 25 | ||
26 | -# i810fb and intelfb depend on char/agp/ | 26 | -# i810fb and intelfb depend on char/agp/ |
27 | -obj-$(CONFIG_FB_I810) += video/fbdev/i810/ | 27 | -obj-$(CONFIG_FB_I810) += video/fbdev/i810/ |
28 | -obj-$(CONFIG_FB_INTEL) += video/fbdev/intelfb/ | 28 | -obj-$(CONFIG_FB_INTEL) += video/fbdev/intelfb/ |
29 | 29 | - | |
30 | obj-$(CONFIG_PARPORT) += parport/ | 30 | obj-$(CONFIG_PARPORT) += parport/ |
31 | obj-$(CONFIG_NVM) += lightnvm/ | 31 | obj-$(CONFIG_NVM) += lightnvm/ |
32 | @@ -82,6 +77,12 @@ obj-$(CONFIG_IDE) += ide/ | 32 | obj-y += base/ block/ misc/ mfd/ nfc/ |
33 | obj-$(CONFIG_SCSI) += scsi/ | 33 | @@ -80,6 +73,14 @@ obj-$(CONFIG_IDE) += ide/ |
34 | obj-y += scsi/ | ||
34 | obj-y += nvme/ | 35 | obj-y += nvme/ |
35 | obj-$(CONFIG_ATA) += ata/ | 36 | obj-$(CONFIG_ATA) += ata/ |
36 | + | 37 | + |
37 | +# gpu/ comes after char for AGP vs DRM startup and after iommu | 38 | +# gpu/ comes after char for AGP vs DRM startup and after iommu |
38 | +obj-y += gpu/ | 39 | +obj-y += gpu/ |
40 | + | ||
39 | +# i810fb and intelfb depend on char/agp/ | 41 | +# i810fb and intelfb depend on char/agp/ |
40 | +obj-$(CONFIG_FB_I810) += video/fbdev/i810/ | 42 | +obj-$(CONFIG_FB_I810) += video/fbdev/i810/ |
41 | +obj-$(CONFIG_FB_INTEL) += video/fbdev/intelfb/ | 43 | +obj-$(CONFIG_FB_INTEL) += video/fbdev/intelfb/ |
44 | + | ||
42 | obj-$(CONFIG_TARGET_CORE) += target/ | 45 | obj-$(CONFIG_TARGET_CORE) += target/ |
43 | obj-$(CONFIG_MTD) += mtd/ | 46 | obj-$(CONFIG_MTD) += mtd/ |
44 | obj-$(CONFIG_SPI) += spi/ | 47 | obj-$(CONFIG_SPI) += spi/ |
45 | -- | 48 | -- |
46 | 2.15.0 | 49 | https://clearlinux.org |
47 | 50 | ||
diff --git a/patches/boot_time_opt/0110-fs-ext4-fsync-optimize-double-fsync-a-bunch.patch b/patches/boot_time_opt/0110-fs-ext4-fsync-optimize-double-fsync-a-bunch.patch deleted file mode 100644 index b115a5b..0000000 --- a/patches/boot_time_opt/0110-fs-ext4-fsync-optimize-double-fsync-a-bunch.patch +++ /dev/null | |||
@@ -1,158 +0,0 @@ | |||
1 | From 5e6c814b3ab74e9abbdd836a224c5ceb7246b44e Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Sat, 9 Apr 2016 22:41:37 +0000 | ||
4 | Subject: [PATCH 110/126] fs: ext4: fsync: optimize double-fsync() a bunch | ||
5 | |||
6 | There are cases where EXT4 is a bit too conservative sending barriers down to | ||
7 | the disk; there are cases where the transaction in progress is not the one | ||
8 | that sent the barrier (in other words: the fsync is for a file for which the | ||
9 | IO happened more time ago and all data was already sent to the disk). | ||
10 | |||
11 | For that case, a more performing tradeoff can be made on SSD devices (which | ||
12 | have the ability to flush their dram caches in a hurry on a power fail event) | ||
13 | where the barrier gets sent to the disk, but we don't need to wait for the | ||
14 | barrier to complete. Any consecutive IO will block on the barrier correctly. | ||
15 | --- | ||
16 | block/bio.c | 19 +++++++++++++++++++ | ||
17 | block/blk-flush.c | 40 ++++++++++++++++++++++++++++++++++++++++ | ||
18 | fs/ext4/fsync.c | 6 +++++- | ||
19 | include/linux/bio.h | 1 + | ||
20 | include/linux/blkdev.h | 5 +++++ | ||
21 | 5 files changed, 70 insertions(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/block/bio.c b/block/bio.c | ||
24 | index 101c2a9b5481..8f9f6e9febe0 100644 | ||
25 | --- a/block/bio.c | ||
26 | +++ b/block/bio.c | ||
27 | @@ -956,6 +956,25 @@ int submit_bio_wait(struct bio *bio) | ||
28 | } | ||
29 | EXPORT_SYMBOL(submit_bio_wait); | ||
30 | |||
31 | +static void submit_bio_nowait_endio(struct bio *bio) | ||
32 | +{ | ||
33 | + bio_put(bio); | ||
34 | +} | ||
35 | + | ||
36 | +/** | ||
37 | + * submit_bio_nowait - submit a bio for fire-and-forge for fire-and-forget | ||
38 | + * @bio: The &struct bio which describes the I/O | ||
39 | + * | ||
40 | + * Simple wrapper around submit_bio() that takes care of bio_put() on completion | ||
41 | + */ | ||
42 | +void submit_bio_nowait(struct bio *bio) | ||
43 | +{ | ||
44 | + bio->bi_end_io = submit_bio_nowait_endio; | ||
45 | + bio->bi_opf |= REQ_SYNC; | ||
46 | + submit_bio(bio); | ||
47 | +} | ||
48 | +EXPORT_SYMBOL(submit_bio_nowait); | ||
49 | + | ||
50 | /** | ||
51 | * bio_advance - increment/complete a bio by some number of bytes | ||
52 | * @bio: bio to advance | ||
53 | diff --git a/block/blk-flush.c b/block/blk-flush.c | ||
54 | index 4938bec8cfef..020f2c75343a 100644 | ||
55 | --- a/block/blk-flush.c | ||
56 | +++ b/block/blk-flush.c | ||
57 | @@ -543,6 +543,46 @@ int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask, | ||
58 | } | ||
59 | EXPORT_SYMBOL(blkdev_issue_flush); | ||
60 | |||
61 | +/** | ||
62 | + * blkdev_issue_flush_nowait - queue a flush | ||
63 | + * @bdev: blockdev to issue flush for | ||
64 | + * @gfp_mask: memory allocation flags (for bio_alloc) | ||
65 | + * | ||
66 | + * Description: | ||
67 | + * Issue a flush for the block device in question. Caller can supply | ||
68 | + * room for storing the error offset in case of a flush error, if they | ||
69 | + * wish to. If WAIT flag is not passed then caller may check only what | ||
70 | + * request was pushed in some internal queue for later handling. | ||
71 | + */ | ||
72 | +void blkdev_issue_flush_nowait(struct block_device *bdev, gfp_t gfp_mask) | ||
73 | +{ | ||
74 | + struct request_queue *q; | ||
75 | + struct bio *bio; | ||
76 | + | ||
77 | + if (bdev->bd_disk == NULL) | ||
78 | + return; | ||
79 | + | ||
80 | + q = bdev_get_queue(bdev); | ||
81 | + if (!q) | ||
82 | + return; | ||
83 | + | ||
84 | + /* | ||
85 | + * some block devices may not have their queue correctly set up here | ||
86 | + * (e.g. loop device without a backing file) and so issuing a flush | ||
87 | + * here will panic. Ensure there is a request function before issuing | ||
88 | + * the flush. | ||
89 | + */ | ||
90 | + if (!q->make_request_fn) | ||
91 | + return; | ||
92 | + | ||
93 | + bio = bio_alloc(gfp_mask, 0); | ||
94 | + bio_set_dev(bio, bdev); | ||
95 | + bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH; | ||
96 | + | ||
97 | + submit_bio_nowait(bio); | ||
98 | +} | ||
99 | +EXPORT_SYMBOL(blkdev_issue_flush_nowait); | ||
100 | + | ||
101 | struct blk_flush_queue *blk_alloc_flush_queue(struct request_queue *q, | ||
102 | int node, int cmd_size) | ||
103 | { | ||
104 | diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c | ||
105 | index 26a7fe5c4fd3..2708b292ddca 100644 | ||
106 | --- a/fs/ext4/fsync.c | ||
107 | +++ b/fs/ext4/fsync.c | ||
108 | @@ -154,7 +154,11 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync) | ||
109 | ret = jbd2_complete_transaction(journal, commit_tid); | ||
110 | if (needs_barrier) { | ||
111 | issue_flush: | ||
112 | - err = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL); | ||
113 | + err = 0; | ||
114 | + if (!blk_queue_nonrot(bdev_get_queue(inode->i_sb->s_bdev))) | ||
115 | + err = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL); | ||
116 | + else | ||
117 | + blkdev_issue_flush_nowait(inode->i_sb->s_bdev, GFP_KERNEL); | ||
118 | if (!ret) | ||
119 | ret = err; | ||
120 | } | ||
121 | diff --git a/include/linux/bio.h b/include/linux/bio.h | ||
122 | index 275c91c99516..4ddfa9e10301 100644 | ||
123 | --- a/include/linux/bio.h | ||
124 | +++ b/include/linux/bio.h | ||
125 | @@ -448,6 +448,7 @@ struct request_queue; | ||
126 | extern int bio_phys_segments(struct request_queue *, struct bio *); | ||
127 | |||
128 | extern int submit_bio_wait(struct bio *bio); | ||
129 | +extern void submit_bio_nowait(struct bio *bio); | ||
130 | extern void bio_advance(struct bio *, unsigned); | ||
131 | |||
132 | extern void bio_init(struct bio *bio, struct bio_vec *table, | ||
133 | diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h | ||
134 | index 8da66379f7ea..c48565cc84fb 100644 | ||
135 | --- a/include/linux/blkdev.h | ||
136 | +++ b/include/linux/blkdev.h | ||
137 | @@ -1336,6 +1336,7 @@ static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt, | ||
138 | } | ||
139 | |||
140 | extern int blkdev_issue_flush(struct block_device *, gfp_t, sector_t *); | ||
141 | +extern void blkdev_issue_flush_nowait(struct block_device *, gfp_t); | ||
142 | extern int blkdev_issue_write_same(struct block_device *bdev, sector_t sector, | ||
143 | sector_t nr_sects, gfp_t gfp_mask, struct page *page); | ||
144 | |||
145 | @@ -2001,6 +2002,10 @@ static inline int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask, | ||
146 | return 0; | ||
147 | } | ||
148 | |||
149 | +static inline void blkdev_issue_flush_nowait(struct block_device *bdev, gfp_t gfp_mask) | ||
150 | +{ | ||
151 | +} | ||
152 | + | ||
153 | #endif /* CONFIG_BLOCK */ | ||
154 | |||
155 | #endif | ||
156 | -- | ||
157 | 2.15.0 | ||
158 | |||
diff --git a/patches/boot_time_opt/0118-give-rdrand-some-credit.patch b/patches/boot_time_opt/0110-give-rdrand-some-credit.patch index a7abd53..8fcfda9 100644 --- a/patches/boot_time_opt/0118-give-rdrand-some-credit.patch +++ b/patches/boot_time_opt/0110-give-rdrand-some-credit.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 7b90a7bba60360a4585cf317b092e266e6a81e76 Mon Sep 17 00:00:00 2001 | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Arjan van de Ven <arjan@linux.intel.com> | 2 | From: Arjan van de Ven <arjan@linux.intel.com> |
3 | Date: Fri, 29 Jul 2016 19:10:52 +0000 | 3 | Date: Fri, 29 Jul 2016 19:10:52 +0000 |
4 | Subject: [PATCH 118/126] give rdrand some credit | 4 | Subject: [PATCH] give rdrand some credit |
5 | 5 | ||
6 | try to credit rdrand/rdseed with some entropy | 6 | try to credit rdrand/rdseed with some entropy |
7 | 7 | ||
@@ -13,10 +13,10 @@ rdrand and rdtsc add zero entropy. | |||
13 | 1 file changed, 2 insertions(+) | 13 | 1 file changed, 2 insertions(+) |
14 | 14 | ||
15 | diff --git a/drivers/char/random.c b/drivers/char/random.c | 15 | diff --git a/drivers/char/random.c b/drivers/char/random.c |
16 | index 8ad92707e45f..1729d2e733e5 100644 | 16 | index f462b9d2f5a5..57fd9790ea36 100644 |
17 | --- a/drivers/char/random.c | 17 | --- a/drivers/char/random.c |
18 | +++ b/drivers/char/random.c | 18 | +++ b/drivers/char/random.c |
19 | @@ -1666,6 +1666,8 @@ static void init_std_data(struct entropy_store *r) | 19 | @@ -1781,6 +1781,8 @@ static void __init init_std_data(struct entropy_store *r) |
20 | if (!arch_get_random_seed_long(&rv) && | 20 | if (!arch_get_random_seed_long(&rv) && |
21 | !arch_get_random_long(&rv)) | 21 | !arch_get_random_long(&rv)) |
22 | rv = random_get_entropy(); | 22 | rv = random_get_entropy(); |
@@ -26,5 +26,5 @@ index 8ad92707e45f..1729d2e733e5 100644 | |||
26 | } | 26 | } |
27 | mix_pool_bytes(r, utsname(), sizeof(*(utsname()))); | 27 | mix_pool_bytes(r, utsname(), sizeof(*(utsname()))); |
28 | -- | 28 | -- |
29 | 2.15.0 | 29 | https://clearlinux.org |
30 | 30 | ||
diff --git a/patches/boot_time_opt/0120-ipv4-tcp-allow-the-memory-tuning-for-tcp-to-go-a-lit.patch b/patches/boot_time_opt/0111-ipv4-tcp-allow-the-memory-tuning-for-tcp-to-go-a-lit.patch index 8dbec8f..8b95edf 100644 --- a/patches/boot_time_opt/0120-ipv4-tcp-allow-the-memory-tuning-for-tcp-to-go-a-lit.patch +++ b/patches/boot_time_opt/0111-ipv4-tcp-allow-the-memory-tuning-for-tcp-to-go-a-lit.patch | |||
@@ -1,18 +1,18 @@ | |||
1 | From 4492e1f2e57ae6d0c5e0470309f0ba3051cc6228 Mon Sep 17 00:00:00 2001 | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Arjan van de Ven <arjan@linux.intel.com> | 2 | From: Arjan van de Ven <arjan@linux.intel.com> |
3 | Date: Fri, 6 Jan 2017 15:34:09 +0000 | 3 | Date: Fri, 6 Jan 2017 15:34:09 +0000 |
4 | Subject: [PATCH 120/126] ipv4/tcp: allow the memory tuning for tcp to go a | 4 | Subject: [PATCH] ipv4/tcp: allow the memory tuning for tcp to go a little |
5 | little bigger than default | 5 | bigger than default |
6 | 6 | ||
7 | --- | 7 | --- |
8 | net/ipv4/tcp.c | 4 ++-- | 8 | net/ipv4/tcp.c | 4 ++-- |
9 | 1 file changed, 2 insertions(+), 2 deletions(-) | 9 | 1 file changed, 2 insertions(+), 2 deletions(-) |
10 | 10 | ||
11 | diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c | 11 | diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c |
12 | index 5091402720ab..61c37e60f393 100644 | 12 | index 2384ac048bea..222581b07b85 100644 |
13 | --- a/net/ipv4/tcp.c | 13 | --- a/net/ipv4/tcp.c |
14 | +++ b/net/ipv4/tcp.c | 14 | +++ b/net/ipv4/tcp.c |
15 | @@ -3528,8 +3528,8 @@ void __init tcp_init(void) | 15 | @@ -4195,8 +4195,8 @@ void __init tcp_init(void) |
16 | tcp_init_mem(); | 16 | tcp_init_mem(); |
17 | /* Set per-socket limits to no more than 1/128 the pressure threshold */ | 17 | /* Set per-socket limits to no more than 1/128 the pressure threshold */ |
18 | limit = nr_free_buffer_pages() << (PAGE_SHIFT - 7); | 18 | limit = nr_free_buffer_pages() << (PAGE_SHIFT - 7); |
@@ -21,8 +21,8 @@ index 5091402720ab..61c37e60f393 100644 | |||
21 | + max_wshare = min(16UL*1024*1024, limit); | 21 | + max_wshare = min(16UL*1024*1024, limit); |
22 | + max_rshare = min(16UL*1024*1024, limit); | 22 | + max_rshare = min(16UL*1024*1024, limit); |
23 | 23 | ||
24 | sysctl_tcp_wmem[0] = SK_MEM_QUANTUM; | 24 | init_net.ipv4.sysctl_tcp_wmem[0] = SK_MEM_QUANTUM; |
25 | sysctl_tcp_wmem[1] = 16*1024; | 25 | init_net.ipv4.sysctl_tcp_wmem[1] = 16*1024; |
26 | -- | 26 | -- |
27 | 2.15.0 | 27 | https://clearlinux.org |
28 | 28 | ||
diff --git a/patches/boot_time_opt/0111-overload-on-wakeup.patch b/patches/boot_time_opt/0111-overload-on-wakeup.patch deleted file mode 100644 index d5125be..0000000 --- a/patches/boot_time_opt/0111-overload-on-wakeup.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | From cc7c761946c6b9fa820acc90d7514795af3f42f5 Mon Sep 17 00:00:00 2001 | ||
2 | From: jplozi <jplozi@unice.fr> | ||
3 | Date: Fri, 11 Mar 2016 15:18:06 +0100 | ||
4 | Subject: [PATCH 111/126] overload on wakeup | ||
5 | |||
6 | source https://github.com/jplozi/wastedcores | ||
7 | |||
8 | as an experiment, apply the learnings from the wasted-cores paper | ||
9 | and see how the performance works out. With the data from this we should | ||
10 | be able to work with Peter and the rest of the scheduler folks on | ||
11 | a more permanent/elegant solution. | ||
12 | --- | ||
13 | kernel/sched/fair.c | 14 ++++++++++++++ | ||
14 | 1 file changed, 14 insertions(+) | ||
15 | |||
16 | --- linux-4.14/kernel/sched/fair.c.org 2017-11-18 23:01:57.353611850 +0000 | ||
17 | +++ linux-4.14/kernel/sched/fair.c 2017-11-19 15:24:38.093637926 +0000 | ||
18 | @@ -5925,6 +5925,8 @@ | ||
19 | return min_cap * 1024 < task_util(p) * capacity_margin; | ||
20 | } | ||
21 | |||
22 | + | ||
23 | +static unsigned int once_in_a_while; | ||
24 | /* | ||
25 | * select_task_rq_fair: Select target runqueue for the waking task in domains | ||
26 | * that have the 'sd_flag' flag set. In practice, this is SD_BALANCE_WAKE, | ||
27 | @@ -5953,6 +5955,30 @@ | ||
28 | } | ||
29 | |||
30 | rcu_read_lock(); | ||
31 | + | ||
32 | + once_in_a_while++; | ||
33 | + | ||
34 | + if (cpu_rq(prev_cpu)->nr_running || (once_in_a_while & 15) == 0) { | ||
35 | + int _cpu; | ||
36 | + int bestprio = -5000; | ||
37 | + int bestcpu = -1; | ||
38 | + | ||
39 | + for_each_online_cpu(_cpu) { | ||
40 | + if (!cpumask_test_cpu(_cpu, &p->cpus_allowed) || | ||
41 | + cpu_rq(_cpu)->nr_running) | ||
42 | + continue; | ||
43 | + if (arch_asym_cpu_priority(_cpu) > bestprio || (prev_cpu == _cpu && bestprio == arch_asym_cpu_priority(_cpu))) { | ||
44 | + bestcpu = _cpu; | ||
45 | + bestprio = arch_asym_cpu_priority(_cpu); | ||
46 | + } | ||
47 | + } | ||
48 | + | ||
49 | + if (bestcpu > 0) { | ||
50 | + rcu_read_unlock(); | ||
51 | + return bestcpu; | ||
52 | + } | ||
53 | + } | ||
54 | + | ||
55 | for_each_domain(cpu, tmp) { | ||
56 | if (!(tmp->flags & SD_LOAD_BALANCE)) | ||
57 | break; | ||
diff --git a/patches/boot_time_opt/0112-bootstats-add-printk-s-to-measure-boot-time-in-more-.patch b/patches/boot_time_opt/0112-bootstats-add-printk-s-to-measure-boot-time-in-more-.patch deleted file mode 100644 index aad29b1..0000000 --- a/patches/boot_time_opt/0112-bootstats-add-printk-s-to-measure-boot-time-in-more-.patch +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | From eb6aacfb561485ef9419ff734b2d66059f5fc63d Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Wed, 11 Feb 2015 16:05:23 -0600 | ||
4 | Subject: [PATCH 112/126] bootstats: add printk's to measure boot time in more | ||
5 | detail | ||
6 | |||
7 | Few distro-tweaks to add printk's to visualize boot time better | ||
8 | |||
9 | Author: Arjan van de Ven <arjan@linux.intel.com> | ||
10 | |||
11 | Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
12 | --- | ||
13 | arch/x86/kernel/alternative.c | 4 ++++ | ||
14 | drivers/base/firmware_class.c | 2 ++ | ||
15 | init/main.c | 2 +- | ||
16 | kernel/kmod.c | 2 ++ | ||
17 | 4 files changed, 9 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c | ||
20 | index 3344d3382e91..a3515ddca77c 100644 | ||
21 | --- a/arch/x86/kernel/alternative.c | ||
22 | +++ b/arch/x86/kernel/alternative.c | ||
23 | @@ -637,7 +637,9 @@ void __init alternative_instructions(void) | ||
24 | * patching. | ||
25 | */ | ||
26 | |||
27 | + printk("clr: Applying alternatives\n"); | ||
28 | apply_alternatives(__alt_instructions, __alt_instructions_end); | ||
29 | + printk("clr: Applying alternatives done\n"); | ||
30 | |||
31 | #ifdef CONFIG_SMP | ||
32 | /* Patch to UP if other cpus not imminent. */ | ||
33 | @@ -648,6 +650,8 @@ void __init alternative_instructions(void) | ||
34 | _text, _etext); | ||
35 | } | ||
36 | |||
37 | + printk("clr: Applying alternatives smp done\n"); | ||
38 | + | ||
39 | if (!uniproc_patched || num_possible_cpus() == 1) | ||
40 | free_init_pages("SMP alternatives", | ||
41 | (unsigned long)__smp_locks, | ||
42 | diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c | ||
43 | index 4b57cf5bc81d..218031ac9269 100644 | ||
44 | --- a/drivers/base/firmware_class.c | ||
45 | +++ b/drivers/base/firmware_class.c | ||
46 | @@ -1265,6 +1265,8 @@ request_firmware(const struct firmware **firmware_p, const char *name, | ||
47 | { | ||
48 | int ret; | ||
49 | |||
50 | + printk("clr: request_firmware: %s\n", name); | ||
51 | + | ||
52 | /* Need to pin this module until return */ | ||
53 | __module_get(THIS_MODULE); | ||
54 | ret = _request_firmware(firmware_p, name, device, NULL, 0, | ||
55 | diff --git a/init/main.c b/init/main.c | ||
56 | index 0ee9c6866ada..7da935ad2d12 100644 | ||
57 | --- a/init/main.c | ||
58 | +++ b/init/main.c | ||
59 | @@ -799,7 +799,7 @@ static int __init_or_module do_one_initcall_debug(initcall_t fn) | ||
60 | unsigned long long duration; | ||
61 | int ret; | ||
62 | |||
63 | - printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current)); | ||
64 | + printk(KERN_DEBUG "calling %pF @ %i\n", fn, raw_smp_processor_id()); | ||
65 | calltime = ktime_get(); | ||
66 | ret = fn(); | ||
67 | rettime = ktime_get(); | ||
68 | diff --git a/kernel/kmod.c b/kernel/kmod.c | ||
69 | index bc6addd9152b..9241a16ca4fd 100644 | ||
70 | --- a/kernel/kmod.c | ||
71 | +++ b/kernel/kmod.c | ||
72 | @@ -77,6 +77,8 @@ static int call_modprobe(char *module_name, int wait) | ||
73 | NULL | ||
74 | }; | ||
75 | |||
76 | + printk("clr: call_modprobe: %s %i \n", module_name, wait); | ||
77 | + | ||
78 | char **argv = kmalloc(sizeof(char *[5]), GFP_KERNEL); | ||
79 | if (!argv) | ||
80 | goto out; | ||
81 | -- | ||
82 | 2.15.0 | ||
83 | |||
diff --git a/patches/boot_time_opt/0112-kernel-time-reduce-ntp-wakeups.patch b/patches/boot_time_opt/0112-kernel-time-reduce-ntp-wakeups.patch new file mode 100644 index 0000000..724b2b9 --- /dev/null +++ b/patches/boot_time_opt/0112-kernel-time-reduce-ntp-wakeups.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Sat, 29 Apr 2017 22:24:34 +0000 | ||
4 | Subject: [PATCH] kernel: time: reduce ntp wakeups | ||
5 | |||
6 | --- | ||
7 | kernel/time/ntp.c | 2 +- | ||
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c | ||
11 | index 069ca78fb0bf..22d82f21fc2e 100644 | ||
12 | --- a/kernel/time/ntp.c | ||
13 | +++ b/kernel/time/ntp.c | ||
14 | @@ -513,7 +513,7 @@ static void sched_sync_hw_clock(struct timespec64 now, | ||
15 | * the algorithm is very likely to require a short-sleep retry | ||
16 | * after the above long sleep to synchronize ts_nsec. | ||
17 | */ | ||
18 | - next.tv_sec = 0; | ||
19 | + next.tv_sec = 10; | ||
20 | } | ||
21 | |||
22 | /* Compute the needed delay that will get to tv_nsec == target_nsec */ | ||
23 | -- | ||
24 | https://clearlinux.org | ||
25 | |||
diff --git a/patches/boot_time_opt/0113-fix-initcall-timestamps.patch b/patches/boot_time_opt/0113-fix-initcall-timestamps.patch deleted file mode 100644 index 724129a..0000000 --- a/patches/boot_time_opt/0113-fix-initcall-timestamps.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 2d08a233a1dd6eef3979f6d09b03cfcb66db7b0e Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Thu, 2 Jun 2016 23:36:32 -0500 | ||
4 | Subject: [PATCH 113/126] fix initcall timestamps | ||
5 | |||
6 | Print more finegrained initcall timings | ||
7 | |||
8 | use the tsc instead of the jiffies clock for initcall_debug | ||
9 | --- | ||
10 | init/main.c | 12 ++++++------ | ||
11 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
12 | |||
13 | diff --git a/init/main.c b/init/main.c | ||
14 | index 7da935ad2d12..d1ba883d3382 100644 | ||
15 | --- a/init/main.c | ||
16 | +++ b/init/main.c | ||
17 | @@ -795,16 +795,16 @@ __setup("initcall_blacklist=", initcall_blacklist); | ||
18 | |||
19 | static int __init_or_module do_one_initcall_debug(initcall_t fn) | ||
20 | { | ||
21 | - ktime_t calltime, delta, rettime; | ||
22 | + unsigned long long calltime, delta, rettime; | ||
23 | unsigned long long duration; | ||
24 | int ret; | ||
25 | |||
26 | - printk(KERN_DEBUG "calling %pF @ %i\n", fn, raw_smp_processor_id()); | ||
27 | - calltime = ktime_get(); | ||
28 | + printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current)); | ||
29 | + calltime = local_clock(); | ||
30 | ret = fn(); | ||
31 | - rettime = ktime_get(); | ||
32 | - delta = ktime_sub(rettime, calltime); | ||
33 | - duration = (unsigned long long) ktime_to_ns(delta) >> 10; | ||
34 | + rettime = local_clock(); | ||
35 | + delta = rettime - calltime; | ||
36 | + duration = delta >> 10; | ||
37 | printk(KERN_DEBUG "initcall %pF returned %d after %lld usecs\n", | ||
38 | fn, ret, duration); | ||
39 | |||
40 | -- | ||
41 | 2.15.0 | ||
42 | |||
diff --git a/patches/boot_time_opt/0113-init-wait-for-partition-and-retry-scan.patch b/patches/boot_time_opt/0113-init-wait-for-partition-and-retry-scan.patch new file mode 100644 index 0000000..98b7b5f --- /dev/null +++ b/patches/boot_time_opt/0113-init-wait-for-partition-and-retry-scan.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Wed, 17 May 2017 01:52:11 +0000 | ||
4 | Subject: [PATCH] init: wait for partition and retry scan | ||
5 | |||
6 | As Clear Linux boots fast the device is not ready when | ||
7 | the mounting code is reached, so a retry device scan will | ||
8 | be performed every 0.5 sec for at least 40 sec | ||
9 | and synchronize the async task. | ||
10 | |||
11 | Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
12 | --- | ||
13 | init/do_mounts.c | 10 ++++++++++ | ||
14 | 1 file changed, 10 insertions(+) | ||
15 | |||
16 | diff --git a/init/do_mounts.c b/init/do_mounts.c | ||
17 | index b5f9604d0c98..6022ead20701 100644 | ||
18 | --- a/init/do_mounts.c | ||
19 | +++ b/init/do_mounts.c | ||
20 | @@ -225,11 +225,19 @@ dev_t name_to_dev_t(const char *name) | ||
21 | char *p; | ||
22 | dev_t res = 0; | ||
23 | int part; | ||
24 | + /* we will wait at least 40 sec */ | ||
25 | + int needtowait = 40<<1; | ||
26 | |||
27 | #ifdef CONFIG_BLOCK | ||
28 | if (strncmp(name, "PARTUUID=", 9) == 0) { | ||
29 | name += 9; | ||
30 | res = devt_from_partuuid(name); | ||
31 | + while (!res && needtowait) { | ||
32 | + /* waiting 0.5 sec */ | ||
33 | + msleep(500); | ||
34 | + res = devt_from_partuuid(name); | ||
35 | + needtowait--; | ||
36 | + } | ||
37 | if (!res) | ||
38 | goto fail; | ||
39 | goto done; | ||
40 | @@ -596,7 +604,9 @@ void __init prepare_namespace(void) | ||
41 | * For example, it is not atypical to wait 5 seconds here | ||
42 | * for the touchpad of a laptop to initialize. | ||
43 | */ | ||
44 | + async_synchronize_full(); | ||
45 | wait_for_device_probe(); | ||
46 | + async_synchronize_full(); | ||
47 | |||
48 | md_run_setup(); | ||
49 | |||
50 | -- | ||
51 | https://clearlinux.org | ||
52 | |||
diff --git a/patches/boot_time_opt/0114-smpboot-reuse-timer-calibration.patch b/patches/boot_time_opt/0114-smpboot-reuse-timer-calibration.patch deleted file mode 100644 index 5fe8cdf..0000000 --- a/patches/boot_time_opt/0114-smpboot-reuse-timer-calibration.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 283fcb879f66da9659f1983bcf173476bae9292b Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Wed, 11 Feb 2015 17:28:14 -0600 | ||
4 | Subject: [PATCH 114/126] smpboot: reuse timer calibration | ||
5 | |||
6 | NO point recalibrating for known-constant tsc... saves 200ms+ of boot time. | ||
7 | |||
8 | Author: Arjan van de Ven <arjan@linux.intel.com> | ||
9 | |||
10 | Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
11 | --- | ||
12 | arch/x86/kernel/tsc.c | 3 +++ | ||
13 | 1 file changed, 3 insertions(+) | ||
14 | |||
15 | diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c | ||
16 | index ad2b925a808e..6aed4e79f290 100644 | ||
17 | --- a/arch/x86/kernel/tsc.c | ||
18 | +++ b/arch/x86/kernel/tsc.c | ||
19 | @@ -1352,6 +1352,9 @@ unsigned long calibrate_delay_is_known(void) | ||
20 | if (tsc_disabled || !constant_tsc || !mask) | ||
21 | return 0; | ||
22 | |||
23 | + if (cpu != 0) | ||
24 | + return cpu_data(0).loops_per_jiffy; | ||
25 | + | ||
26 | sibling = cpumask_any_but(mask, cpu); | ||
27 | if (sibling < nr_cpu_ids) | ||
28 | return cpu_data(sibling).loops_per_jiffy; | ||
29 | -- | ||
30 | 2.15.0 | ||
31 | |||
diff --git a/patches/boot_time_opt/0115-raid6-add-Kconfig-option-to-skip-raid6-benchmarking.patch b/patches/boot_time_opt/0115-raid6-add-Kconfig-option-to-skip-raid6-benchmarking.patch index cc21f98..e19ad71 100644 --- a/patches/boot_time_opt/0115-raid6-add-Kconfig-option-to-skip-raid6-benchmarking.patch +++ b/patches/boot_time_opt/0115-raid6-add-Kconfig-option-to-skip-raid6-benchmarking.patch | |||
@@ -63,7 +63,7 @@ index 000000000000..d881d6be89bb | |||
63 | + prompt "RAID6 Recovery Algorithm" | 63 | + prompt "RAID6 Recovery Algorithm" |
64 | + default RAID6_FORCE_INT | 64 | + default RAID6_FORCE_INT |
65 | + depends on RAID6_FORCE_ALGO | 65 | + depends on RAID6_FORCE_ALGO |
66 | + ---help--- | 66 | + help |
67 | + Select the RAID6 recovery algorithm to unconditionally use | 67 | + Select the RAID6 recovery algorithm to unconditionally use |
68 | + | 68 | + |
69 | + config RAID6_FORCE_INT | 69 | + config RAID6_FORCE_INT |
diff --git a/patches/boot_time_opt/0117-migrate-some-systemd-defaults-to-the-kernel-defaults.patch b/patches/boot_time_opt/0117-migrate-some-systemd-defaults-to-the-kernel-defaults.patch new file mode 100644 index 0000000..8464bbb --- /dev/null +++ b/patches/boot_time_opt/0117-migrate-some-systemd-defaults-to-the-kernel-defaults.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
2 | From: Auke Kok <auke-jan.h.kok@intel.com> | ||
3 | Date: Thu, 2 Aug 2018 12:03:22 -0700 | ||
4 | Subject: [PATCH] migrate some systemd defaults to the kernel defaults. | ||
5 | |||
6 | These settings are needed to prevent networking issues when | ||
7 | the networking modules come up by default without explicit | ||
8 | settings, which breaks some cases. | ||
9 | |||
10 | We don't want the modprobe settings to be read at boot time | ||
11 | if we're not going to do anything else ever. | ||
12 | --- | ||
13 | drivers/net/dummy.c | 2 +- | ||
14 | include/uapi/linux/if_bonding.h | 2 +- | ||
15 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c | ||
18 | index bab3a9bb5e6f..dcd8a33c4a33 100644 | ||
19 | --- a/drivers/net/dummy.c | ||
20 | +++ b/drivers/net/dummy.c | ||
21 | @@ -43,7 +43,7 @@ | ||
22 | |||
23 | #define DRV_NAME "dummy" | ||
24 | |||
25 | -static int numdummies = 1; | ||
26 | +static int numdummies = 0; | ||
27 | |||
28 | /* fake multicast ability */ | ||
29 | static void set_multicast_list(struct net_device *dev) | ||
30 | diff --git a/include/uapi/linux/if_bonding.h b/include/uapi/linux/if_bonding.h | ||
31 | index 45f3750aa861..317f8326ddd7 100644 | ||
32 | --- a/include/uapi/linux/if_bonding.h | ||
33 | +++ b/include/uapi/linux/if_bonding.h | ||
34 | @@ -82,7 +82,7 @@ | ||
35 | #define BOND_STATE_ACTIVE 0 /* link is active */ | ||
36 | #define BOND_STATE_BACKUP 1 /* link is backup */ | ||
37 | |||
38 | -#define BOND_DEFAULT_MAX_BONDS 1 /* Default maximum number of devices to support */ | ||
39 | +#define BOND_DEFAULT_MAX_BONDS 0 /* Default maximum number of devices to support */ | ||
40 | |||
41 | #define BOND_DEFAULT_TX_QUEUES 16 /* Default number of tx queues per device */ | ||
42 | |||
43 | -- | ||
44 | https://clearlinux.org | ||
45 | |||
diff --git a/patches/boot_time_opt/0117-reduce-e1000e-boot-time-by-tightening-sleep-ranges.patch b/patches/boot_time_opt/0117-reduce-e1000e-boot-time-by-tightening-sleep-ranges.patch deleted file mode 100644 index 6e208f5..0000000 --- a/patches/boot_time_opt/0117-reduce-e1000e-boot-time-by-tightening-sleep-ranges.patch +++ /dev/null | |||
@@ -1,311 +0,0 @@ | |||
1 | From 978b64d2b68efe40d73f69897292e796db46585a Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Mon, 25 Jul 2016 06:44:34 -0500 | ||
4 | Subject: [PATCH 117/126] reduce e1000e boot time by tightening sleep ranges | ||
5 | |||
6 | The e1000e driver is a great user of the usleep_range() API, | ||
7 | and has any nice ranges that in principle help power management. | ||
8 | |||
9 | However the ranges that are used only during system startup are | ||
10 | very long (and can add easily 100 msec to the boot time) while | ||
11 | the power savings of such long ranges is irrelevant due to the | ||
12 | one-off, boot only, nature of these functions. | ||
13 | |||
14 | This patch shrinks some of the longest ranges to be shorter | ||
15 | (while still using a power friendly 1 msec range); this saves | ||
16 | 100msec+ of boot time on my BDW NUCs | ||
17 | |||
18 | Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> | ||
19 | --- | ||
20 | drivers/net/ethernet/intel/e1000e/80003es2lan.c | 2 +- | ||
21 | drivers/net/ethernet/intel/e1000e/82571.c | 2 +- | ||
22 | drivers/net/ethernet/intel/e1000e/ethtool.c | 14 +++++++------- | ||
23 | drivers/net/ethernet/intel/e1000e/ich8lan.c | 20 ++++++++++---------- | ||
24 | drivers/net/ethernet/intel/e1000e/mac.c | 2 +- | ||
25 | drivers/net/ethernet/intel/e1000e/netdev.c | 14 +++++++------- | ||
26 | drivers/net/ethernet/intel/e1000e/nvm.c | 2 +- | ||
27 | 7 files changed, 28 insertions(+), 28 deletions(-) | ||
28 | |||
29 | diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c | ||
30 | index cd391376036c..b5759899eeb8 100644 | ||
31 | --- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c | ||
32 | +++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c | ||
33 | @@ -698,7 +698,7 @@ static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw) | ||
34 | ew32(TCTL, E1000_TCTL_PSP); | ||
35 | e1e_flush(); | ||
36 | |||
37 | - usleep_range(10000, 20000); | ||
38 | + usleep_range(10000, 11000); | ||
39 | |||
40 | ctrl = er32(CTRL); | ||
41 | |||
42 | diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c | ||
43 | index 6b03c8553e59..d31145269dd9 100644 | ||
44 | --- a/drivers/net/ethernet/intel/e1000e/82571.c | ||
45 | +++ b/drivers/net/ethernet/intel/e1000e/82571.c | ||
46 | @@ -977,7 +977,7 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw) | ||
47 | ew32(TCTL, tctl); | ||
48 | e1e_flush(); | ||
49 | |||
50 | - usleep_range(10000, 20000); | ||
51 | + usleep_range(10000, 11000); | ||
52 | |||
53 | /* Must acquire the MDIO ownership before MAC reset. | ||
54 | * Ownership defaults to firmware after a reset. | ||
55 | diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c | ||
56 | index 003cbd605799..6295b607c555 100644 | ||
57 | --- a/drivers/net/ethernet/intel/e1000e/ethtool.c | ||
58 | +++ b/drivers/net/ethernet/intel/e1000e/ethtool.c | ||
59 | @@ -1032,7 +1032,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | ||
60 | /* Disable all the interrupts */ | ||
61 | ew32(IMC, 0xFFFFFFFF); | ||
62 | e1e_flush(); | ||
63 | - usleep_range(10000, 20000); | ||
64 | + usleep_range(10000, 11000); | ||
65 | |||
66 | /* Test each interrupt */ | ||
67 | for (i = 0; i < 10; i++) { | ||
68 | @@ -1064,7 +1064,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | ||
69 | ew32(IMC, mask); | ||
70 | ew32(ICS, mask); | ||
71 | e1e_flush(); | ||
72 | - usleep_range(10000, 20000); | ||
73 | + usleep_range(10000, 11000); | ||
74 | |||
75 | if (adapter->test_icr & mask) { | ||
76 | *data = 3; | ||
77 | @@ -1082,7 +1082,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | ||
78 | ew32(IMS, mask); | ||
79 | ew32(ICS, mask); | ||
80 | e1e_flush(); | ||
81 | - usleep_range(10000, 20000); | ||
82 | + usleep_range(10000, 11000); | ||
83 | |||
84 | if (!(adapter->test_icr & mask)) { | ||
85 | *data = 4; | ||
86 | @@ -1100,7 +1100,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | ||
87 | ew32(IMC, ~mask & 0x00007FFF); | ||
88 | ew32(ICS, ~mask & 0x00007FFF); | ||
89 | e1e_flush(); | ||
90 | - usleep_range(10000, 20000); | ||
91 | + usleep_range(10000, 11000); | ||
92 | |||
93 | if (adapter->test_icr) { | ||
94 | *data = 5; | ||
95 | @@ -1112,7 +1112,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | ||
96 | /* Disable all the interrupts */ | ||
97 | ew32(IMC, 0xFFFFFFFF); | ||
98 | e1e_flush(); | ||
99 | - usleep_range(10000, 20000); | ||
100 | + usleep_range(10000, 11000); | ||
101 | |||
102 | /* Unhook test interrupt handler */ | ||
103 | free_irq(irq, netdev); | ||
104 | @@ -1488,7 +1488,7 @@ static int e1000_set_82571_fiber_loopback(struct e1000_adapter *adapter) | ||
105 | */ | ||
106 | ew32(SCTL, E1000_SCTL_ENABLE_SERDES_LOOPBACK); | ||
107 | e1e_flush(); | ||
108 | - usleep_range(10000, 20000); | ||
109 | + usleep_range(10000, 11000); | ||
110 | |||
111 | return 0; | ||
112 | } | ||
113 | @@ -1602,7 +1602,7 @@ static void e1000_loopback_cleanup(struct e1000_adapter *adapter) | ||
114 | hw->phy.media_type == e1000_media_type_internal_serdes) { | ||
115 | ew32(SCTL, E1000_SCTL_DISABLE_SERDES_LOOPBACK); | ||
116 | e1e_flush(); | ||
117 | - usleep_range(10000, 20000); | ||
118 | + usleep_range(10000, 11000); | ||
119 | break; | ||
120 | } | ||
121 | /* Fall Through */ | ||
122 | diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c | ||
123 | index d6d4ed7acf03..13f502587440 100644 | ||
124 | --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c | ||
125 | +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c | ||
126 | @@ -289,7 +289,7 @@ static void e1000_toggle_lanphypc_pch_lpt(struct e1000_hw *hw) | ||
127 | u16 count = 20; | ||
128 | |||
129 | do { | ||
130 | - usleep_range(5000, 10000); | ||
131 | + usleep_range(5000, 6000); | ||
132 | } while (!(er32(CTRL_EXT) & E1000_CTRL_EXT_LPCD) && count--); | ||
133 | |||
134 | msleep(30); | ||
135 | @@ -423,7 +423,7 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw) | ||
136 | /* Ungate automatic PHY configuration on non-managed 82579 */ | ||
137 | if ((hw->mac.type == e1000_pch2lan) && | ||
138 | !(fwsm & E1000_ICH_FWSM_FW_VALID)) { | ||
139 | - usleep_range(10000, 20000); | ||
140 | + usleep_range(10000, 11000); | ||
141 | e1000_gate_hw_phy_config_ich8lan(hw, false); | ||
142 | } | ||
143 | |||
144 | @@ -549,7 +549,7 @@ static s32 e1000_init_phy_params_ich8lan(struct e1000_hw *hw) | ||
145 | phy->id = 0; | ||
146 | while ((e1000_phy_unknown == e1000e_get_phy_type_from_id(phy->id)) && | ||
147 | (i++ < 100)) { | ||
148 | - usleep_range(1000, 2000); | ||
149 | + usleep_range(1000, 1100); | ||
150 | ret_val = e1000e_get_phy_id(hw); | ||
151 | if (ret_val) | ||
152 | return ret_val; | ||
153 | @@ -1262,7 +1262,7 @@ static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force) | ||
154 | goto out; | ||
155 | } | ||
156 | |||
157 | - usleep_range(10000, 20000); | ||
158 | + usleep_range(10000, 11000); | ||
159 | } | ||
160 | e_dbg("ULP_CONFIG_DONE cleared after %dmsec\n", i * 10); | ||
161 | |||
162 | @@ -2014,7 +2014,7 @@ static s32 e1000_check_reset_block_ich8lan(struct e1000_hw *hw) | ||
163 | |||
164 | while ((blocked = !(er32(FWSM) & E1000_ICH_FWSM_RSPCIPHY)) && | ||
165 | (i++ < 30)) | ||
166 | - usleep_range(10000, 20000); | ||
167 | + usleep_range(10000, 11000); | ||
168 | return blocked ? E1000_BLK_PHY_RESET : 0; | ||
169 | } | ||
170 | |||
171 | @@ -2833,7 +2833,7 @@ static s32 e1000_post_phy_reset_ich8lan(struct e1000_hw *hw) | ||
172 | return 0; | ||
173 | |||
174 | /* Allow time for h/w to get to quiescent state after reset */ | ||
175 | - usleep_range(10000, 20000); | ||
176 | + usleep_range(10000, 11000); | ||
177 | |||
178 | /* Perform any necessary post-reset workarounds */ | ||
179 | switch (hw->mac.type) { | ||
180 | @@ -2869,7 +2869,7 @@ static s32 e1000_post_phy_reset_ich8lan(struct e1000_hw *hw) | ||
181 | if (hw->mac.type == e1000_pch2lan) { | ||
182 | /* Ungate automatic PHY configuration on non-managed 82579 */ | ||
183 | if (!(er32(FWSM) & E1000_ICH_FWSM_FW_VALID)) { | ||
184 | - usleep_range(10000, 20000); | ||
185 | + usleep_range(10000, 11000); | ||
186 | e1000_gate_hw_phy_config_ich8lan(hw, false); | ||
187 | } | ||
188 | |||
189 | @@ -3890,7 +3890,7 @@ static s32 e1000_update_nvm_checksum_spt(struct e1000_hw *hw) | ||
190 | */ | ||
191 | if (!ret_val) { | ||
192 | nvm->ops.reload(hw); | ||
193 | - usleep_range(10000, 20000); | ||
194 | + usleep_range(10000, 11000); | ||
195 | } | ||
196 | |||
197 | out: | ||
198 | @@ -4041,7 +4041,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw) | ||
199 | */ | ||
200 | if (!ret_val) { | ||
201 | nvm->ops.reload(hw); | ||
202 | - usleep_range(10000, 20000); | ||
203 | + usleep_range(10000, 11000); | ||
204 | } | ||
205 | |||
206 | out: | ||
207 | @@ -4665,7 +4665,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | ||
208 | ew32(TCTL, E1000_TCTL_PSP); | ||
209 | e1e_flush(); | ||
210 | |||
211 | - usleep_range(10000, 20000); | ||
212 | + usleep_range(10000, 11000); | ||
213 | |||
214 | /* Workaround for ICH8 bit corruption issue in FIFO memory */ | ||
215 | if (hw->mac.type == e1000_ich8lan) { | ||
216 | diff --git a/drivers/net/ethernet/intel/e1000e/mac.c b/drivers/net/ethernet/intel/e1000e/mac.c | ||
217 | index b322011ec282..eecbf7a12735 100644 | ||
218 | --- a/drivers/net/ethernet/intel/e1000e/mac.c | ||
219 | +++ b/drivers/net/ethernet/intel/e1000e/mac.c | ||
220 | @@ -815,7 +815,7 @@ static s32 e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw) | ||
221 | * milliseconds even if the other end is doing it in SW). | ||
222 | */ | ||
223 | for (i = 0; i < FIBER_LINK_UP_LIMIT; i++) { | ||
224 | - usleep_range(10000, 20000); | ||
225 | + usleep_range(10000, 11000); | ||
226 | status = er32(STATUS); | ||
227 | if (status & E1000_STATUS_LU) | ||
228 | break; | ||
229 | diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c | ||
230 | index 327dfe5bedc0..1b7cf8e2030d 100644 | ||
231 | --- a/drivers/net/ethernet/intel/e1000e/netdev.c | ||
232 | +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | ||
233 | @@ -3210,7 +3210,7 @@ static void e1000_configure_rx(struct e1000_adapter *adapter) | ||
234 | if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX)) | ||
235 | ew32(RCTL, rctl & ~E1000_RCTL_EN); | ||
236 | e1e_flush(); | ||
237 | - usleep_range(10000, 20000); | ||
238 | + usleep_range(10000, 11000); | ||
239 | |||
240 | if (adapter->flags2 & FLAG2_DMA_BURST) { | ||
241 | /* set the writeback threshold (only takes effect if the RDTR | ||
242 | @@ -4284,7 +4284,7 @@ void e1000e_down(struct e1000_adapter *adapter, bool reset) | ||
243 | |||
244 | /* flush both disables and wait for them to finish */ | ||
245 | e1e_flush(); | ||
246 | - usleep_range(10000, 20000); | ||
247 | + usleep_range(10000, 11000); | ||
248 | |||
249 | e1000_irq_disable(adapter); | ||
250 | |||
251 | @@ -4322,7 +4322,7 @@ void e1000e_reinit_locked(struct e1000_adapter *adapter) | ||
252 | { | ||
253 | might_sleep(); | ||
254 | while (test_and_set_bit(__E1000_RESETTING, &adapter->state)) | ||
255 | - usleep_range(1000, 2000); | ||
256 | + usleep_range(1000, 1100); | ||
257 | e1000e_down(adapter, true); | ||
258 | e1000e_up(adapter); | ||
259 | clear_bit(__E1000_RESETTING, &adapter->state); | ||
260 | @@ -4697,7 +4697,7 @@ int e1000e_close(struct net_device *netdev) | ||
261 | int count = E1000_CHECK_RESET_COUNT; | ||
262 | |||
263 | while (test_bit(__E1000_RESETTING, &adapter->state) && count--) | ||
264 | - usleep_range(10000, 20000); | ||
265 | + usleep_range(10000, 11000); | ||
266 | |||
267 | WARN_ON(test_bit(__E1000_RESETTING, &adapter->state)); | ||
268 | |||
269 | @@ -6015,7 +6015,7 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu) | ||
270 | } | ||
271 | |||
272 | while (test_and_set_bit(__E1000_RESETTING, &adapter->state)) | ||
273 | - usleep_range(1000, 2000); | ||
274 | + usleep_range(1000, 1100); | ||
275 | /* e1000e_down -> e1000e_reset dependent on max_frame_size & mtu */ | ||
276 | adapter->max_frame_size = max_frame; | ||
277 | e_info("changing MTU from %d to %d\n", netdev->mtu, new_mtu); | ||
278 | @@ -6295,7 +6295,7 @@ static int e1000e_pm_freeze(struct device *dev) | ||
279 | int count = E1000_CHECK_RESET_COUNT; | ||
280 | |||
281 | while (test_bit(__E1000_RESETTING, &adapter->state) && count--) | ||
282 | - usleep_range(10000, 20000); | ||
283 | + usleep_range(10000, 11000); | ||
284 | |||
285 | WARN_ON(test_bit(__E1000_RESETTING, &adapter->state)); | ||
286 | |||
287 | @@ -6710,7 +6710,7 @@ static int e1000e_pm_runtime_suspend(struct device *dev) | ||
288 | int count = E1000_CHECK_RESET_COUNT; | ||
289 | |||
290 | while (test_bit(__E1000_RESETTING, &adapter->state) && count--) | ||
291 | - usleep_range(10000, 20000); | ||
292 | + usleep_range(10000, 11000); | ||
293 | |||
294 | WARN_ON(test_bit(__E1000_RESETTING, &adapter->state)); | ||
295 | |||
296 | diff --git a/drivers/net/ethernet/intel/e1000e/nvm.c b/drivers/net/ethernet/intel/e1000e/nvm.c | ||
297 | index 2efd80dfd88e..38f7c8fb3061 100644 | ||
298 | --- a/drivers/net/ethernet/intel/e1000e/nvm.c | ||
299 | +++ b/drivers/net/ethernet/intel/e1000e/nvm.c | ||
300 | @@ -410,7 +410,7 @@ s32 e1000e_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) | ||
301 | break; | ||
302 | } | ||
303 | } | ||
304 | - usleep_range(10000, 20000); | ||
305 | + usleep_range(10000, 11000); | ||
306 | nvm->ops.release(hw); | ||
307 | } | ||
308 | |||
309 | -- | ||
310 | 2.15.0 | ||
311 | |||
diff --git a/patches/boot_time_opt/0119-e1000e-change-default-policy.patch b/patches/boot_time_opt/0119-e1000e-change-default-policy.patch deleted file mode 100644 index 663f7ae..0000000 --- a/patches/boot_time_opt/0119-e1000e-change-default-policy.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | From 915dc5df4d7f050ee1835f4c302795baa6c51b7e Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Sat, 10 Dec 2016 14:29:52 +0000 | ||
4 | Subject: [PATCH 119/126] e1000e: change default policy | ||
5 | |||
6 | change the default irq mitigation policy for e1000e to be | ||
7 | more HPC/cluster friendly | ||
8 | --- | ||
9 | drivers/net/ethernet/intel/e1000e/param.c | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/drivers/net/ethernet/intel/e1000e/param.c b/drivers/net/ethernet/intel/e1000e/param.c | ||
13 | index 6d8c39abee16..ef1122ad3b98 100644 | ||
14 | --- a/drivers/net/ethernet/intel/e1000e/param.c | ||
15 | +++ b/drivers/net/ethernet/intel/e1000e/param.c | ||
16 | @@ -92,7 +92,7 @@ E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt Delay"); | ||
17 | * Valid Range: 100-100000 or one of: 0=off, 1=dynamic, 3=dynamic conservative | ||
18 | */ | ||
19 | E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate"); | ||
20 | -#define DEFAULT_ITR 3 | ||
21 | +#define DEFAULT_ITR 1 | ||
22 | #define MAX_ITR 100000 | ||
23 | #define MIN_ITR 100 | ||
24 | |||
25 | -- | ||
26 | 2.15.0 | ||
27 | |||
diff --git a/patches/boot_time_opt/0121-do-accept-in-LIFO-order-for-cache-efficiency.patch b/patches/boot_time_opt/0121-do-accept-in-LIFO-order-for-cache-efficiency.patch new file mode 100644 index 0000000..23cbbb8 --- /dev/null +++ b/patches/boot_time_opt/0121-do-accept-in-LIFO-order-for-cache-efficiency.patch | |||
@@ -0,0 +1,89 @@ | |||
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Thu, 13 Dec 2018 01:00:49 +0000 | ||
4 | Subject: [PATCH] do accept() in LIFO order for cache efficiency | ||
5 | |||
6 | --- | ||
7 | include/linux/wait.h | 2 ++ | ||
8 | kernel/sched/wait.c | 24 ++++++++++++++++++++++++ | ||
9 | net/ipv4/inet_connection_sock.c | 2 +- | ||
10 | 3 files changed, 27 insertions(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/include/linux/wait.h b/include/linux/wait.h | ||
13 | index 27fb99cfeb02..9a2c36d081bf 100644 | ||
14 | --- a/include/linux/wait.h | ||
15 | +++ b/include/linux/wait.h | ||
16 | @@ -164,6 +164,7 @@ static inline bool wq_has_sleeper(struct wait_queue_head *wq_head) | ||
17 | |||
18 | extern void add_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry); | ||
19 | extern void add_wait_queue_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry); | ||
20 | +extern void add_wait_queue_exclusive_lifo(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry); | ||
21 | extern void remove_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry); | ||
22 | |||
23 | static inline void __add_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) | ||
24 | @@ -1127,6 +1128,7 @@ do { \ | ||
25 | */ | ||
26 | void prepare_to_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state); | ||
27 | void prepare_to_wait_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state); | ||
28 | +void prepare_to_wait_exclusive_lifo(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state); | ||
29 | long prepare_to_wait_event(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state); | ||
30 | void finish_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry); | ||
31 | long wait_woken(struct wait_queue_entry *wq_entry, unsigned mode, long timeout); | ||
32 | diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c | ||
33 | index 01f5d3020589..6fb633f219c4 100644 | ||
34 | --- a/kernel/sched/wait.c | ||
35 | +++ b/kernel/sched/wait.c | ||
36 | @@ -37,6 +37,17 @@ void add_wait_queue_exclusive(struct wait_queue_head *wq_head, struct wait_queue | ||
37 | } | ||
38 | EXPORT_SYMBOL(add_wait_queue_exclusive); | ||
39 | |||
40 | +void add_wait_queue_exclusive_lifo(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) | ||
41 | +{ | ||
42 | + unsigned long flags; | ||
43 | + | ||
44 | + wq_entry->flags |= WQ_FLAG_EXCLUSIVE; | ||
45 | + spin_lock_irqsave(&wq_head->lock, flags); | ||
46 | + __add_wait_queue(wq_head, wq_entry); | ||
47 | + spin_unlock_irqrestore(&wq_head->lock, flags); | ||
48 | +} | ||
49 | +EXPORT_SYMBOL(add_wait_queue_exclusive_lifo); | ||
50 | + | ||
51 | void remove_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) | ||
52 | { | ||
53 | unsigned long flags; | ||
54 | @@ -263,6 +274,19 @@ prepare_to_wait_exclusive(struct wait_queue_head *wq_head, struct wait_queue_ent | ||
55 | } | ||
56 | EXPORT_SYMBOL(prepare_to_wait_exclusive); | ||
57 | |||
58 | +void prepare_to_wait_exclusive_lifo(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state) | ||
59 | +{ | ||
60 | + unsigned long flags; | ||
61 | + | ||
62 | + wq_entry->flags |= WQ_FLAG_EXCLUSIVE; | ||
63 | + spin_lock_irqsave(&wq_head->lock, flags); | ||
64 | + if (list_empty(&wq_entry->entry)) | ||
65 | + __add_wait_queue(wq_head, wq_entry); | ||
66 | + set_current_state(state); | ||
67 | + spin_unlock_irqrestore(&wq_head->lock, flags); | ||
68 | +} | ||
69 | +EXPORT_SYMBOL(prepare_to_wait_exclusive_lifo); | ||
70 | + | ||
71 | void init_wait_entry(struct wait_queue_entry *wq_entry, int flags) | ||
72 | { | ||
73 | wq_entry->flags = flags; | ||
74 | diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c | ||
75 | index 1dfa561e8f98..f362411fcc93 100644 | ||
76 | --- a/net/ipv4/inet_connection_sock.c | ||
77 | +++ b/net/ipv4/inet_connection_sock.c | ||
78 | @@ -433,7 +433,7 @@ static int inet_csk_wait_for_connect(struct sock *sk, long timeo) | ||
79 | * having to remove and re-insert us on the wait queue. | ||
80 | */ | ||
81 | for (;;) { | ||
82 | - prepare_to_wait_exclusive(sk_sleep(sk), &wait, | ||
83 | + prepare_to_wait_exclusive_lifo(sk_sleep(sk), &wait, | ||
84 | TASK_INTERRUPTIBLE); | ||
85 | release_sock(sk); | ||
86 | if (reqsk_queue_empty(&icsk->icsk_accept_queue)) | ||
87 | -- | ||
88 | https://clearlinux.org | ||
89 | |||
diff --git a/patches/boot_time_opt/0121-igb-no-runtime-pm-to-fix-reboot-oops.patch b/patches/boot_time_opt/0121-igb-no-runtime-pm-to-fix-reboot-oops.patch deleted file mode 100644 index f271c34..0000000 --- a/patches/boot_time_opt/0121-igb-no-runtime-pm-to-fix-reboot-oops.patch +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | From 3600f0a90ddea2a2a8c4a157a0bb70913ae4e640 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Thu, 12 Jan 2017 18:17:14 +0000 | ||
4 | Subject: [PATCH 121/126] disable PM on some NICs | ||
5 | |||
6 | igb: no runtime pm to fix reboot oops | ||
7 | |||
8 | Causes oops on reboot due to a race between runtime resume and shutdown | ||
9 | |||
10 | e1000e: disable PM as it disconects from some NICs | ||
11 | |||
12 | e1000: disable PM just in case | ||
13 | |||
14 | --- | ||
15 | drivers/net/ethernet/intel/igb/igb_main.c | 3 --- | ||
16 | 1 file changed, 3 deletions(-) | ||
17 | |||
18 | diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c | ||
19 | index ea69af267d63..1107b74225b0 100644 | ||
20 | --- a/drivers/net/ethernet/intel/igb/igb_main.c | ||
21 | +++ b/drivers/net/ethernet/intel/igb/igb_main.c | ||
22 | @@ -239,9 +239,6 @@ static struct pci_driver igb_driver = { | ||
23 | .id_table = igb_pci_tbl, | ||
24 | .probe = igb_probe, | ||
25 | .remove = igb_remove, | ||
26 | -#ifdef CONFIG_PM | ||
27 | - .driver.pm = &igb_pm_ops, | ||
28 | -#endif | ||
29 | .shutdown = igb_shutdown, | ||
30 | .sriov_configure = igb_pci_sriov_configure, | ||
31 | .err_handler = &igb_err_handler | ||
32 | diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c | ||
33 | index 1982f7917a8d..6e8e8919f9b9 100644 | ||
34 | --- a/drivers/net/ethernet/intel/e1000/e1000_main.c | ||
35 | +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c | ||
36 | @@ -209,11 +209,6 @@ static struct pci_driver e1000_driver = { | ||
37 | .id_table = e1000_pci_tbl, | ||
38 | .probe = e1000_probe, | ||
39 | .remove = e1000_remove, | ||
40 | -#ifdef CONFIG_PM | ||
41 | - /* Power Management Hooks */ | ||
42 | - .suspend = e1000_suspend, | ||
43 | - .resume = e1000_resume, | ||
44 | -#endif | ||
45 | .shutdown = e1000_shutdown, | ||
46 | .err_handler = &e1000_err_handler | ||
47 | }; | ||
48 | diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c | ||
49 | index 327dfe5bedc0..4f66a91b4026 100644 | ||
50 | --- a/drivers/net/ethernet/intel/e1000e/netdev.c | ||
51 | +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | ||
52 | @@ -7572,9 +7572,6 @@ static struct pci_driver e1000_driver = { | ||
53 | .id_table = e1000_pci_tbl, | ||
54 | .probe = e1000_probe, | ||
55 | .remove = e1000_remove, | ||
56 | - .driver = { | ||
57 | - .pm = &e1000_pm_ops, | ||
58 | - }, | ||
59 | .shutdown = e1000_shutdown, | ||
60 | .err_handler = &e1000_err_handler | ||
61 | }; | ||
62 | -- | ||
63 | 2.15.0 | ||
64 | |||
diff --git a/patches/boot_time_opt/0122-locking-rwsem-spin-faster.patch b/patches/boot_time_opt/0122-locking-rwsem-spin-faster.patch new file mode 100644 index 0000000..b2d76ae --- /dev/null +++ b/patches/boot_time_opt/0122-locking-rwsem-spin-faster.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Sun, 18 Feb 2018 23:35:41 +0000 | ||
4 | Subject: [PATCH] locking: rwsem: spin faster | ||
5 | |||
6 | tweak rwsem owner spinning a bit | ||
7 | --- | ||
8 | kernel/locking/rwsem.c | 4 +++- | ||
9 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c | ||
12 | index a163542d178e..a2a11ccebb58 100644 | ||
13 | --- a/kernel/locking/rwsem.c | ||
14 | +++ b/kernel/locking/rwsem.c | ||
15 | @@ -717,6 +717,7 @@ rwsem_spin_on_owner(struct rw_semaphore *sem, unsigned long nonspinnable) | ||
16 | struct task_struct *new, *owner; | ||
17 | unsigned long flags, new_flags; | ||
18 | enum owner_state state; | ||
19 | + int i = 0; | ||
20 | |||
21 | owner = rwsem_owner_flags(sem, &flags); | ||
22 | state = rwsem_owner_state(owner, flags, nonspinnable); | ||
23 | @@ -750,7 +751,8 @@ rwsem_spin_on_owner(struct rw_semaphore *sem, unsigned long nonspinnable) | ||
24 | break; | ||
25 | } | ||
26 | |||
27 | - cpu_relax(); | ||
28 | + if (i++ > 1000) | ||
29 | + cpu_relax(); | ||
30 | } | ||
31 | rcu_read_unlock(); | ||
32 | |||
33 | -- | ||
34 | https://clearlinux.org | ||
35 | |||
diff --git a/patches/boot_time_opt/0122-tweak-perfbias.patch b/patches/boot_time_opt/0122-tweak-perfbias.patch deleted file mode 100644 index 7dc75d6..0000000 --- a/patches/boot_time_opt/0122-tweak-perfbias.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From 5a2cb154e11490e5ba05975c7a537d0bafb12bba Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Sun, 22 Jan 2017 18:51:13 +0000 | ||
4 | Subject: [PATCH 122/126] tweak perfbias | ||
5 | |||
6 | --- | ||
7 | arch/x86/kernel/cpu/intel.c | 6 +++--- | ||
8 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
9 | |||
10 | diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c | ||
11 | index b720dacac051..c01bb1632cbf 100644 | ||
12 | --- a/arch/x86/kernel/cpu/intel.c | ||
13 | +++ b/arch/x86/kernel/cpu/intel.c | ||
14 | @@ -467,12 +467,12 @@ static void init_intel_energy_perf(struct cpuinfo_x86 *c) | ||
15 | return; | ||
16 | |||
17 | rdmsrl(MSR_IA32_ENERGY_PERF_BIAS, epb); | ||
18 | - if ((epb & 0xF) != ENERGY_PERF_BIAS_PERFORMANCE) | ||
19 | + if ((epb & 0xF) >= ENERGY_PERF_BIAS_NORMAL) | ||
20 | return; | ||
21 | |||
22 | - pr_warn_once("ENERGY_PERF_BIAS: Set to 'normal', was 'performance'\n"); | ||
23 | + pr_warn_once("ENERGY_PERF_BIAS: Set to 'performance', was 'normal'\n"); | ||
24 | pr_warn_once("ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)\n"); | ||
25 | - epb = (epb & ~0xF) | ENERGY_PERF_BIAS_NORMAL; | ||
26 | + epb = (epb & ~0xF) | ENERGY_PERF_BIAS_PERFORMANCE; | ||
27 | wrmsrl(MSR_IA32_ENERGY_PERF_BIAS, epb); | ||
28 | } | ||
29 | |||
30 | -- | ||
31 | 2.15.0 | ||
32 | |||
diff --git a/patches/boot_time_opt/0123-e1000e-increase-pause-and-refresh-time.patch b/patches/boot_time_opt/0123-e1000e-increase-pause-and-refresh-time.patch deleted file mode 100644 index e5f613e..0000000 --- a/patches/boot_time_opt/0123-e1000e-increase-pause-and-refresh-time.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From a5c7b0038c1662ce3a1db76314ba62bca5fae911 Mon Sep 17 00:00:00 2001 | ||
2 | From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
3 | Date: Mon, 27 Mar 2017 16:01:56 -0600 | ||
4 | Subject: [PATCH 123/126] e1000e: increase pause and refresh time | ||
5 | |||
6 | Suggested-by: Tim Pepper <timothy.c.pepper@linux.intel.com> | ||
7 | Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
8 | --- | ||
9 | drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++-- | ||
10 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c | ||
13 | index 1b7cf8e2030d..6785e7321f1e 100644 | ||
14 | --- a/drivers/net/ethernet/intel/e1000e/netdev.c | ||
15 | +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | ||
16 | @@ -4058,12 +4058,12 @@ void e1000e_reset(struct e1000_adapter *adapter) | ||
17 | case e1000_pch_lpt: | ||
18 | case e1000_pch_spt: | ||
19 | case e1000_pch_cnp: | ||
20 | - fc->refresh_time = 0x0400; | ||
21 | + fc->refresh_time = 0xFFFF; | ||
22 | + fc->pause_time = 0xFFFF; | ||
23 | |||
24 | if (adapter->netdev->mtu <= ETH_DATA_LEN) { | ||
25 | fc->high_water = 0x05C20; | ||
26 | fc->low_water = 0x05048; | ||
27 | - fc->pause_time = 0x0650; | ||
28 | break; | ||
29 | } | ||
30 | |||
31 | -- | ||
32 | 2.15.0 | ||
33 | |||
diff --git a/patches/boot_time_opt/0124-print-CPU-that-faults.patch b/patches/boot_time_opt/0124-print-CPU-that-faults.patch new file mode 100644 index 0000000..0bbe9c1 --- /dev/null +++ b/patches/boot_time_opt/0124-print-CPU-that-faults.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Sat, 10 Aug 2019 03:19:04 +0000 | ||
4 | Subject: [PATCH] print CPU that faults | ||
5 | |||
6 | print cpu number when we print a crash | ||
7 | --- | ||
8 | arch/x86/mm/fault.c | 4 ++-- | ||
9 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
10 | |||
11 | diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c | ||
12 | index 9c1545c376e9..b55a36614dad 100644 | ||
13 | --- a/arch/x86/mm/fault.c | ||
14 | +++ b/arch/x86/mm/fault.c | ||
15 | @@ -770,9 +770,9 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code, | ||
16 | if (!printk_ratelimit()) | ||
17 | return; | ||
18 | |||
19 | - printk("%s%s[%d]: segfault at %lx ip %px sp %px error %lx", | ||
20 | + printk("%s%s[%d]: segfault at %lx ip %px sp %px error %lx cpu %i", | ||
21 | loglvl, tsk->comm, task_pid_nr(tsk), address, | ||
22 | - (void *)regs->ip, (void *)regs->sp, error_code); | ||
23 | + (void *)regs->ip, (void *)regs->sp, error_code, raw_smp_processor_id()); | ||
24 | |||
25 | print_vma_addr(KERN_CONT " in ", regs->ip); | ||
26 | |||
27 | -- | ||
28 | https://clearlinux.org | ||
29 | |||
diff --git a/patches/boot_time_opt/0151-mm-Export-do_madvise.patch b/patches/boot_time_opt/0151-mm-Export-do_madvise.patch deleted file mode 100644 index 165f16c..0000000 --- a/patches/boot_time_opt/0151-mm-Export-do_madvise.patch +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | From fc4ee73f68d0e9da4ba61112416849c18d933882 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sebastien Boeuf <sebastien.boeuf@intel.com> | ||
3 | Date: Mon, 23 Jan 2017 15:03:52 -0800 | ||
4 | Subject: [PATCH 151/154] mm: Export do_madvise() | ||
5 | |||
6 | Combined with some interesting flags madvise() system call | ||
7 | allows to free memory more smartly and more efficiently than | ||
8 | we could do with a simple free(). The issue is that is not | ||
9 | available for kernel modules that could need it. | ||
10 | |||
11 | In order to solve this lack of support, this patch exports | ||
12 | do_madvise() so as to make it available to the entire kernel. | ||
13 | The already existing madvise() system call is unchanged and | ||
14 | now relies on this new do_madvise() function. | ||
15 | |||
16 | Suggested-by: Arjan van de Ven <arjan.van.de.ven@intel.com> | ||
17 | Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> | ||
18 | --- | ||
19 | include/linux/mm.h | 2 ++ | ||
20 | mm/madvise.c | 25 +++++++++++++++++++++---- | ||
21 | 2 files changed, 23 insertions(+), 4 deletions(-) | ||
22 | |||
23 | diff --git a/include/linux/mm.h b/include/linux/mm.h | ||
24 | index 43edf659453b..c3153e9ee7ea 100644 | ||
25 | --- a/include/linux/mm.h | ||
26 | +++ b/include/linux/mm.h | ||
27 | @@ -2603,5 +2603,7 @@ void __init setup_nr_node_ids(void); | ||
28 | static inline void setup_nr_node_ids(void) {} | ||
29 | #endif | ||
30 | |||
31 | +extern int do_madvise(unsigned long start, size_t len_in, int behavior); | ||
32 | + | ||
33 | #endif /* __KERNEL__ */ | ||
34 | #endif /* _LINUX_MM_H */ | ||
35 | diff --git a/mm/madvise.c b/mm/madvise.c | ||
36 | index 375cf32087e4..3798dd68692e 100644 | ||
37 | --- a/mm/madvise.c | ||
38 | +++ b/mm/madvise.c | ||
39 | @@ -730,9 +730,7 @@ madvise_behavior_valid(int behavior) | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | - * The madvise(2) system call. | ||
44 | - * | ||
45 | - * Applications can use madvise() to advise the kernel how it should | ||
46 | + * Kernel modules can use do_madvise() to advise the kernel how it should | ||
47 | * handle paging I/O in this VM area. The idea is to help the kernel | ||
48 | * use appropriate read-ahead and caching techniques. The information | ||
49 | * provided is advisory only, and can be safely disregarded by the | ||
50 | @@ -790,7 +788,7 @@ madvise_behavior_valid(int behavior) | ||
51 | * -EBADF - map exists, but area maps something that isn't a file. | ||
52 | * -EAGAIN - a kernel resource was temporarily unavailable. | ||
53 | */ | ||
54 | -SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior) | ||
55 | +int do_madvise(unsigned long start, size_t len_in, int behavior) | ||
56 | { | ||
57 | unsigned long end, tmp; | ||
58 | struct vm_area_struct *vma, *prev; | ||
59 | @@ -885,3 +883,22 @@ SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior) | ||
60 | |||
61 | return error; | ||
62 | } | ||
63 | +EXPORT_SYMBOL_GPL(do_madvise); | ||
64 | + | ||
65 | +/* | ||
66 | + * The madvise(2) system call. | ||
67 | + * | ||
68 | + * Applications can use madvise() system call to advise the kernel how | ||
69 | + * it should handle paging I/O in this VM area. The idea is to help | ||
70 | + * the kernel use appropriate read-ahead and caching techniques. The | ||
71 | + * information provided is advisory only, and can be safely disregarded | ||
72 | + * by the kernel without affecting the correct operation of the application. | ||
73 | + * | ||
74 | + * behavior values are the same than the ones defined in madvise() | ||
75 | + * | ||
76 | + * return values are the same than the ones defined in madvise() | ||
77 | + */ | ||
78 | +SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior) | ||
79 | +{ | ||
80 | + return do_madvise(start, len_in, behavior); | ||
81 | +} | ||
82 | -- | ||
83 | 2.15.0 | ||
84 | |||
diff --git a/patches/boot_time_opt/0152-x86-kvm-Notify-host-to-release-pages.patch b/patches/boot_time_opt/0152-x86-kvm-Notify-host-to-release-pages.patch deleted file mode 100644 index d3a1553..0000000 --- a/patches/boot_time_opt/0152-x86-kvm-Notify-host-to-release-pages.patch +++ /dev/null | |||
@@ -1,184 +0,0 @@ | |||
1 | From 771ee703122aa119bb662208066040f8b9356986 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sebastien Boeuf <sebastien.boeuf@intel.com> | ||
3 | Date: Mon, 23 Jan 2017 15:08:55 -0800 | ||
4 | Subject: [PATCH 152/154] x86: kvm: Notify host to release pages | ||
5 | |||
6 | In context of hypervisors managing several virtual machines, we | ||
7 | want those virtual machines to give the memory they used back to | ||
8 | the host when they don't need it anymore. | ||
9 | |||
10 | This patch introduces a new hypercall KVM_HC_RETURN_MEM, allowing | ||
11 | the guest kernel to notify the host kernel when such event occurs. | ||
12 | And relying on do_madvise() function that we have previously exported, | ||
13 | it issues a call to this function when it receives the new hypercall. | ||
14 | |||
15 | Use of do_madvise() with MADV_DONTNEED flag will allow the guest to | ||
16 | ask for a new page without going through a new hypercall. Instead, | ||
17 | it will be able to start using that memory again as it will get | ||
18 | faulted back in as a fresh new page. That's why do_madvise() is more | ||
19 | efficient than doing vm_unmap() to return some memory to the host. | ||
20 | |||
21 | This patch introduces also a new sysctl kvm_madv_instant_free, | ||
22 | allowing user to set MADV_FREE advice instead of MADV_DONTNEED. | ||
23 | Indeed, MADV_FREE saves more performances than using MADV_DONTNEED | ||
24 | because it does not zero the pages in case the memory has not been | ||
25 | freed by the kernel. This can happen when there was no need for the | ||
26 | kernel to get this memory back, meaning it was keeping those pages | ||
27 | in the right state to be re-used by the same application. | ||
28 | MADV_FREE being a very recent advice introduced in kernel 4.5, we | ||
29 | only want to enable it through a sysctl in case the user want to | ||
30 | use it. | ||
31 | |||
32 | Suggested-by: Arjan van de Ven <arjan.van.de.ven@intel.com> | ||
33 | Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> | ||
34 | |||
35 | Modified for aufs4 enabled kernel | ||
36 | Signed-off-by: Martin Borg <martin.borg@enea.com> | ||
37 | --- | ||
38 | arch/x86/kvm/x86.c | 17 +++++++++++++++++ | ||
39 | include/linux/mm.h | 5 +++++ | ||
40 | include/uapi/linux/kvm_para.h | 3 +++ | ||
41 | kernel/sysctl.c | 7 +++++++ | ||
42 | mm/Makefile | 2 +- | ||
43 | mm/kvm.c | 26 ++++++++++++++++++++++++++ | ||
44 | 6 files changed, 59 insertions(+), 1 deletion(-) | ||
45 | create mode 100644 mm/kvm.c | ||
46 | |||
47 | diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c | ||
48 | index 03869eb7fcd6..628bad46b8ad 100644 | ||
49 | --- a/arch/x86/kvm/x86.c | ||
50 | +++ b/arch/x86/kvm/x86.c | ||
51 | @@ -45,6 +45,7 @@ | ||
52 | #include <linux/user-return-notifier.h> | ||
53 | #include <linux/srcu.h> | ||
54 | #include <linux/slab.h> | ||
55 | +#include <linux/mm.h> | ||
56 | #include <linux/perf_event.h> | ||
57 | #include <linux/uaccess.h> | ||
58 | #include <linux/hash.h> | ||
59 | @@ -6253,6 +6254,19 @@ static void kvm_pv_kick_cpu_op(struct kvm *kvm, unsigned long flags, int apicid) | ||
60 | kvm_irq_delivery_to_apic(kvm, NULL, &lapic_irq, NULL); | ||
61 | } | ||
62 | |||
63 | +static int kvm_pv_return_mem_op(struct kvm *kvm, gpa_t gpa, size_t len) | ||
64 | +{ | ||
65 | + unsigned long start = gfn_to_hva(kvm, gpa_to_gfn(gpa)); | ||
66 | + | ||
67 | + if (len > KVM_MAX_RET_MEM_SIZE) | ||
68 | + return KVM_EPERM; | ||
69 | + | ||
70 | + if (kvm_is_error_hva(start + len)) | ||
71 | + return KVM_EFAULT; | ||
72 | + | ||
73 | + return do_madvise(start, len, kvm_ret_mem_advice); | ||
74 | +} | ||
75 | + | ||
76 | void kvm_vcpu_deactivate_apicv(struct kvm_vcpu *vcpu) | ||
77 | { | ||
78 | vcpu->arch.apicv_active = false; | ||
79 | @@ -6304,6 +6318,9 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu) | ||
80 | ret = kvm_pv_clock_pairing(vcpu, a0, a1); | ||
81 | break; | ||
82 | #endif | ||
83 | + case KVM_HC_RETURN_MEM: | ||
84 | + ret = kvm_pv_return_mem_op(vcpu->kvm, a0, a1); | ||
85 | + break; | ||
86 | default: | ||
87 | ret = -KVM_ENOSYS; | ||
88 | break; | ||
89 | diff --git a/include/linux/mm.h b/include/linux/mm.h | ||
90 | index c3153e9ee7ea..15e02bf3a6b3 100644 | ||
91 | --- a/include/linux/mm.h | ||
92 | +++ b/include/linux/mm.h | ||
93 | @@ -2452,6 +2452,11 @@ extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm); | ||
94 | extern int sysctl_drop_caches; | ||
95 | int drop_caches_sysctl_handler(struct ctl_table *, int, | ||
96 | void __user *, size_t *, loff_t *); | ||
97 | +extern int sysctl_kvm_madv_instant_free; | ||
98 | +extern int kvm_ret_mem_advice; | ||
99 | +int kvm_madv_instant_free_sysctl_handler(struct ctl_table *table, int write, | ||
100 | + void __user *buffer, size_t *length, | ||
101 | + loff_t *ppos); | ||
102 | #endif | ||
103 | |||
104 | void drop_slab(void); | ||
105 | diff --git a/include/uapi/linux/kvm_para.h b/include/uapi/linux/kvm_para.h | ||
106 | index dcf629dd2889..85f9422fe59c 100644 | ||
107 | --- a/include/uapi/linux/kvm_para.h | ||
108 | +++ b/include/uapi/linux/kvm_para.h | ||
109 | @@ -26,6 +26,9 @@ | ||
110 | #define KVM_HC_MIPS_EXIT_VM 7 | ||
111 | #define KVM_HC_MIPS_CONSOLE_OUTPUT 8 | ||
112 | #define KVM_HC_CLOCK_PAIRING 9 | ||
113 | +#define KVM_HC_RETURN_MEM 10 | ||
114 | + | ||
115 | +#define KVM_MAX_RET_MEM_SIZE (1 << 22) // 4MiB | ||
116 | |||
117 | /* | ||
118 | * hypercalls use architecture specific | ||
119 | diff --git a/kernel/sysctl.c b/kernel/sysctl.c | ||
120 | index d9c31bc2eaea..9a1611f92a2a 100644 | ||
121 | --- a/kernel/sysctl.c | ||
122 | +++ b/kernel/sysctl.c | ||
123 | @@ -1410,6 +1410,13 @@ static struct ctl_table vm_table[] = { | ||
124 | .extra1 = &one, | ||
125 | .extra2 = &four, | ||
126 | }, | ||
127 | + { | ||
128 | + .procname = "kvm_madv_instant_free", | ||
129 | + .data = &sysctl_kvm_madv_instant_free, | ||
130 | + .maxlen = sizeof(int), | ||
131 | + .mode = 0644, | ||
132 | + .proc_handler = kvm_madv_instant_free_sysctl_handler, | ||
133 | + }, | ||
134 | #ifdef CONFIG_COMPACTION | ||
135 | { | ||
136 | .procname = "compact_memory", | ||
137 | diff --git a/mm/Makefile b/mm/Makefile | ||
138 | index 4659b93cba43..77b145de8a55 100644 | ||
139 | --- a/mm/Makefile | ||
140 | +++ b/mm/Makefile | ||
141 | @@ -40,7 +40,7 @@ obj-y := filemap.o mempool.o oom_kill.o \ | ||
142 | mm_init.o mmu_context.o percpu.o slab_common.o \ | ||
143 | compaction.o vmacache.o swap_slots.o \ | ||
144 | interval_tree.o list_lru.o workingset.o \ | ||
145 | - prfile.o debug.o $(mmu-y) | ||
146 | + prfile.o debug.o kvm.o $(mmu-y) | ||
147 | |||
148 | obj-y += init-mm.o | ||
149 | |||
150 | diff --git a/mm/kvm.c b/mm/kvm.c | ||
151 | new file mode 100644 | ||
152 | index 000000000000..1c5600788221 | ||
153 | --- /dev/null | ||
154 | +++ b/mm/kvm.c | ||
155 | @@ -0,0 +1,26 @@ | ||
156 | +#include <linux/mman.h> | ||
157 | +#include <linux/sysctl.h> | ||
158 | + | ||
159 | +int sysctl_kvm_madv_instant_free; | ||
160 | + | ||
161 | +int kvm_ret_mem_advice = MADV_DONTNEED; | ||
162 | +EXPORT_SYMBOL_GPL(kvm_ret_mem_advice); | ||
163 | + | ||
164 | +int kvm_madv_instant_free_sysctl_handler(struct ctl_table *table, int write, | ||
165 | + void __user *buffer, size_t *length, loff_t *ppos) | ||
166 | +{ | ||
167 | + int ret; | ||
168 | + | ||
169 | + ret = proc_dointvec(table, write, buffer, length, ppos); | ||
170 | + if (ret) | ||
171 | + return ret; | ||
172 | + | ||
173 | +#ifdef MADV_FREE | ||
174 | + if (sysctl_kvm_madv_instant_free > 0) | ||
175 | + kvm_ret_mem_advice = MADV_FREE; | ||
176 | + else | ||
177 | + kvm_ret_mem_advice = MADV_DONTNEED; | ||
178 | +#endif | ||
179 | + | ||
180 | + return 0; | ||
181 | +} | ||
182 | -- | ||
183 | 2.15.0 | ||
184 | |||
diff --git a/patches/boot_time_opt/0153-x86-Return-memory-from-guest-to-host-kernel.patch b/patches/boot_time_opt/0153-x86-Return-memory-from-guest-to-host-kernel.patch deleted file mode 100644 index 7e24355..0000000 --- a/patches/boot_time_opt/0153-x86-Return-memory-from-guest-to-host-kernel.patch +++ /dev/null | |||
@@ -1,155 +0,0 @@ | |||
1 | From 9d487e5b95627e54c5ba256363ab6d1c5eaa592d Mon Sep 17 00:00:00 2001 | ||
2 | From: Sebastien Boeuf <sebastien.boeuf@intel.com> | ||
3 | Date: Mon, 23 Jan 2017 15:26:13 -0800 | ||
4 | Subject: [PATCH 153/154] x86: Return memory from guest to host kernel | ||
5 | |||
6 | All virtual machines need memory to perform various tasks, but this | ||
7 | memory is not released to the host after it is not used anymore. We | ||
8 | have to wait for the termination of the virtual machine to get this | ||
9 | memory back into the host. | ||
10 | |||
11 | Ballooning mechanism is close but not designed for the same purpose. | ||
12 | In case we hit memory limits of the system, the host predicts how much | ||
13 | memory can be asked back from a guest, and it issues an hypercall to | ||
14 | retrieve this memory. | ||
15 | |||
16 | The solution proposed is different because it does not wait for host | ||
17 | needs before to return memory, and it knows precisely how much memory | ||
18 | it can return. | ||
19 | |||
20 | The way to notify the host side about such a return is to rely on | ||
21 | the new hypercall KVM_HC_RETURN_MEM. In order to avoid the CPU to be | ||
22 | overloaded with too many hypercalls, we only return memory blocks of | ||
23 | order 7 (512k blocks) and higher. This value has been found running | ||
24 | memory tests using multiple threads allocating/freeing high amount | ||
25 | of memory. Those tests were run for different order values, and 7 was | ||
26 | the best tradeoff between the number of hypercalls issued and the | ||
27 | amount of memory returned to the host. | ||
28 | |||
29 | In order to limit performances impact related to this code addition, | ||
30 | we check for blocks of order 7 or higher. This means it only costs an | ||
31 | additional function call and a branch to perform this check. | ||
32 | |||
33 | Furthermore, this code has been added to the "merge" codepath of the | ||
34 | buddy allocator, which is not as sensitive as the "free" codepath. | ||
35 | Not all blocks going through the "free" codepath will end up in the | ||
36 | "merge" codepath because some of them won't find their free buddy. | ||
37 | But this is a negligible amount since the kernel does not use many | ||
38 | high order blocks directly. Instead, those bigger blocks are often | ||
39 | broken into smaller chunks used as low order blocks. At the time | ||
40 | those small blocks are released, they go through the merge path. | ||
41 | |||
42 | Benchmarks such as ebizzy and will-it-scale have been run in order | ||
43 | to make sure this patch does not affect kernel performances and no | ||
44 | significant differences were observed. | ||
45 | |||
46 | Suggested-by: Arjan van de Ven <arjan.van.de.ven@intel.com> | ||
47 | Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> | ||
48 | --- | ||
49 | arch/x86/include/asm/kvm_para.h | 22 ++++++++++++++++++++++ | ||
50 | arch/x86/kernel/kvm.c | 10 ++++++++++ | ||
51 | include/linux/mm-arch-hooks.h | 8 ++++++++ | ||
52 | mm/page_alloc.c | 2 ++ | ||
53 | 4 files changed, 42 insertions(+) | ||
54 | |||
55 | diff --git a/arch/x86/include/asm/kvm_para.h b/arch/x86/include/asm/kvm_para.h | ||
56 | index c373e44049b1..847f17ff111c 100644 | ||
57 | --- a/arch/x86/include/asm/kvm_para.h | ||
58 | +++ b/arch/x86/include/asm/kvm_para.h | ||
59 | @@ -93,6 +93,28 @@ void kvm_async_pf_task_wait(u32 token, int interrupt_kernel); | ||
60 | void kvm_async_pf_task_wake(u32 token); | ||
61 | u32 kvm_read_and_reset_pf_reason(void); | ||
62 | extern void kvm_disable_steal_time(void); | ||
63 | +void kvm_arch_return_memory(struct page *page, unsigned int order); | ||
64 | + | ||
65 | +/* | ||
66 | + * This order has been found in an empirical way, running memory tests | ||
67 | + * through many iterations to assess the number of hypercalls issued | ||
68 | + * and the amount of memory returned. In case you change this order to | ||
69 | + * 6 or 8, it should not impact your performances significantly. | ||
70 | + * | ||
71 | + * Smaller values lead to less memory waste, but consume more CPU on | ||
72 | + * hypercalls. Larger values use less CPU, but do not as precisely | ||
73 | + * inform the hypervisor of which memory is free. | ||
74 | + */ | ||
75 | +#define RET_MEM_BUDDY_ORDER 7 | ||
76 | + | ||
77 | +static inline void arch_buddy_merge(struct page *page, unsigned int order) | ||
78 | +{ | ||
79 | + if (order < RET_MEM_BUDDY_ORDER) | ||
80 | + return; | ||
81 | + | ||
82 | + kvm_arch_return_memory(page, order); | ||
83 | +} | ||
84 | +#define arch_buddy_merge arch_buddy_merge | ||
85 | |||
86 | #ifdef CONFIG_PARAVIRT_SPINLOCKS | ||
87 | void __init kvm_spinlock_init(void); | ||
88 | diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c | ||
89 | index 8bb9594d0761..696319728469 100644 | ||
90 | --- a/arch/x86/kernel/kvm.c | ||
91 | +++ b/arch/x86/kernel/kvm.c | ||
92 | @@ -563,6 +563,16 @@ static __init int activate_jump_labels(void) | ||
93 | } | ||
94 | arch_initcall(activate_jump_labels); | ||
95 | |||
96 | +void kvm_arch_return_memory(struct page *page, unsigned int order) | ||
97 | +{ | ||
98 | + if (!kvm_para_available()) | ||
99 | + return; | ||
100 | + | ||
101 | + kvm_hypercall2(KVM_HC_RETURN_MEM, | ||
102 | + page_to_phys(page), | ||
103 | + PAGE_SIZE << order); | ||
104 | +} | ||
105 | + | ||
106 | #ifdef CONFIG_PARAVIRT_SPINLOCKS | ||
107 | |||
108 | /* Kick a cpu by its apicid. Used to wake up a halted vcpu */ | ||
109 | diff --git a/include/linux/mm-arch-hooks.h b/include/linux/mm-arch-hooks.h | ||
110 | index 4efc3f56e6df..26eb3a05a8a3 100644 | ||
111 | --- a/include/linux/mm-arch-hooks.h | ||
112 | +++ b/include/linux/mm-arch-hooks.h | ||
113 | @@ -12,6 +12,7 @@ | ||
114 | #define _LINUX_MM_ARCH_HOOKS_H | ||
115 | |||
116 | #include <asm/mm-arch-hooks.h> | ||
117 | +#include <asm/kvm_para.h> | ||
118 | |||
119 | #ifndef arch_remap | ||
120 | static inline void arch_remap(struct mm_struct *mm, | ||
121 | @@ -22,4 +23,11 @@ static inline void arch_remap(struct mm_struct *mm, | ||
122 | #define arch_remap arch_remap | ||
123 | #endif | ||
124 | |||
125 | +#ifndef arch_buddy_merge | ||
126 | +static inline void arch_buddy_merge(struct page *page, unsigned int order) | ||
127 | +{ | ||
128 | +} | ||
129 | +#define arch_buddy_merge arch_buddy_merge | ||
130 | +#endif | ||
131 | + | ||
132 | #endif /* _LINUX_MM_ARCH_HOOKS_H */ | ||
133 | diff --git a/mm/page_alloc.c b/mm/page_alloc.c | ||
134 | index 77e4d3c5c57b..b14190aeedff 100644 | ||
135 | --- a/mm/page_alloc.c | ||
136 | +++ b/mm/page_alloc.c | ||
137 | @@ -65,6 +65,7 @@ | ||
138 | #include <linux/page_owner.h> | ||
139 | #include <linux/kthread.h> | ||
140 | #include <linux/memcontrol.h> | ||
141 | +#include <linux/mm-arch-hooks.h> | ||
142 | #include <linux/ftrace.h> | ||
143 | #include <linux/lockdep.h> | ||
144 | #include <linux/nmi.h> | ||
145 | @@ -869,6 +870,7 @@ static inline void __free_one_page(struct page *page, | ||
146 | } | ||
147 | |||
148 | done_merging: | ||
149 | + arch_buddy_merge(page, order); | ||
150 | set_page_order(page, order); | ||
151 | |||
152 | /* | ||
153 | -- | ||
154 | 2.15.0 | ||
155 | |||
diff --git a/patches/boot_time_opt/0154-sysctl-vm-Fine-grained-cache-shrinking.patch b/patches/boot_time_opt/0154-sysctl-vm-Fine-grained-cache-shrinking.patch deleted file mode 100644 index 64021c6..0000000 --- a/patches/boot_time_opt/0154-sysctl-vm-Fine-grained-cache-shrinking.patch +++ /dev/null | |||
@@ -1,137 +0,0 @@ | |||
1 | From 130d5d976b920aec243e0fa63273f3143660054b Mon Sep 17 00:00:00 2001 | ||
2 | From: Sebastien Boeuf <sebastien.boeuf@intel.com> | ||
3 | Date: Mon, 23 Jan 2017 15:32:39 -0800 | ||
4 | Subject: [PATCH 154/154] sysctl: vm: Fine-grained cache shrinking | ||
5 | |||
6 | Lots of virtual machines are let in idle state for days until they | ||
7 | are terminated, and they can keep a large amount of memory in their | ||
8 | cache, meaning this memory cannot be used by other processes. | ||
9 | |||
10 | We tried to release this memory using existing drop_caches sysctl, | ||
11 | but it led to the complete cache loss while it could have been used | ||
12 | whether the idle process wakes up. Indeed, the process can't find any | ||
13 | available cached data and it directly affects performances to rebuild | ||
14 | it from scratch. | ||
15 | |||
16 | Instead, the solution we want is based on shrinking gradually system | ||
17 | cache over time. This patch adds a new sysctl shrink_caches_mb so as | ||
18 | to allow userspace applications indicating the kernel it should shrink | ||
19 | system cache up to the amount (in MiB) specified. | ||
20 | |||
21 | There is an application called "memshrinker" which uses this new | ||
22 | mechanism. It runs in the background and periodically releases a | ||
23 | specified amount of cache. This amount is based on the remaining | ||
24 | cache on the system, and period is computed to follow a shrinking | ||
25 | model. It results in saving a lot of memory for other processes | ||
26 | running on the system. | ||
27 | |||
28 | Suggested-by: Arjan van de Ven <arjan.van.de.ven@intel.com> | ||
29 | Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> | ||
30 | --- | ||
31 | fs/drop_caches.c | 25 +++++++++++++++++++++++++ | ||
32 | include/linux/mm.h | 4 ++++ | ||
33 | kernel/sysctl.c | 8 ++++++++ | ||
34 | mm/vmscan.c | 2 -- | ||
35 | 4 files changed, 37 insertions(+), 2 deletions(-) | ||
36 | |||
37 | diff --git a/fs/drop_caches.c b/fs/drop_caches.c | ||
38 | index 82377017130f..f8de1383498b 100644 | ||
39 | --- a/fs/drop_caches.c | ||
40 | +++ b/fs/drop_caches.c | ||
41 | @@ -9,10 +9,12 @@ | ||
42 | #include <linux/writeback.h> | ||
43 | #include <linux/sysctl.h> | ||
44 | #include <linux/gfp.h> | ||
45 | +#include <linux/swap.h> | ||
46 | #include "internal.h" | ||
47 | |||
48 | /* A global variable is a bit ugly, but it keeps the code simple */ | ||
49 | int sysctl_drop_caches; | ||
50 | +int sysctl_shrink_caches_mb; | ||
51 | |||
52 | static void drop_pagecache_sb(struct super_block *sb, void *unused) | ||
53 | { | ||
54 | @@ -68,3 +70,26 @@ int drop_caches_sysctl_handler(struct ctl_table *table, int write, | ||
55 | } | ||
56 | return 0; | ||
57 | } | ||
58 | + | ||
59 | +int shrink_caches_sysctl_handler(struct ctl_table *table, int write, | ||
60 | + void __user *buffer, size_t *length, loff_t *ppos) | ||
61 | +{ | ||
62 | + int ret; | ||
63 | + unsigned long nr_to_reclaim, page_reclaimed; | ||
64 | + | ||
65 | + ret = proc_dointvec_minmax(table, write, buffer, length, ppos); | ||
66 | + if (ret) | ||
67 | + return ret; | ||
68 | + | ||
69 | + nr_to_reclaim = sysctl_shrink_caches_mb * (1 << 20) / PAGE_SIZE; | ||
70 | + if (write) { | ||
71 | + page_reclaimed = shrink_all_memory(nr_to_reclaim); | ||
72 | + if (page_reclaimed > 0) | ||
73 | + lru_add_drain_all(); | ||
74 | + | ||
75 | + if (page_reclaimed != nr_to_reclaim) | ||
76 | + return page_reclaimed; | ||
77 | + } | ||
78 | + | ||
79 | + return 0; | ||
80 | +} | ||
81 | diff --git a/include/linux/mm.h b/include/linux/mm.h | ||
82 | index 15e02bf3a6b3..9f9b967ad2c9 100644 | ||
83 | --- a/include/linux/mm.h | ||
84 | +++ b/include/linux/mm.h | ||
85 | @@ -2457,6 +2457,10 @@ extern int kvm_ret_mem_advice; | ||
86 | int kvm_madv_instant_free_sysctl_handler(struct ctl_table *table, int write, | ||
87 | void __user *buffer, size_t *length, | ||
88 | loff_t *ppos); | ||
89 | +extern int sysctl_shrink_caches_mb; | ||
90 | +int shrink_caches_sysctl_handler(struct ctl_table *table, int write, | ||
91 | + void __user *buffer, size_t *length, | ||
92 | + loff_t *ppos); | ||
93 | #endif | ||
94 | |||
95 | void drop_slab(void); | ||
96 | diff --git a/kernel/sysctl.c b/kernel/sysctl.c | ||
97 | index 9a1611f92a2a..9b74b4f0251d 100644 | ||
98 | --- a/kernel/sysctl.c | ||
99 | +++ b/kernel/sysctl.c | ||
100 | @@ -1417,6 +1417,14 @@ static struct ctl_table vm_table[] = { | ||
101 | .mode = 0644, | ||
102 | .proc_handler = kvm_madv_instant_free_sysctl_handler, | ||
103 | }, | ||
104 | + { | ||
105 | + .procname = "shrink_caches_mb", | ||
106 | + .data = &sysctl_shrink_caches_mb, | ||
107 | + .maxlen = sizeof(int), | ||
108 | + .mode = 0644, | ||
109 | + .proc_handler = shrink_caches_sysctl_handler, | ||
110 | + .extra1 = &one, | ||
111 | + }, | ||
112 | #ifdef CONFIG_COMPACTION | ||
113 | { | ||
114 | .procname = "compact_memory", | ||
115 | diff --git a/mm/vmscan.c b/mm/vmscan.c | ||
116 | index eb2f0315b8c0..b16f327b0211 100644 | ||
117 | --- a/mm/vmscan.c | ||
118 | +++ b/mm/vmscan.c | ||
119 | @@ -3646,7 +3646,6 @@ void wakeup_kswapd(struct zone *zone, int order, enum zone_type classzone_idx) | ||
120 | wake_up_interruptible(&pgdat->kswapd_wait); | ||
121 | } | ||
122 | |||
123 | -#ifdef CONFIG_HIBERNATION | ||
124 | /* | ||
125 | * Try to free `nr_to_reclaim' of memory, system-wide, and return the number of | ||
126 | * freed pages. | ||
127 | @@ -3686,7 +3685,6 @@ unsigned long shrink_all_memory(unsigned long nr_to_reclaim) | ||
128 | |||
129 | return nr_reclaimed; | ||
130 | } | ||
131 | -#endif /* CONFIG_HIBERNATION */ | ||
132 | |||
133 | /* It's optimal to keep kswapds on the same CPUs as their memory, but | ||
134 | not required for correctness. So if the last cpu in a node goes | ||
135 | -- | ||
136 | 2.15.0 | ||
137 | |||
diff --git a/patches/boot_time_opt/host_boot_time_opt.scc b/patches/boot_time_opt/host_boot_time_opt.scc index 21bde01..4afc969 100644 --- a/patches/boot_time_opt/host_boot_time_opt.scc +++ b/patches/boot_time_opt/host_boot_time_opt.scc | |||
@@ -1,28 +1,20 @@ | |||
1 | define KFEATURE_DESCRIPTION "Boot time optimization changes ported from ClearLinux, https://github.com/clearlinux-pkgs/linux-lts and https://github.com/clearlinux-pkgs/linux-kvm" | 1 | define KFEATURE_DESCRIPTION "Boot time optimization changes ported from ClearLinux, https://github.com/clearlinux-pkgs/linux/tree/5.10.32-1034" |
2 | define KFEATURE_COMPATIBILITY all | 2 | define KFEATURE_COMPATIBILITY all |
3 | 3 | ||
4 | patch 0101-i8042-decrease-debug-message-level-to-info.patch | 4 | patch 0101-i8042-decrease-debug-message-level-to-info.patch |
5 | patch 0103-Increase-the-ext4-default-commit-age.patch | 5 | patch 0102-increase-the-ext4-default-commit-age.patch |
6 | patch 0104-silence-rapl.patch | 6 | patch 0103-silence-rapl.patch |
7 | patch 0105-pci-pme-wakeups.patch | 7 | patch 0104-pci-pme-wakeups.patch |
8 | patch 0106-ksm-wakeups.patch | 8 | patch 0105-ksm-wakeups.patch |
9 | patch 0107-intel_idle-tweak-cpuidle-cstates.patch | 9 | patch 0106-intel_idle-tweak-cpuidle-cstates.patch |
10 | patch 0109-init_task-faster-timerslack.patch | 10 | patch 0107-bootstats-add-printk-s-to-measure-boot-time-in-more-.patch |
11 | patch 0110-fs-ext4-fsync-optimize-double-fsync-a-bunch.patch | 11 | patch 0108-smpboot-reuse-timer-calibration.patch |
12 | patch 0111-overload-on-wakeup.patch | 12 | patch 0109-initialize-ata-before-graphics.patch |
13 | patch 0112-bootstats-add-printk-s-to-measure-boot-time-in-more-.patch | 13 | patch 0110-give-rdrand-some-credit.patch |
14 | patch 0113-fix-initcall-timestamps.patch | 14 | patch 0111-ipv4-tcp-allow-the-memory-tuning-for-tcp-to-go-a-lit.patch |
15 | patch 0114-smpboot-reuse-timer-calibration.patch | 15 | patch 0112-kernel-time-reduce-ntp-wakeups.patch |
16 | patch 0116-Initialize-ata-before-graphics.patch | 16 | patch 0113-init-wait-for-partition-and-retry-scan.patch |
17 | patch 0117-reduce-e1000e-boot-time-by-tightening-sleep-ranges.patch | 17 | patch 0117-migrate-some-systemd-defaults-to-the-kernel-defaults.patch |
18 | patch 0118-give-rdrand-some-credit.patch | 18 | patch 0121-do-accept-in-LIFO-order-for-cache-efficiency.patch |
19 | patch 0119-e1000e-change-default-policy.patch | 19 | patch 0122-locking-rwsem-spin-faster.patch |
20 | patch 0120-ipv4-tcp-allow-the-memory-tuning-for-tcp-to-go-a-lit.patch | 20 | patch 0124-print-CPU-that-faults.patch |
21 | patch 0121-igb-no-runtime-pm-to-fix-reboot-oops.patch | ||
22 | patch 0122-tweak-perfbias.patch | ||
23 | patch 0123-e1000e-increase-pause-and-refresh-time.patch | ||
24 | |||
25 | patch 0151-mm-Export-do_madvise.patch | ||
26 | patch 0152-x86-kvm-Notify-host-to-release-pages.patch | ||
27 | patch 0153-x86-Return-memory-from-guest-to-host-kernel.patch | ||
28 | patch 0154-sysctl-vm-Fine-grained-cache-shrinking.patch | ||