diff options
| author | Martin Borg <martin.borg@enea.com> | 2018-05-09 15:29:03 +0200 |
|---|---|---|
| committer | Adrian Dudau <adrian.dudau@enea.com> | 2018-05-14 09:39:34 +0200 |
| commit | b1abf1299c2f635db21370f989ac9dc2ecbe4189 (patch) | |
| tree | fb00d3239d07fdbe6de827149560ecc0f0ecd964 | |
| parent | 5ee606c13d87fb454c6755b8bf55fa984428d87f (diff) | |
| download | enea-kernel-cache-b1abf1299c2f635db21370f989ac9dc2ecbe4189.tar.gz | |
boot_time_opt_guest: update guest boot time optimization patches for 4.14
The new patches are based on:
https://github.com/clearlinux-pkgs/linux-kvm
commit 5a0a30430116735fecb22b269e4ca10a08147d8d
Signed-off-by: Martin Borg <martin.borg@enea.com>
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
19 files changed, 181 insertions, 414 deletions
diff --git a/patches/boot_time_opt_guest/0102-cpuidle-skip-synchronize_rcu-on-single-CPU-systems.patch b/patches/boot_time_opt_guest/0102-cpuidle-skip-synchronize_rcu-on-single-CPU-systems.patch deleted file mode 100644 index 1de2a6b..0000000 --- a/patches/boot_time_opt_guest/0102-cpuidle-skip-synchronize_rcu-on-single-CPU-systems.patch +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | From 6b0fb5b2a7a157c04d8ab6ad71b092034d0048bf Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
| 3 | Date: Wed, 11 Feb 2015 16:19:26 -0600 | ||
| 4 | Subject: [PATCH 102/114] cpuidle: skip synchronize_rcu() on single CPU systems | ||
| 5 | |||
| 6 | synchronize_rcu() is pretty expensive, and on single CPU systems we don't need | ||
| 7 | it in this specific case, so skip it. | ||
| 8 | |||
| 9 | Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> | ||
| 10 | Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
| 11 | --- | ||
| 12 | drivers/cpuidle/cpuidle.c | 5 ++++- | ||
| 13 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
| 14 | |||
| 15 | diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c | ||
| 16 | index 62810ff3b00f..f1d110411098 100644 | ||
| 17 | --- a/drivers/cpuidle/cpuidle.c | ||
| 18 | +++ b/drivers/cpuidle/cpuidle.c | ||
| 19 | @@ -324,8 +324,11 @@ void cpuidle_uninstall_idle_handler(void) | ||
| 20 | /* | ||
| 21 | * Make sure external observers (such as the scheduler) | ||
| 22 | * are done looking at pointed idle states. | ||
| 23 | + * This is only relevant if there is more than one cpu, | ||
| 24 | + * if there is only one CPU, that is us... and we're | ||
| 25 | + * coherent to ourselves. | ||
| 26 | */ | ||
| 27 | - synchronize_rcu(); | ||
| 28 | + | ||
| 29 | } | ||
| 30 | |||
| 31 | /** | ||
| 32 | -- | ||
| 33 | 2.11.1 | ||
| 34 | |||
diff --git a/patches/boot_time_opt_guest/0103-sysrq-skip-synchronize_rcu-if-there-is-no-old-op.patch b/patches/boot_time_opt_guest/0102-sysrq-skip-synchronize_rcu-if-there-is-no-old-op.patch index d3a20fb..9cc08f3 100644 --- a/patches/boot_time_opt_guest/0103-sysrq-skip-synchronize_rcu-if-there-is-no-old-op.patch +++ b/patches/boot_time_opt_guest/0102-sysrq-skip-synchronize_rcu-if-there-is-no-old-op.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From 7be707833bb35c295eb702d13cf73ac9390e4b31 Mon Sep 17 00:00:00 2001 | 1 | From 092250008c4240d58086102bd63baf56ad400feb 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: Wed, 11 Feb 2015 16:25:16 -0600 | 3 | Date: Wed, 11 Feb 2015 16:25:16 -0600 |
| 4 | Subject: [PATCH 103/114] sysrq: skip synchronize_rcu() if there is no old op | 4 | Subject: [PATCH 102/114] sysrq: skip synchronize_rcu() if there is no old op |
| 5 | 5 | ||
| 6 | synchronize_rcu() is expensive. Currently it is called as part of the sysrq | 6 | synchronize_rcu() is expensive. Currently it is called as part of the sysrq |
| 7 | registration/unregistration, which happens during boot several times. | 7 | registration/unregistration, which happens during boot several times. |
| @@ -18,10 +18,10 @@ Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | |||
| 18 | 1 file changed, 3 insertions(+), 1 deletion(-) | 18 | 1 file changed, 3 insertions(+), 1 deletion(-) |
| 19 | 19 | ||
| 20 | diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c | 20 | diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c |
| 21 | index 701c085bb19b..c60c7ba57ad9 100644 | 21 | index 3ffc1ce29023..5a1d87b99e62 100644 |
| 22 | --- a/drivers/tty/sysrq.c | 22 | --- a/drivers/tty/sysrq.c |
| 23 | +++ b/drivers/tty/sysrq.c | 23 | +++ b/drivers/tty/sysrq.c |
| 24 | @@ -1065,8 +1065,10 @@ static int __sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p, | 24 | @@ -1067,8 +1067,10 @@ static int __sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p, |
| 25 | * A concurrent __handle_sysrq either got the old op or the new op. | 25 | * A concurrent __handle_sysrq either got the old op or the new op. |
| 26 | * Wait for it to go away before returning, so the code for an old | 26 | * Wait for it to go away before returning, so the code for an old |
| 27 | * op is not freed (eg. on module unload) while it is in use. | 27 | * op is not freed (eg. on module unload) while it is in use. |
| @@ -34,5 +34,5 @@ index 701c085bb19b..c60c7ba57ad9 100644 | |||
| 34 | return retval; | 34 | return retval; |
| 35 | } | 35 | } |
| 36 | -- | 36 | -- |
| 37 | 2.11.1 | 37 | 2.13.2 |
| 38 | 38 | ||
diff --git a/patches/boot_time_opt_guest/0103-fbcon-enable-no-blink-by-default.patch b/patches/boot_time_opt_guest/0103-fbcon-enable-no-blink-by-default.patch new file mode 100644 index 0000000..b678102 --- /dev/null +++ b/patches/boot_time_opt_guest/0103-fbcon-enable-no-blink-by-default.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | From 63fd40ed7d52c48d4f1edef2e928692e0f2ffac2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jose Carlos Venegas Munoz <jos.c.venegas.munoz@intel.com> | ||
| 3 | Date: Mon, 13 Apr 2015 11:26:36 -0500 | ||
| 4 | Subject: [PATCH 103/114] fbcon: enable no blink by default | ||
| 5 | |||
| 6 | Author: Arjan van de Ven <arjan@linux.intel.com> | ||
| 7 | --- | ||
| 8 | drivers/video/fbdev/core/fbcon.c | 2 +- | ||
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c | ||
| 12 | index 04612f9..a82cde1 100644 | ||
| 13 | --- a/drivers/video/fbdev/core/fbcon.c | ||
| 14 | +++ b/drivers/video/fbdev/core/fbcon.c | ||
| 15 | @@ -148,7 +148,7 @@ static const struct consw fb_con; | ||
| 16 | |||
| 17 | static int fbcon_set_origin(struct vc_data *); | ||
| 18 | |||
| 19 | -static int fbcon_cursor_noblink; | ||
| 20 | +static int fbcon_cursor_noblink = 1; | ||
| 21 | |||
| 22 | #define divides(a, b) ((!(a) || (b)%(a)) ? 0 : 1) | ||
| 23 | |||
| 24 | -- | ||
| 25 | 2.15.1 | ||
| 26 | |||
diff --git a/patches/boot_time_opt_guest/0104-fbcon-enable-no-blink-by-default.patch b/patches/boot_time_opt_guest/0104-fbcon-enable-no-blink-by-default.patch deleted file mode 100644 index 715c195..0000000 --- a/patches/boot_time_opt_guest/0104-fbcon-enable-no-blink-by-default.patch +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | From 5899ff79ed4e3514420e1530a3588a922832dae5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jose Carlos Venegas Munoz <jos.c.venegas.munoz@intel.com> | ||
| 3 | Date: Mon, 13 Apr 2015 11:26:36 -0500 | ||
| 4 | Subject: [PATCH 104/114] fbcon: enable no blink by default | ||
| 5 | |||
| 6 | Author: Arjan van de Ven <arjan@linux.intel.com> | ||
| 7 | --- | ||
| 8 | drivers/video/console/fbcon.c | 2 +- | ||
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c | ||
| 12 | index a44f5627b82a..95b73366b86f 100644 | ||
| 13 | --- a/drivers/video/console/fbcon.c | ||
| 14 | +++ b/drivers/video/console/fbcon.c | ||
| 15 | @@ -146,7 +146,7 @@ static const struct consw fb_con; | ||
| 16 | |||
| 17 | static int fbcon_set_origin(struct vc_data *); | ||
| 18 | |||
| 19 | -static int fbcon_cursor_noblink; | ||
| 20 | +static int fbcon_cursor_noblink = 1; | ||
| 21 | |||
| 22 | #define divides(a, b) ((!(a) || (b)%(a)) ? 0 : 1) | ||
| 23 | |||
| 24 | -- | ||
| 25 | 2.11.1 | ||
| 26 | |||
diff --git a/patches/boot_time_opt_guest/0105-vmstats-wakeups.patch b/patches/boot_time_opt_guest/0104-mm-reduce-vmstat-wakeups.patch index 09b109a..d9c42b6 100644 --- a/patches/boot_time_opt_guest/0105-vmstats-wakeups.patch +++ b/patches/boot_time_opt_guest/0104-mm-reduce-vmstat-wakeups.patch | |||
| @@ -1,22 +1,19 @@ | |||
| 1 | From ff47b4e9be8113b4ba05d6f2afee3db6904bc10f Mon Sep 17 00:00:00 2001 | 1 | From e09e490bbc40c9e10047af76577efb099eb915d1 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: Wed, 11 Feb 2015 16:47:20 -0600 | 3 | Date: Mon, 1 May 2017 01:00:51 +0000 |
| 4 | Subject: [PATCH 105/114] vmstats: wakeups | 4 | Subject: [PATCH 104/114] mm: reduce vmstat wakeups |
| 5 | 5 | ||
| 6 | Author: Arjan van de Ven <arjan@linux.intel.com> | ||
| 7 | |||
| 8 | Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
| 9 | --- | 6 | --- |
| 10 | mm/vmstat.c | 2 +- | 7 | mm/vmstat.c | 2 +- |
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) | 8 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 12 | 9 | ||
| 13 | diff --git a/mm/vmstat.c b/mm/vmstat.c | 10 | diff --git a/mm/vmstat.c b/mm/vmstat.c |
| 14 | index 7c28df36f50f..efe1b6797139 100644 | 11 | index 76f73670200a..3cc9788e0be2 100644 |
| 15 | --- a/mm/vmstat.c | 12 | --- a/mm/vmstat.c |
| 16 | +++ b/mm/vmstat.c | 13 | +++ b/mm/vmstat.c |
| 17 | @@ -1549,7 +1549,7 @@ static const struct file_operations proc_vmstat_file_operations = { | 14 | @@ -1562,7 +1562,7 @@ static const struct file_operations proc_vmstat_file_operations = { |
| 15 | |||
| 18 | #ifdef CONFIG_SMP | 16 | #ifdef CONFIG_SMP |
| 19 | static struct workqueue_struct *vmstat_wq; | ||
| 20 | static DEFINE_PER_CPU(struct delayed_work, vmstat_work); | 17 | static DEFINE_PER_CPU(struct delayed_work, vmstat_work); |
| 21 | -int sysctl_stat_interval __read_mostly = HZ; | 18 | -int sysctl_stat_interval __read_mostly = HZ; |
| 22 | +int sysctl_stat_interval __read_mostly = 8 * HZ; | 19 | +int sysctl_stat_interval __read_mostly = 8 * HZ; |
| @@ -24,5 +21,5 @@ index 7c28df36f50f..efe1b6797139 100644 | |||
| 24 | #ifdef CONFIG_PROC_FS | 21 | #ifdef CONFIG_PROC_FS |
| 25 | static void refresh_vm_stats(struct work_struct *work) | 22 | static void refresh_vm_stats(struct work_struct *work) |
| 26 | -- | 23 | -- |
| 27 | 2.11.1 | 24 | 2.13.2 |
| 28 | 25 | ||
diff --git a/patches/boot_time_opt_guest/0107-cgroup.patch b/patches/boot_time_opt_guest/0106-cgroup-delayed-work.patch index d68c686..438ed97 100644 --- a/patches/boot_time_opt_guest/0107-cgroup.patch +++ b/patches/boot_time_opt_guest/0106-cgroup-delayed-work.patch | |||
| @@ -1,44 +1,71 @@ | |||
| 1 | From 0adc5bfd84939d11d3c172eab0a00bfab4aadb46 Mon Sep 17 00:00:00 2001 | 1 | From f80cc54895e35a762036382c73bc48ac813e05a5 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, 28 Aug 2015 11:00:36 -0500 | 3 | Date: Fri, 28 Aug 2015 11:00:36 -0500 |
| 4 | Subject: [PATCH 107/114] cgroup | 4 | Subject: [PATCH] cgroup: delayed work |
| 5 | 5 | ||
| 6 | Author: Arjan van de Ven <arjan@linux.intel.com> | ||
| 7 | |||
| 8 | Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
| 9 | Signed-off-by: Jose Carlos Venegas Munoz <jos.c.venegas.munoz@intel.com> | ||
| 10 | --- | 6 | --- |
| 11 | include/linux/cgroup-defs.h | 2 +- | 7 | include/linux/cgroup-defs.h | 2 +- |
| 12 | kernel/cgroup.c | 24 ++++++++++++++---------- | 8 | kernel/cgroup/cgroup-internal.h | 8 ++++++++ |
| 13 | 2 files changed, 15 insertions(+), 11 deletions(-) | 9 | kernel/cgroup/cgroup-v1.c | 8 -------- |
| 10 | kernel/cgroup/cgroup.c | 21 ++++++++++++--------- | ||
| 11 | 4 files changed, 21 insertions(+), 18 deletions(-) | ||
| 14 | 12 | ||
| 15 | diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h | 13 | diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h |
| 16 | index 861b4677fc5b..5d3c345ee60c 100644 | 14 | index ec47101cb1bf..4827bf0809d7 100644 |
| 17 | --- a/include/linux/cgroup-defs.h | 15 | --- a/include/linux/cgroup-defs.h |
| 18 | +++ b/include/linux/cgroup-defs.h | 16 | +++ b/include/linux/cgroup-defs.h |
| 19 | @@ -137,7 +137,7 @@ struct cgroup_subsys_state { | 17 | @@ -136,7 +136,7 @@ struct cgroup_subsys_state { |
| 20 | 18 | ||
| 21 | /* percpu_ref killing and RCU release */ | 19 | /* percpu_ref killing and RCU release */ |
| 22 | struct rcu_head rcu_head; | 20 | struct rcu_head rcu_head; |
| 23 | - struct work_struct destroy_work; | 21 | - struct work_struct destroy_work; |
| 24 | + struct delayed_work destroy_work; | 22 | + struct delayed_work destroy_work; |
| 25 | }; | 23 | |
| 24 | /* | ||
| 25 | * PI: the parent css. Placed here for cache proximity to following | ||
| 26 | diff --git a/kernel/cgroup/cgroup-internal.h b/kernel/cgroup/cgroup-internal.h | ||
| 27 | index 00f4d6bf048f..854ef3216429 100644 | ||
| 28 | --- a/kernel/cgroup/cgroup-internal.h | ||
| 29 | +++ b/kernel/cgroup/cgroup-internal.h | ||
| 30 | @@ -8,6 +8,14 @@ | ||
| 31 | #include <linux/refcount.h> | ||
| 26 | 32 | ||
| 27 | /* | 33 | /* |
| 28 | diff --git a/kernel/cgroup.c b/kernel/cgroup.c | 34 | + * pidlists linger the following amount before being destroyed. The goal |
| 29 | index 53bbca7c4859..6de39d8213ed 100644 | 35 | + * is avoiding frequent destruction in the middle of consecutive read calls |
| 30 | --- a/kernel/cgroup.c | 36 | + * Expiring in the middle is a performance problem not a correctness one. |
| 31 | +++ b/kernel/cgroup.c | 37 | + * 1 sec should be enough. |
| 32 | @@ -73,7 +73,7 @@ | 38 | + */ |
| 33 | * Expiring in the middle is a performance problem not a correctness one. | ||
| 34 | * 1 sec should be enough. | ||
| 35 | */ | ||
| 36 | -#define CGROUP_PIDLIST_DESTROY_DELAY HZ | ||
| 37 | +#define CGROUP_PIDLIST_DESTROY_DELAY round_jiffies_relative(HZ) | 39 | +#define CGROUP_PIDLIST_DESTROY_DELAY round_jiffies_relative(HZ) |
| 40 | + | ||
| 41 | +/* | ||
| 42 | * A cgroup can be associated with multiple css_sets as different tasks may | ||
| 43 | * belong to different cgroups on different hierarchies. In the other | ||
| 44 | * direction, a css_set is naturally associated with multiple cgroups. | ||
| 45 | diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c | ||
| 46 | index 85d75152402d..60bb59d44d01 100644 | ||
| 47 | --- a/kernel/cgroup/cgroup-v1.c | ||
| 48 | +++ b/kernel/cgroup/cgroup-v1.c | ||
| 49 | @@ -16,14 +16,6 @@ | ||
| 38 | 50 | ||
| 39 | #define CGROUP_FILE_NAME_MAX (MAX_CGROUP_TYPE_NAMELEN + \ | 51 | #include <trace/events/cgroup.h> |
| 40 | MAX_CFTYPE_NAME + 2) | 52 | |
| 41 | @@ -4986,8 +4986,9 @@ static struct cftype cgroup_legacy_base_files[] = { | 53 | -/* |
| 54 | - * pidlists linger the following amount before being destroyed. The goal | ||
| 55 | - * is avoiding frequent destruction in the middle of consecutive read calls | ||
| 56 | - * Expiring in the middle is a performance problem not a correctness one. | ||
| 57 | - * 1 sec should be enough. | ||
| 58 | - */ | ||
| 59 | -#define CGROUP_PIDLIST_DESTROY_DELAY HZ | ||
| 60 | - | ||
| 61 | /* Controllers blocked by the commandline in v1 */ | ||
| 62 | static u16 cgroup_no_v1_mask; | ||
| 63 | |||
| 64 | diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c | ||
| 65 | index 8d4e85eae42c..7c8294298983 100644 | ||
| 66 | --- a/kernel/cgroup/cgroup.c | ||
| 67 | +++ b/kernel/cgroup/cgroup.c | ||
| 68 | @@ -3841,8 +3841,9 @@ static struct cftype cgroup_base_files[] = { | ||
| 42 | */ | 69 | */ |
| 43 | static void css_free_work_fn(struct work_struct *work) | 70 | static void css_free_work_fn(struct work_struct *work) |
| 44 | { | 71 | { |
| @@ -49,7 +76,7 @@ index 53bbca7c4859..6de39d8213ed 100644 | |||
| 49 | struct cgroup_subsys *ss = css->ss; | 76 | struct cgroup_subsys *ss = css->ss; |
| 50 | struct cgroup *cgrp = css->cgroup; | 77 | struct cgroup *cgrp = css->cgroup; |
| 51 | 78 | ||
| 52 | @@ -5036,14 +5037,15 @@ static void css_free_rcu_fn(struct rcu_head *rcu_head) | 79 | @@ -3891,14 +3892,15 @@ static void css_free_rcu_fn(struct rcu_head *rcu_head) |
| 53 | struct cgroup_subsys_state *css = | 80 | struct cgroup_subsys_state *css = |
| 54 | container_of(rcu_head, struct cgroup_subsys_state, rcu_head); | 81 | container_of(rcu_head, struct cgroup_subsys_state, rcu_head); |
| 55 | 82 | ||
| @@ -68,7 +95,7 @@ index 53bbca7c4859..6de39d8213ed 100644 | |||
| 68 | struct cgroup_subsys *ss = css->ss; | 95 | struct cgroup_subsys *ss = css->ss; |
| 69 | struct cgroup *cgrp = css->cgroup; | 96 | struct cgroup *cgrp = css->cgroup; |
| 70 | 97 | ||
| 71 | @@ -5088,8 +5090,9 @@ static void css_release(struct percpu_ref *ref) | 98 | @@ -3943,8 +3945,8 @@ static void css_release(struct percpu_ref *ref) |
| 72 | struct cgroup_subsys_state *css = | 99 | struct cgroup_subsys_state *css = |
| 73 | container_of(ref, struct cgroup_subsys_state, refcnt); | 100 | container_of(ref, struct cgroup_subsys_state, refcnt); |
| 74 | 101 | ||
| @@ -76,11 +103,10 @@ index 53bbca7c4859..6de39d8213ed 100644 | |||
| 76 | - queue_work(cgroup_destroy_wq, &css->destroy_work); | 103 | - queue_work(cgroup_destroy_wq, &css->destroy_work); |
| 77 | + INIT_DELAYED_WORK(&css->destroy_work, css_release_work_fn); | 104 | + INIT_DELAYED_WORK(&css->destroy_work, css_release_work_fn); |
| 78 | + queue_delayed_work(cgroup_destroy_wq, &css->destroy_work, CGROUP_PIDLIST_DESTROY_DELAY); | 105 | + queue_delayed_work(cgroup_destroy_wq, &css->destroy_work, CGROUP_PIDLIST_DESTROY_DELAY); |
| 79 | + | ||
| 80 | } | 106 | } |
| 81 | 107 | ||
| 82 | static void init_and_link_css(struct cgroup_subsys_state *css, | 108 | static void init_and_link_css(struct cgroup_subsys_state *css, |
| 83 | @@ -5371,8 +5374,9 @@ static int cgroup_mkdir(struct kernfs_node *parent_kn, const char *name, | 109 | @@ -4225,8 +4227,9 @@ int cgroup_mkdir(struct kernfs_node *parent_kn, const char *name, umode_t mode) |
| 84 | */ | 110 | */ |
| 85 | static void css_killed_work_fn(struct work_struct *work) | 111 | static void css_killed_work_fn(struct work_struct *work) |
| 86 | { | 112 | { |
| @@ -91,7 +117,7 @@ index 53bbca7c4859..6de39d8213ed 100644 | |||
| 91 | 117 | ||
| 92 | mutex_lock(&cgroup_mutex); | 118 | mutex_lock(&cgroup_mutex); |
| 93 | 119 | ||
| 94 | @@ -5393,8 +5397,8 @@ static void css_killed_ref_fn(struct percpu_ref *ref) | 120 | @@ -4247,8 +4250,8 @@ static void css_killed_ref_fn(struct percpu_ref *ref) |
| 95 | container_of(ref, struct cgroup_subsys_state, refcnt); | 121 | container_of(ref, struct cgroup_subsys_state, refcnt); |
| 96 | 122 | ||
| 97 | if (atomic_dec_and_test(&css->online_cnt)) { | 123 | if (atomic_dec_and_test(&css->online_cnt)) { |
| @@ -103,5 +129,5 @@ index 53bbca7c4859..6de39d8213ed 100644 | |||
| 103 | } | 129 | } |
| 104 | 130 | ||
| 105 | -- | 131 | -- |
| 106 | 2.11.1 | 132 | 2.13.2 |
| 107 | 133 | ||
diff --git a/patches/boot_time_opt_guest/0106-pci-probe.patch b/patches/boot_time_opt_guest/0106-pci-probe.patch deleted file mode 100644 index 5045926..0000000 --- a/patches/boot_time_opt_guest/0106-pci-probe.patch +++ /dev/null | |||
| @@ -1,123 +0,0 @@ | |||
| 1 | From b225caf8f743b9f5f9e84d0df711ee0c17e049ae Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
| 3 | Date: Wed, 11 Feb 2015 16:53:08 -0600 | ||
| 4 | Subject: [PATCH 106/114] pci: probe | ||
| 5 | |||
| 6 | Author: Arjan van de Ven <arjan@linux.intel.com> | ||
| 7 | |||
| 8 | Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
| 9 | --- | ||
| 10 | drivers/pci/probe.c | 43 ++++++++++++++++++++++++++++++++++++++++--- | ||
| 11 | 1 file changed, 40 insertions(+), 3 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c | ||
| 14 | index 204960e70333..7399a06698da 100644 | ||
| 15 | --- a/drivers/pci/probe.c | ||
| 16 | +++ b/drivers/pci/probe.c | ||
| 17 | @@ -182,6 +182,10 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | ||
| 18 | |||
| 19 | mask = type ? PCI_ROM_ADDRESS_MASK : ~0; | ||
| 20 | |||
| 21 | + res->name = pci_name(dev); | ||
| 22 | + | ||
| 23 | + printk("clr: Starting probe for %s\n", res->name); | ||
| 24 | + | ||
| 25 | /* No printks while decoding is disabled! */ | ||
| 26 | if (!dev->mmio_always_on) { | ||
| 27 | pci_read_config_word(dev, PCI_COMMAND, &orig_cmd); | ||
| 28 | @@ -191,8 +195,6 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | ||
| 29 | } | ||
| 30 | } | ||
| 31 | |||
| 32 | - res->name = pci_name(dev); | ||
| 33 | - | ||
| 34 | pci_read_config_dword(dev, pos, &l); | ||
| 35 | pci_write_config_dword(dev, pos, l | mask); | ||
| 36 | pci_read_config_dword(dev, pos, &sz); | ||
| 37 | @@ -324,6 +326,8 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom) | ||
| 38 | if (dev->non_compliant_bars) | ||
| 39 | return; | ||
| 40 | |||
| 41 | + printk("clr: pci_read_bases start\n"); | ||
| 42 | + | ||
| 43 | for (pos = 0; pos < howmany; pos++) { | ||
| 44 | struct resource *res = &dev->resource[pos]; | ||
| 45 | reg = PCI_BASE_ADDRESS_0 + (pos << 2); | ||
| 46 | @@ -332,11 +336,13 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom) | ||
| 47 | |||
| 48 | if (rom) { | ||
| 49 | struct resource *res = &dev->resource[PCI_ROM_RESOURCE]; | ||
| 50 | + printk("clr: rom path\n"); | ||
| 51 | dev->rom_base_reg = rom; | ||
| 52 | res->flags = IORESOURCE_MEM | IORESOURCE_PREFETCH | | ||
| 53 | IORESOURCE_READONLY | IORESOURCE_SIZEALIGN; | ||
| 54 | __pci_read_base(dev, pci_bar_mem32, res, rom); | ||
| 55 | } | ||
| 56 | + printk("clr: pci_read_bases end\n"); | ||
| 57 | } | ||
| 58 | |||
| 59 | static void pci_read_bridge_io(struct pci_bus *child) | ||
| 60 | @@ -1311,6 +1317,28 @@ static void pci_msi_setup_pci_dev(struct pci_dev *dev) | ||
| 61 | pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_ENABLE, 0); | ||
| 62 | } | ||
| 63 | |||
| 64 | +static int guess_bar_count(int class) | ||
| 65 | +{ | ||
| 66 | + if (class == 0x068000) | ||
| 67 | + return 0; | ||
| 68 | + if (class == 0x020000) | ||
| 69 | + return 2; | ||
| 70 | + if (class == 0x010000) | ||
| 71 | + return 2; | ||
| 72 | + if (class == 0x00ff00) | ||
| 73 | + return 1; | ||
| 74 | + return 6; | ||
| 75 | +} | ||
| 76 | + | ||
| 77 | +static int has_rom(int class, int rom) | ||
| 78 | +{ | ||
| 79 | + if (class == 0x020000) | ||
| 80 | + return 0; | ||
| 81 | + if (class == 0x010000 || class == 0x00ff00) | ||
| 82 | + return 0; | ||
| 83 | + return rom; | ||
| 84 | +} | ||
| 85 | + | ||
| 86 | /** | ||
| 87 | * pci_setup_device - fill in class and map information of a device | ||
| 88 | * @dev: the device structure to fill | ||
| 89 | @@ -1329,6 +1357,9 @@ int pci_setup_device(struct pci_dev *dev) | ||
| 90 | int pos = 0; | ||
| 91 | struct pci_bus_region region; | ||
| 92 | struct resource *res; | ||
| 93 | + int maxbar; | ||
| 94 | + | ||
| 95 | + printk("clr: pci_setup_device start\n"); | ||
| 96 | |||
| 97 | if (pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type)) | ||
| 98 | return -EIO; | ||
| 99 | @@ -1383,7 +1414,11 @@ int pci_setup_device(struct pci_dev *dev) | ||
| 100 | if (class == PCI_CLASS_BRIDGE_PCI) | ||
| 101 | goto bad; | ||
| 102 | pci_read_irq(dev); | ||
| 103 | - pci_read_bases(dev, 6, PCI_ROM_ADDRESS); | ||
| 104 | + | ||
| 105 | + maxbar = guess_bar_count(dev->class); | ||
| 106 | + | ||
| 107 | + if (class != PCI_CLASS_STORAGE_IDE) | ||
| 108 | + pci_read_bases(dev, maxbar, has_rom(dev->class, PCI_ROM_ADDRESS)); | ||
| 109 | pci_read_config_word(dev, PCI_SUBSYSTEM_VENDOR_ID, &dev->subsystem_vendor); | ||
| 110 | pci_read_config_word(dev, PCI_SUBSYSTEM_ID, &dev->subsystem_device); | ||
| 111 | |||
| 112 | @@ -1468,6 +1503,8 @@ int pci_setup_device(struct pci_dev *dev) | ||
| 113 | dev->class = PCI_CLASS_NOT_DEFINED << 8; | ||
| 114 | } | ||
| 115 | |||
| 116 | + printk("clr: pci_setup_device end\n"); | ||
| 117 | + | ||
| 118 | /* We found a fine healthy device, go go go... */ | ||
| 119 | return 0; | ||
| 120 | } | ||
| 121 | -- | ||
| 122 | 2.11.1 | ||
| 123 | |||
diff --git a/patches/boot_time_opt_guest/0108-smpboot-reuse-timer-calibration.patch b/patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch index 48be94a..23b873f 100644 --- a/patches/boot_time_opt_guest/0108-smpboot-reuse-timer-calibration.patch +++ b/patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From 634947be6c24d844af5f6ecf59453f2ddc09e032 Mon Sep 17 00:00:00 2001 | 1 | From 12409839a8fcf30e6b83290f30f1187efe4a58b6 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: Wed, 11 Feb 2015 17:28:14 -0600 | 3 | Date: Wed, 11 Feb 2015 17:28:14 -0600 |
| 4 | Subject: [PATCH 108/114] smpboot: reuse timer calibration | 4 | Subject: [PATCH 107/114] smpboot: reuse timer calibration |
| 5 | 5 | ||
| 6 | NO point recalibrating for known-constant tsc... saves 200ms+ of boot time. | 6 | NO point recalibrating for known-constant tsc... saves 200ms+ of boot time. |
| 7 | 7 | ||
| @@ -14,10 +14,10 @@ Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | |||
| 14 | 2 files changed, 4 insertions(+), 1 deletion(-) | 14 | 2 files changed, 4 insertions(+), 1 deletion(-) |
| 15 | 15 | ||
| 16 | diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c | 16 | diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c |
| 17 | index 99b920d0e516..e17bb425bb52 100644 | 17 | index f04479a8f74f..6f41d74350ec 100644 |
| 18 | --- a/arch/x86/kernel/smpboot.c | 18 | --- a/arch/x86/kernel/smpboot.c |
| 19 | +++ b/arch/x86/kernel/smpboot.c | 19 | +++ b/arch/x86/kernel/smpboot.c |
| 20 | @@ -761,7 +761,7 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip) | 20 | @@ -764,7 +764,7 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip) |
| 21 | pr_debug("Waiting for send to finish...\n"); | 21 | pr_debug("Waiting for send to finish...\n"); |
| 22 | send_status = safe_apic_wait_icr_idle(); | 22 | send_status = safe_apic_wait_icr_idle(); |
| 23 | 23 | ||
| @@ -27,10 +27,10 @@ index 99b920d0e516..e17bb425bb52 100644 | |||
| 27 | pr_debug("Deasserting INIT\n"); | 27 | pr_debug("Deasserting INIT\n"); |
| 28 | 28 | ||
| 29 | diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c | 29 | diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c |
| 30 | index 37e7cf544e51..e99be8a6a132 100644 | 30 | index 714dfba6a1e7..96cddaf0f48b 100644 |
| 31 | --- a/arch/x86/kernel/tsc.c | 31 | --- a/arch/x86/kernel/tsc.c |
| 32 | +++ b/arch/x86/kernel/tsc.c | 32 | +++ b/arch/x86/kernel/tsc.c |
| 33 | @@ -1413,6 +1413,9 @@ unsigned long calibrate_delay_is_known(void) | 33 | @@ -1438,6 +1438,9 @@ unsigned long calibrate_delay_is_known(void) |
| 34 | if (!mask) | 34 | if (!mask) |
| 35 | return 0; | 35 | return 0; |
| 36 | 36 | ||
| @@ -41,5 +41,5 @@ index 37e7cf544e51..e99be8a6a132 100644 | |||
| 41 | if (sibling < nr_cpu_ids) | 41 | if (sibling < nr_cpu_ids) |
| 42 | return cpu_data(sibling).loops_per_jiffy; | 42 | return cpu_data(sibling).loops_per_jiffy; |
| 43 | -- | 43 | -- |
| 44 | 2.11.1 | 44 | 2.13.2 |
| 45 | 45 | ||
diff --git a/patches/boot_time_opt_guest/0109-perf.patch b/patches/boot_time_opt_guest/0108-perf.patch index 75f50f6..085e99e 100644 --- a/patches/boot_time_opt_guest/0109-perf.patch +++ b/patches/boot_time_opt_guest/0108-perf.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From cce700dfbd5fdbf72b96e6479ca539ab4d880ce2 Mon Sep 17 00:00:00 2001 | 1 | From 8340ac120b7c7b86cdb7eb06d31d767683ad7413 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: Wed, 4 Nov 2015 15:17:10 -0600 | 3 | Date: Wed, 4 Nov 2015 15:17:10 -0600 |
| 4 | Subject: [PATCH 109/114] perf | 4 | Subject: [PATCH 108/114] perf |
| 5 | 5 | ||
| 6 | Author: Arjan van de Ven <arjan@linux.intel.com> | 6 | Author: Arjan van de Ven <arjan@linux.intel.com> |
| 7 | 7 | ||
| @@ -11,10 +11,10 @@ Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | |||
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) | 11 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 12 | 12 | ||
| 13 | diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c | 13 | diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c |
| 14 | index eb1484c86bb4..c13ea26ac066 100644 | 14 | index 110ce8238466..98ee5d338a16 100644 |
| 15 | --- a/arch/x86/events/intel/core.c | 15 | --- a/arch/x86/events/intel/core.c |
| 16 | +++ b/arch/x86/events/intel/core.c | 16 | +++ b/arch/x86/events/intel/core.c |
| 17 | @@ -4040,7 +4040,7 @@ __init int intel_pmu_init(void) | 17 | @@ -4062,7 +4062,7 @@ __init int intel_pmu_init(void) |
| 18 | */ | 18 | */ |
| 19 | if (x86_pmu.extra_regs) { | 19 | if (x86_pmu.extra_regs) { |
| 20 | for (er = x86_pmu.extra_regs; er->msr; er++) { | 20 | for (er = x86_pmu.extra_regs; er->msr; er++) { |
| @@ -24,5 +24,5 @@ index eb1484c86bb4..c13ea26ac066 100644 | |||
| 24 | if ((er->idx == EXTRA_REG_LBR) && !er->extra_msr_access) | 24 | if ((er->idx == EXTRA_REG_LBR) && !er->extra_msr_access) |
| 25 | x86_pmu.lbr_sel_map = NULL; | 25 | x86_pmu.lbr_sel_map = NULL; |
| 26 | -- | 26 | -- |
| 27 | 2.11.1 | 27 | 2.13.2 |
| 28 | 28 | ||
diff --git a/patches/boot_time_opt_guest/0110-pci-probe-identify-known-devices.patch b/patches/boot_time_opt_guest/0109-pci-probe-identify-known-devices.patch index 742a045..264ef3e 100644 --- a/patches/boot_time_opt_guest/0110-pci-probe-identify-known-devices.patch +++ b/patches/boot_time_opt_guest/0109-pci-probe-identify-known-devices.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From c662d99134b67c58e63ecc17c2531588a3a51596 Mon Sep 17 00:00:00 2001 | 1 | From 25e68c5e04b0eec5490a1c7d3887990cd33ccf1b 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, 14 Feb 2015 09:49:41 -0600 | 3 | Date: Sat, 14 Feb 2015 09:49:41 -0600 |
| 4 | Subject: [PATCH 110/114] pci: probe: identify known devices | 4 | Subject: [PATCH 109/114] pci: probe: identify known devices |
| 5 | 5 | ||
| 6 | Author: Arjan van de Ven <arjan@linux.intel.com> | 6 | Author: Arjan van de Ven <arjan@linux.intel.com> |
| 7 | Modify-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | 7 | Modify-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> |
| @@ -12,7 +12,7 @@ Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | |||
| 12 | 1 file changed, 156 insertions(+) | 12 | 1 file changed, 156 insertions(+) |
| 13 | 13 | ||
| 14 | diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c | 14 | diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c |
| 15 | index 7399a06698da..4fb2d7fed4c5 100644 | 15 | index 010c5e1c43dd..69cc7224fec2 100644 |
| 16 | --- a/drivers/pci/probe.c | 16 | --- a/drivers/pci/probe.c |
| 17 | +++ b/drivers/pci/probe.c | 17 | +++ b/drivers/pci/probe.c |
| 18 | @@ -163,6 +163,159 @@ static inline unsigned long decode_bar(struct pci_dev *dev, u32 bar) | 18 | @@ -163,6 +163,159 @@ static inline unsigned long decode_bar(struct pci_dev *dev, u32 bar) |
| @@ -186,5 +186,5 @@ index 7399a06698da..4fb2d7fed4c5 100644 | |||
| 186 | 186 | ||
| 187 | printk("clr: Starting probe for %s\n", res->name); | 187 | printk("clr: Starting probe for %s\n", res->name); |
| 188 | -- | 188 | -- |
| 189 | 2.11.1 | 189 | 2.13.2 |
| 190 | 190 | ||
diff --git a/patches/boot_time_opt_guest/0111-init-no-wait-for-the-known-devices.patch b/patches/boot_time_opt_guest/0110-init-no-wait-for-the-known-devices.patch index 701a18d..3021ab2 100644 --- a/patches/boot_time_opt_guest/0111-init-no-wait-for-the-known-devices.patch +++ b/patches/boot_time_opt_guest/0110-init-no-wait-for-the-known-devices.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From be2ab4809c6b5058fbf3cd54c0f59c56416e572c Mon Sep 17 00:00:00 2001 | 1 | From 33a759b3c86e05a2d3e9d201edc8caa123beb16a 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, 22 Jun 2015 09:33:33 -0500 | 3 | Date: Mon, 22 Jun 2015 09:33:33 -0500 |
| 4 | Subject: [PATCH 111/114] init: no wait for the known devices | 4 | Subject: [PATCH 110/114] init: no wait for the known devices |
| 5 | 5 | ||
| 6 | No wait for the known devices to complete their probing | 6 | No wait for the known devices to complete their probing |
| 7 | 7 | ||
| @@ -35,5 +35,5 @@ index c2de5104aad2..40725f0f5fb3 100644 | |||
| 35 | md_run_setup(); | 35 | md_run_setup(); |
| 36 | 36 | ||
| 37 | -- | 37 | -- |
| 38 | 2.11.1 | 38 | 2.13.2 |
| 39 | 39 | ||
diff --git a/patches/boot_time_opt_guest/0112-ksm-wakeups.patch b/patches/boot_time_opt_guest/0111-ksm-wakeups.patch index b131e3f..c4472a1 100644 --- a/patches/boot_time_opt_guest/0112-ksm-wakeups.patch +++ b/patches/boot_time_opt_guest/0111-ksm-wakeups.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From 2dc48e4b5c651691b7028991b64c935047b41b19 Mon Sep 17 00:00:00 2001 | 1 | From 7cb71dfb076d5201c7cee4b4c3e85d98f9695cc3 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, 14 Mar 2016 11:06:46 -0600 | 3 | Date: Mon, 14 Mar 2016 11:06:46 -0600 |
| 4 | Subject: [PATCH 112/114] ksm-wakeups | 4 | Subject: [PATCH 111/114] ksm-wakeups |
| 5 | 5 | ||
| 6 | reduce wakeups in ksm | 6 | reduce wakeups in ksm |
| 7 | --- | 7 | --- |
| @@ -9,10 +9,10 @@ reduce wakeups in ksm | |||
| 9 | 1 file changed, 6 insertions(+), 2 deletions(-) | 9 | 1 file changed, 6 insertions(+), 2 deletions(-) |
| 10 | 10 | ||
| 11 | diff --git a/mm/ksm.c b/mm/ksm.c | 11 | diff --git a/mm/ksm.c b/mm/ksm.c |
| 12 | index 9ae6011a41f8..eecd3ff669e2 100644 | 12 | index 216184af0e19..1e7e4e8bb5f9 100644 |
| 13 | --- a/mm/ksm.c | 13 | --- a/mm/ksm.c |
| 14 | +++ b/mm/ksm.c | 14 | +++ b/mm/ksm.c |
| 15 | @@ -1725,8 +1725,12 @@ static int ksm_scan_thread(void *nothing) | 15 | @@ -1767,8 +1767,12 @@ static int ksm_scan_thread(void *nothing) |
| 16 | try_to_freeze(); | 16 | try_to_freeze(); |
| 17 | 17 | ||
| 18 | if (ksmd_should_run()) { | 18 | if (ksmd_should_run()) { |
| @@ -28,5 +28,5 @@ index 9ae6011a41f8..eecd3ff669e2 100644 | |||
| 28 | wait_event_freezable(ksm_thread_wait, | 28 | wait_event_freezable(ksm_thread_wait, |
| 29 | ksmd_should_run() || kthread_should_stop()); | 29 | ksmd_should_run() || kthread_should_stop()); |
| 30 | -- | 30 | -- |
| 31 | 2.11.1 | 31 | 2.13.2 |
| 32 | 32 | ||
diff --git a/patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch b/patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch deleted file mode 100644 index 047eddb..0000000 --- a/patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch +++ /dev/null | |||
| @@ -1,42 +0,0 @@ | |||
| 1 | From 179b7f41d5509f93cd297cc81c5d8da4a3123d9d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
| 3 | Date: Fri, 20 Nov 2015 14:01:26 -0600 | ||
| 4 | Subject: [PATCH 113/114] init: do_mounts: recreate /dev/root | ||
| 5 | |||
| 6 | Rootfs shows as is mounted in /dev/root, but this devices is not present in | ||
| 7 | /dev directory. | ||
| 8 | |||
| 9 | Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
| 10 | --- | ||
| 11 | init/do_mounts.c | 8 ++++++++ | ||
| 12 | 1 file changed, 8 insertions(+) | ||
| 13 | |||
| 14 | diff --git a/init/do_mounts.c b/init/do_mounts.c | ||
| 15 | index 40725f0f5fb3..78b5b1dba8ca 100644 | ||
| 16 | --- a/init/do_mounts.c | ||
| 17 | +++ b/init/do_mounts.c | ||
| 18 | @@ -550,6 +550,7 @@ void __init mount_root(void) | ||
| 19 | void __init prepare_namespace(void) | ||
| 20 | { | ||
| 21 | int is_floppy; | ||
| 22 | + int err; | ||
| 23 | |||
| 24 | if (root_delay) { | ||
| 25 | printk(KERN_INFO "Waiting %d sec before mounting root device...\n", | ||
| 26 | @@ -604,6 +605,13 @@ void __init prepare_namespace(void) | ||
| 27 | devtmpfs_mount("dev"); | ||
| 28 | sys_mount(".", "/", NULL, MS_MOVE, NULL); | ||
| 29 | sys_chroot("."); | ||
| 30 | +#ifdef CONFIG_BLOCK | ||
| 31 | + /* recreate the /dev/root */ | ||
| 32 | + err = create_dev("/dev/root", ROOT_DEV); | ||
| 33 | + | ||
| 34 | + if (err < 0) | ||
| 35 | + pr_emerg("Failed to create /dev/root: %d\n", err); | ||
| 36 | +#endif | ||
| 37 | } | ||
| 38 | |||
| 39 | static bool is_tmpfs; | ||
| 40 | -- | ||
| 41 | 2.11.1 | ||
| 42 | |||
diff --git a/patches/boot_time_opt_guest/0114-xattr-allow-setting-user.-attributes-on-symlinks-by-.patch b/patches/boot_time_opt_guest/0114-xattr-allow-setting-user.-attributes-on-symlinks-by-.patch deleted file mode 100644 index dee9058..0000000 --- a/patches/boot_time_opt_guest/0114-xattr-allow-setting-user.-attributes-on-symlinks-by-.patch +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | From 02fd2e6a7c708bf973209f9b238c5c61cbf15239 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alan Cox <alan@linux.intel.com> | ||
| 3 | Date: Thu, 10 Mar 2016 15:11:28 +0000 | ||
| 4 | Subject: [PATCH 114/114] xattr: allow setting user.* attributes on symlinks by | ||
| 5 | owner | ||
| 6 | |||
| 7 | Kvmtool and clear containers supports using user attributes to label host | ||
| 8 | files with the virtual uid/guid of the file in the container. This allows an | ||
| 9 | end user to manage their files and a complete uid space without all the ugly | ||
| 10 | namespace stuff. | ||
| 11 | |||
| 12 | The one gap in the support is symlinks because an end user can change the | ||
| 13 | ownership of a symbolic link. We support attributes on these files as you | ||
| 14 | can already (as root) set security attributes on them. | ||
| 15 | |||
| 16 | The current rules seem slightly over-paranoid and as we have a use case this | ||
| 17 | patch enables updating the attributes on a symbolic link IFF you are the | ||
| 18 | owner of the synlink (as permissions are not usually meaningful on the link | ||
| 19 | itself). | ||
| 20 | |||
| 21 | Signed-off-by: Alan Cox <alan@linux.intel.com> | ||
| 22 | --- | ||
| 23 | fs/xattr.c | 14 ++++++++------ | ||
| 24 | 1 file changed, 8 insertions(+), 6 deletions(-) | ||
| 25 | |||
| 26 | diff --git a/fs/xattr.c b/fs/xattr.c | ||
| 27 | index 7e3317cf4045..e005c30acb2c 100644 | ||
| 28 | --- a/fs/xattr.c | ||
| 29 | +++ b/fs/xattr.c | ||
| 30 | @@ -118,15 +118,17 @@ xattr_permission(struct inode *inode, const char *name, int mask) | ||
| 31 | } | ||
| 32 | |||
| 33 | /* | ||
| 34 | - * In the user.* namespace, only regular files and directories can have | ||
| 35 | - * extended attributes. For sticky directories, only the owner and | ||
| 36 | - * privileged users can write attributes. | ||
| 37 | + * In the user.* namespace, only regular files, symbolic links, and | ||
| 38 | + * directories can have extended attributes. For symbolic links and | ||
| 39 | + * sticky directories, only the owner and privileged users can write | ||
| 40 | + * attributes. | ||
| 41 | */ | ||
| 42 | if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) { | ||
| 43 | - if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode)) | ||
| 44 | + if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode) && !S_ISLNK(inode->i_mode)) | ||
| 45 | return (mask & MAY_WRITE) ? -EPERM : -ENODATA; | ||
| 46 | - if (S_ISDIR(inode->i_mode) && (inode->i_mode & S_ISVTX) && | ||
| 47 | - (mask & MAY_WRITE) && !inode_owner_or_capable(inode)) | ||
| 48 | + if (((S_ISDIR(inode->i_mode) && (inode->i_mode & S_ISVTX)) | ||
| 49 | + || S_ISLNK(inode->i_mode)) && (mask & MAY_WRITE) | ||
| 50 | + && !inode_owner_or_capable(inode)) | ||
| 51 | return -EPERM; | ||
| 52 | } | ||
| 53 | |||
| 54 | -- | ||
| 55 | 2.11.1 | ||
| 56 | |||
diff --git a/patches/boot_time_opt_guest/0151-mm-Export-do_madvise.patch b/patches/boot_time_opt_guest/0151-mm-Export-do_madvise.patch index a6dbff7..5a37ea3 100644 --- a/patches/boot_time_opt_guest/0151-mm-Export-do_madvise.patch +++ b/patches/boot_time_opt_guest/0151-mm-Export-do_madvise.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 99b4cdcce43ad0f706120bef26fef8c628c572cf Mon Sep 17 00:00:00 2001 | 1 | From c8193d2eb7b27a1250d810d49d2f2114912972c8 Mon Sep 17 00:00:00 2001 |
| 2 | From: Sebastien Boeuf <sebastien.boeuf@intel.com> | 2 | From: Sebastien Boeuf <sebastien.boeuf@intel.com> |
| 3 | Date: Mon, 23 Jan 2017 15:03:52 -0800 | 3 | Date: Mon, 23 Jan 2017 15:03:52 -0800 |
| 4 | Subject: [PATCH 151/154] mm: Export do_madvise() | 4 | Subject: [PATCH 151/154] mm: Export do_madvise() |
| @@ -21,10 +21,10 @@ Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> | |||
| 21 | 2 files changed, 23 insertions(+), 4 deletions(-) | 21 | 2 files changed, 23 insertions(+), 4 deletions(-) |
| 22 | 22 | ||
| 23 | diff --git a/include/linux/mm.h b/include/linux/mm.h | 23 | diff --git a/include/linux/mm.h b/include/linux/mm.h |
| 24 | index 0b5b2e4df14e..925ec25f99a8 100644 | 24 | index 6f543a47fc92..bf52e0498247 100644 |
| 25 | --- a/include/linux/mm.h | 25 | --- a/include/linux/mm.h |
| 26 | +++ b/include/linux/mm.h | 26 | +++ b/include/linux/mm.h |
| 27 | @@ -2450,5 +2450,7 @@ void __init setup_nr_node_ids(void); | 27 | @@ -2557,5 +2557,7 @@ void __init setup_nr_node_ids(void); |
| 28 | static inline void setup_nr_node_ids(void) {} | 28 | static inline void setup_nr_node_ids(void) {} |
| 29 | #endif | 29 | #endif |
| 30 | 30 | ||
| @@ -33,10 +33,10 @@ index 0b5b2e4df14e..925ec25f99a8 100644 | |||
| 33 | #endif /* __KERNEL__ */ | 33 | #endif /* __KERNEL__ */ |
| 34 | #endif /* _LINUX_MM_H */ | 34 | #endif /* _LINUX_MM_H */ |
| 35 | diff --git a/mm/madvise.c b/mm/madvise.c | 35 | diff --git a/mm/madvise.c b/mm/madvise.c |
| 36 | index 93fb63e88b5e..c8bbf93d4978 100644 | 36 | index 25b78ee4fc2c..77cfd2580e1b 100644 |
| 37 | --- a/mm/madvise.c | 37 | --- a/mm/madvise.c |
| 38 | +++ b/mm/madvise.c | 38 | +++ b/mm/madvise.c |
| 39 | @@ -618,9 +618,7 @@ madvise_behavior_valid(int behavior) | 39 | @@ -699,9 +699,7 @@ madvise_behavior_valid(int behavior) |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | /* | 42 | /* |
| @@ -47,7 +47,7 @@ index 93fb63e88b5e..c8bbf93d4978 100644 | |||
| 47 | * handle paging I/O in this VM area. The idea is to help the kernel | 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 | 48 | * use appropriate read-ahead and caching techniques. The information |
| 49 | * provided is advisory only, and can be safely disregarded by the | 49 | * provided is advisory only, and can be safely disregarded by the |
| 50 | @@ -673,7 +671,7 @@ madvise_behavior_valid(int behavior) | 50 | @@ -754,7 +752,7 @@ madvise_behavior_valid(int behavior) |
| 51 | * -EBADF - map exists, but area maps something that isn't a file. | 51 | * -EBADF - map exists, but area maps something that isn't a file. |
| 52 | * -EAGAIN - a kernel resource was temporarily unavailable. | 52 | * -EAGAIN - a kernel resource was temporarily unavailable. |
| 53 | */ | 53 | */ |
| @@ -56,7 +56,7 @@ index 93fb63e88b5e..c8bbf93d4978 100644 | |||
| 56 | { | 56 | { |
| 57 | unsigned long end, tmp; | 57 | unsigned long end, tmp; |
| 58 | struct vm_area_struct *vma, *prev; | 58 | struct vm_area_struct *vma, *prev; |
| 59 | @@ -767,3 +765,22 @@ SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior) | 59 | @@ -849,3 +847,22 @@ SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior) |
| 60 | 60 | ||
| 61 | return error; | 61 | return error; |
| 62 | } | 62 | } |
| @@ -80,5 +80,5 @@ index 93fb63e88b5e..c8bbf93d4978 100644 | |||
| 80 | + return do_madvise(start, len_in, behavior); | 80 | + return do_madvise(start, len_in, behavior); |
| 81 | +} | 81 | +} |
| 82 | -- | 82 | -- |
| 83 | 2.12.1 | 83 | 2.13.2 |
| 84 | 84 | ||
diff --git a/patches/boot_time_opt_guest/0152-x86-kvm-Notify-host-to-release-pages.patch b/patches/boot_time_opt_guest/0152-x86-kvm-Notify-host-to-release-pages.patch index 5f44930..7197ce7 100644 --- a/patches/boot_time_opt_guest/0152-x86-kvm-Notify-host-to-release-pages.patch +++ b/patches/boot_time_opt_guest/0152-x86-kvm-Notify-host-to-release-pages.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From d28921b5f797829e4e676f7968ae688ef96b7992 Mon Sep 17 00:00:00 2001 | 1 | From c08f0e4d768db796098c8bdc64c3358baee076e7 Mon Sep 17 00:00:00 2001 |
| 2 | From: Sebastien Boeuf <sebastien.boeuf@intel.com> | 2 | From: Sebastien Boeuf <sebastien.boeuf@intel.com> |
| 3 | Date: Mon, 23 Jan 2017 15:08:55 -0800 | 3 | Date: Mon, 23 Jan 2017 15:08:55 -0800 |
| 4 | Subject: [PATCH 152/154] x86: kvm: Notify host to release pages | 4 | Subject: [PATCH 152/154] x86: kvm: Notify host to release pages |
| @@ -37,15 +37,15 @@ Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> | |||
| 37 | include/uapi/linux/kvm_para.h | 3 +++ | 37 | include/uapi/linux/kvm_para.h | 3 +++ |
| 38 | kernel/sysctl.c | 7 +++++++ | 38 | kernel/sysctl.c | 7 +++++++ |
| 39 | mm/Makefile | 2 +- | 39 | mm/Makefile | 2 +- |
| 40 | mm/kvm.c | 25 +++++++++++++++++++++++++ | 40 | mm/kvm.c | 26 ++++++++++++++++++++++++++ |
| 41 | 6 files changed, 58 insertions(+), 1 deletion(-) | 41 | 6 files changed, 59 insertions(+), 1 deletion(-) |
| 42 | create mode 100644 mm/kvm.c | 42 | create mode 100644 mm/kvm.c |
| 43 | 43 | ||
| 44 | diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c | 44 | diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c |
| 45 | index 582c75311f95..683a94dd5f03 100644 | 45 | index 0e846f0cb83b..7bd380ff8dfa 100644 |
| 46 | --- a/arch/x86/kvm/x86.c | 46 | --- a/arch/x86/kvm/x86.c |
| 47 | +++ b/arch/x86/kvm/x86.c | 47 | +++ b/arch/x86/kvm/x86.c |
| 48 | @@ -46,6 +46,7 @@ | 48 | @@ -45,6 +45,7 @@ |
| 49 | #include <linux/user-return-notifier.h> | 49 | #include <linux/user-return-notifier.h> |
| 50 | #include <linux/srcu.h> | 50 | #include <linux/srcu.h> |
| 51 | #include <linux/slab.h> | 51 | #include <linux/slab.h> |
| @@ -53,7 +53,7 @@ index 582c75311f95..683a94dd5f03 100644 | |||
| 53 | #include <linux/perf_event.h> | 53 | #include <linux/perf_event.h> |
| 54 | #include <linux/uaccess.h> | 54 | #include <linux/uaccess.h> |
| 55 | #include <linux/hash.h> | 55 | #include <linux/hash.h> |
| 56 | @@ -6019,6 +6020,19 @@ static void kvm_pv_kick_cpu_op(struct kvm *kvm, unsigned long flags, int apicid) | 56 | @@ -6206,6 +6207,19 @@ static void kvm_pv_kick_cpu_op(struct kvm *kvm, unsigned long flags, int apicid) |
| 57 | kvm_irq_delivery_to_apic(kvm, NULL, &lapic_irq, NULL); | 57 | kvm_irq_delivery_to_apic(kvm, NULL, &lapic_irq, NULL); |
| 58 | } | 58 | } |
| 59 | 59 | ||
| @@ -73,10 +73,10 @@ index 582c75311f95..683a94dd5f03 100644 | |||
| 73 | void kvm_vcpu_deactivate_apicv(struct kvm_vcpu *vcpu) | 73 | void kvm_vcpu_deactivate_apicv(struct kvm_vcpu *vcpu) |
| 74 | { | 74 | { |
| 75 | vcpu->arch.apicv_active = false; | 75 | vcpu->arch.apicv_active = false; |
| 76 | @@ -6065,6 +6079,9 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu) | 76 | @@ -6257,6 +6271,9 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu) |
| 77 | kvm_pv_kick_cpu_op(vcpu->kvm, a0, a1); | 77 | ret = kvm_pv_clock_pairing(vcpu, a0, a1); |
| 78 | ret = 0; | ||
| 79 | break; | 78 | break; |
| 79 | #endif | ||
| 80 | + case KVM_HC_RETURN_MEM: | 80 | + case KVM_HC_RETURN_MEM: |
| 81 | + ret = kvm_pv_return_mem_op(vcpu->kvm, a0, a1); | 81 | + ret = kvm_pv_return_mem_op(vcpu->kvm, a0, a1); |
| 82 | + break; | 82 | + break; |
| @@ -84,10 +84,10 @@ index 582c75311f95..683a94dd5f03 100644 | |||
| 84 | ret = -KVM_ENOSYS; | 84 | ret = -KVM_ENOSYS; |
| 85 | break; | 85 | break; |
| 86 | diff --git a/include/linux/mm.h b/include/linux/mm.h | 86 | diff --git a/include/linux/mm.h b/include/linux/mm.h |
| 87 | index 925ec25f99a8..833f23d98baa 100644 | 87 | index bf52e0498247..d8bcf5c4b996 100644 |
| 88 | --- a/include/linux/mm.h | 88 | --- a/include/linux/mm.h |
| 89 | +++ b/include/linux/mm.h | 89 | +++ b/include/linux/mm.h |
| 90 | @@ -2303,6 +2303,11 @@ extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm); | 90 | @@ -2406,6 +2406,11 @@ extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm); |
| 91 | extern int sysctl_drop_caches; | 91 | extern int sysctl_drop_caches; |
| 92 | int drop_caches_sysctl_handler(struct ctl_table *, int, | 92 | int drop_caches_sysctl_handler(struct ctl_table *, int, |
| 93 | void __user *, size_t *, loff_t *); | 93 | void __user *, size_t *, loff_t *); |
| @@ -100,13 +100,13 @@ index 925ec25f99a8..833f23d98baa 100644 | |||
| 100 | 100 | ||
| 101 | void drop_slab(void); | 101 | void drop_slab(void); |
| 102 | diff --git a/include/uapi/linux/kvm_para.h b/include/uapi/linux/kvm_para.h | 102 | diff --git a/include/uapi/linux/kvm_para.h b/include/uapi/linux/kvm_para.h |
| 103 | index bf6cd7d5cac2..7d90f77d87d0 100644 | 103 | index fed506aeff62..ebc482ce7d38 100644 |
| 104 | --- a/include/uapi/linux/kvm_para.h | 104 | --- a/include/uapi/linux/kvm_para.h |
| 105 | +++ b/include/uapi/linux/kvm_para.h | 105 | +++ b/include/uapi/linux/kvm_para.h |
| 106 | @@ -23,6 +23,9 @@ | 106 | @@ -25,6 +25,9 @@ |
| 107 | #define KVM_HC_MIPS_GET_CLOCK_FREQ 6 | ||
| 108 | #define KVM_HC_MIPS_EXIT_VM 7 | 107 | #define KVM_HC_MIPS_EXIT_VM 7 |
| 109 | #define KVM_HC_MIPS_CONSOLE_OUTPUT 8 | 108 | #define KVM_HC_MIPS_CONSOLE_OUTPUT 8 |
| 109 | #define KVM_HC_CLOCK_PAIRING 9 | ||
| 110 | +#define KVM_HC_RETURN_MEM 10 | 110 | +#define KVM_HC_RETURN_MEM 10 |
| 111 | + | 111 | + |
| 112 | +#define KVM_MAX_RET_MEM_SIZE (1 << 22) // 4MiB | 112 | +#define KVM_MAX_RET_MEM_SIZE (1 << 22) // 4MiB |
| @@ -114,10 +114,10 @@ index bf6cd7d5cac2..7d90f77d87d0 100644 | |||
| 114 | /* | 114 | /* |
| 115 | * hypercalls use architecture specific | 115 | * hypercalls use architecture specific |
| 116 | diff --git a/kernel/sysctl.c b/kernel/sysctl.c | 116 | diff --git a/kernel/sysctl.c b/kernel/sysctl.c |
| 117 | index c1095cdc0fe2..d8ae774fa042 100644 | 117 | index 4dfba1a76cc3..771a930cadfa 100644 |
| 118 | --- a/kernel/sysctl.c | 118 | --- a/kernel/sysctl.c |
| 119 | +++ b/kernel/sysctl.c | 119 | +++ b/kernel/sysctl.c |
| 120 | @@ -1398,6 +1398,13 @@ static struct ctl_table vm_table[] = { | 120 | @@ -1387,6 +1387,13 @@ static struct ctl_table vm_table[] = { |
| 121 | .extra1 = &one, | 121 | .extra1 = &one, |
| 122 | .extra2 = &four, | 122 | .extra2 = &four, |
| 123 | }, | 123 | }, |
| @@ -132,25 +132,26 @@ index c1095cdc0fe2..d8ae774fa042 100644 | |||
| 132 | { | 132 | { |
| 133 | .procname = "compact_memory", | 133 | .procname = "compact_memory", |
| 134 | diff --git a/mm/Makefile b/mm/Makefile | 134 | diff --git a/mm/Makefile b/mm/Makefile |
| 135 | index 295bd7a..6455723 100644 | 135 | index 026f6a828a50..28d95bed7e1d 100644 |
| 136 | --- a/mm/Makefile | 136 | --- a/mm/Makefile |
| 137 | +++ b/mm/Makefile | 137 | +++ b/mm/Makefile |
| 138 | @@ -47,6 +47,8 @@ else | 138 | @@ -39,7 +39,7 @@ obj-y := filemap.o mempool.o oom_kill.o \ |
| 139 | obj-y += bootmem.o | 139 | mm_init.o mmu_context.o percpu.o slab_common.o \ |
| 140 | endif | 140 | compaction.o vmacache.o swap_slots.o \ |
| 141 | interval_tree.o list_lru.o workingset.o \ | ||
| 142 | - debug.o $(mmu-y) | ||
| 143 | + debug.o kvm.o $(mmu-y) | ||
| 144 | |||
| 145 | obj-y += init-mm.o | ||
| 141 | 146 | ||
| 142 | +obj-y += kvm.o | ||
| 143 | + | ||
| 144 | obj-$(CONFIG_ADVISE_SYSCALLS) += fadvise.o | ||
| 145 | ifdef CONFIG_MMU | ||
| 146 | obj-$(CONFIG_ADVISE_SYSCALLS) += madvise.o | ||
| 147 | diff --git a/mm/kvm.c b/mm/kvm.c | 147 | diff --git a/mm/kvm.c b/mm/kvm.c |
| 148 | new file mode 100644 | 148 | new file mode 100644 |
| 149 | index 000000000000..8945f6a311b9 | 149 | index 000000000000..1c5600788221 |
| 150 | --- /dev/null | 150 | --- /dev/null |
| 151 | +++ b/mm/kvm.c | 151 | +++ b/mm/kvm.c |
| 152 | @@ -0,0 +1,25 @@ | 152 | @@ -0,0 +1,26 @@ |
| 153 | +#include <linux/mman.h> | 153 | +#include <linux/mman.h> |
| 154 | +#include <linux/sysctl.h> | ||
| 154 | + | 155 | + |
| 155 | +int sysctl_kvm_madv_instant_free; | 156 | +int sysctl_kvm_madv_instant_free; |
| 156 | + | 157 | + |
| @@ -176,5 +177,5 @@ index 000000000000..8945f6a311b9 | |||
| 176 | + return 0; | 177 | + return 0; |
| 177 | +} | 178 | +} |
| 178 | -- | 179 | -- |
| 179 | 2.12.1 | 180 | 2.13.2 |
| 180 | 181 | ||
diff --git a/patches/boot_time_opt_guest/0153-x86-Return-memory-from-guest-to-host-kernel.patch b/patches/boot_time_opt_guest/0153-x86-Return-memory-from-guest-to-host-kernel.patch index cdb876a..e0364ef 100644 --- a/patches/boot_time_opt_guest/0153-x86-Return-memory-from-guest-to-host-kernel.patch +++ b/patches/boot_time_opt_guest/0153-x86-Return-memory-from-guest-to-host-kernel.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 855ef164854307839c08c60688eaeac14f9a649e Mon Sep 17 00:00:00 2001 | 1 | From 986184ccf3e478cf9eeffc635e444ea025eb4052 Mon Sep 17 00:00:00 2001 |
| 2 | From: Sebastien Boeuf <sebastien.boeuf@intel.com> | 2 | From: Sebastien Boeuf <sebastien.boeuf@intel.com> |
| 3 | Date: Mon, 23 Jan 2017 15:26:13 -0800 | 3 | Date: Mon, 23 Jan 2017 15:26:13 -0800 |
| 4 | Subject: [PATCH 153/154] x86: Return memory from guest to host kernel | 4 | Subject: [PATCH 153/154] x86: Return memory from guest to host kernel |
| @@ -86,10 +86,10 @@ index bc62e7cbf1b1..4a2f6d1adbd2 100644 | |||
| 86 | #ifdef CONFIG_PARAVIRT_SPINLOCKS | 86 | #ifdef CONFIG_PARAVIRT_SPINLOCKS |
| 87 | void __init kvm_spinlock_init(void); | 87 | void __init kvm_spinlock_init(void); |
| 88 | diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c | 88 | diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c |
| 89 | index edbbfc854e39..14167b3f6514 100644 | 89 | index 43e10d6fdbed..8479d3fb6206 100644 |
| 90 | --- a/arch/x86/kernel/kvm.c | 90 | --- a/arch/x86/kernel/kvm.c |
| 91 | +++ b/arch/x86/kernel/kvm.c | 91 | +++ b/arch/x86/kernel/kvm.c |
| 92 | @@ -552,6 +552,16 @@ static __init int activate_jump_labels(void) | 92 | @@ -549,6 +549,16 @@ static __init int activate_jump_labels(void) |
| 93 | } | 93 | } |
| 94 | arch_initcall(activate_jump_labels); | 94 | arch_initcall(activate_jump_labels); |
| 95 | 95 | ||
| @@ -131,18 +131,18 @@ index 4efc3f56e6df..26eb3a05a8a3 100644 | |||
| 131 | + | 131 | + |
| 132 | #endif /* _LINUX_MM_ARCH_HOOKS_H */ | 132 | #endif /* _LINUX_MM_ARCH_HOOKS_H */ |
| 133 | diff --git a/mm/page_alloc.c b/mm/page_alloc.c | 133 | diff --git a/mm/page_alloc.c b/mm/page_alloc.c |
| 134 | index 1460e6ad5e14..5f6e6371bc6f 100644 | 134 | index 2302f250d6b1..65e9121583e1 100644 |
| 135 | --- a/mm/page_alloc.c | 135 | --- a/mm/page_alloc.c |
| 136 | +++ b/mm/page_alloc.c | 136 | +++ b/mm/page_alloc.c |
| 137 | @@ -64,6 +64,7 @@ | 137 | @@ -65,6 +65,7 @@ |
| 138 | #include <linux/page_owner.h> | 138 | #include <linux/page_owner.h> |
| 139 | #include <linux/kthread.h> | 139 | #include <linux/kthread.h> |
| 140 | #include <linux/memcontrol.h> | 140 | #include <linux/memcontrol.h> |
| 141 | +#include <linux/mm-arch-hooks.h> | 141 | +#include <linux/mm-arch-hooks.h> |
| 142 | #include <linux/ftrace.h> | ||
| 142 | 143 | ||
| 143 | #include <asm/sections.h> | 144 | #include <asm/sections.h> |
| 144 | #include <asm/tlbflush.h> | 145 | @@ -869,6 +870,7 @@ static inline void __free_one_page(struct page *page, |
| 145 | @@ -855,6 +856,7 @@ static inline void __free_one_page(struct page *page, | ||
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | done_merging: | 148 | done_merging: |
| @@ -151,5 +151,5 @@ index 1460e6ad5e14..5f6e6371bc6f 100644 | |||
| 151 | 151 | ||
| 152 | /* | 152 | /* |
| 153 | -- | 153 | -- |
| 154 | 2.12.1 | 154 | 2.13.2 |
| 155 | 155 | ||
diff --git a/patches/boot_time_opt_guest/0154-sysctl-vm-Fine-grained-cache-shrinking.patch b/patches/boot_time_opt_guest/0154-sysctl-vm-Fine-grained-cache-shrinking.patch index 07d4a83..a5d2b29 100644 --- a/patches/boot_time_opt_guest/0154-sysctl-vm-Fine-grained-cache-shrinking.patch +++ b/patches/boot_time_opt_guest/0154-sysctl-vm-Fine-grained-cache-shrinking.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 2c145b5233b504f5226a0f4bc44baeef33b444d8 Mon Sep 17 00:00:00 2001 | 1 | From c7d8564d5d34c615e5ab03aa1e270888f49ff8b5 Mon Sep 17 00:00:00 2001 |
| 2 | From: Sebastien Boeuf <sebastien.boeuf@intel.com> | 2 | From: Sebastien Boeuf <sebastien.boeuf@intel.com> |
| 3 | Date: Mon, 23 Jan 2017 15:32:39 -0800 | 3 | Date: Mon, 23 Jan 2017 15:32:39 -0800 |
| 4 | Subject: [PATCH 154/154] sysctl: vm: Fine-grained cache shrinking | 4 | Subject: [PATCH 154/154] sysctl: vm: Fine-grained cache shrinking |
| @@ -79,10 +79,10 @@ index d72d52b90433..f564dfcc13a4 100644 | |||
| 79 | + return 0; | 79 | + return 0; |
| 80 | +} | 80 | +} |
| 81 | diff --git a/include/linux/mm.h b/include/linux/mm.h | 81 | diff --git a/include/linux/mm.h b/include/linux/mm.h |
| 82 | index 833f23d98baa..0bb66c1c31c9 100644 | 82 | index d8bcf5c4b996..9a1fc3cecac8 100644 |
| 83 | --- a/include/linux/mm.h | 83 | --- a/include/linux/mm.h |
| 84 | +++ b/include/linux/mm.h | 84 | +++ b/include/linux/mm.h |
| 85 | @@ -2308,6 +2308,10 @@ extern int kvm_ret_mem_advice; | 85 | @@ -2411,6 +2411,10 @@ extern int kvm_ret_mem_advice; |
| 86 | int kvm_madv_instant_free_sysctl_handler(struct ctl_table *table, int write, | 86 | int kvm_madv_instant_free_sysctl_handler(struct ctl_table *table, int write, |
| 87 | void __user *buffer, size_t *length, | 87 | void __user *buffer, size_t *length, |
| 88 | loff_t *ppos); | 88 | loff_t *ppos); |
| @@ -94,10 +94,10 @@ index 833f23d98baa..0bb66c1c31c9 100644 | |||
| 94 | 94 | ||
| 95 | void drop_slab(void); | 95 | void drop_slab(void); |
| 96 | diff --git a/kernel/sysctl.c b/kernel/sysctl.c | 96 | diff --git a/kernel/sysctl.c b/kernel/sysctl.c |
| 97 | index d8ae774fa042..5dc9a46ae212 100644 | 97 | index 771a930cadfa..3bdd8030b7af 100644 |
| 98 | --- a/kernel/sysctl.c | 98 | --- a/kernel/sysctl.c |
| 99 | +++ b/kernel/sysctl.c | 99 | +++ b/kernel/sysctl.c |
| 100 | @@ -1405,6 +1405,14 @@ static struct ctl_table vm_table[] = { | 100 | @@ -1394,6 +1394,14 @@ static struct ctl_table vm_table[] = { |
| 101 | .mode = 0644, | 101 | .mode = 0644, |
| 102 | .proc_handler = kvm_madv_instant_free_sysctl_handler, | 102 | .proc_handler = kvm_madv_instant_free_sysctl_handler, |
| 103 | }, | 103 | }, |
| @@ -113,10 +113,10 @@ index d8ae774fa042..5dc9a46ae212 100644 | |||
| 113 | { | 113 | { |
| 114 | .procname = "compact_memory", | 114 | .procname = "compact_memory", |
| 115 | diff --git a/mm/vmscan.c b/mm/vmscan.c | 115 | diff --git a/mm/vmscan.c b/mm/vmscan.c |
| 116 | index 30a88b945a44..1198e74d1860 100644 | 116 | index 8ad39bbc79e6..d977e489d7f1 100644 |
| 117 | --- a/mm/vmscan.c | 117 | --- a/mm/vmscan.c |
| 118 | +++ b/mm/vmscan.c | 118 | +++ b/mm/vmscan.c |
| 119 | @@ -3525,7 +3525,6 @@ void wakeup_kswapd(struct zone *zone, int order, enum zone_type classzone_idx) | 119 | @@ -3574,7 +3574,6 @@ void wakeup_kswapd(struct zone *zone, int order, enum zone_type classzone_idx) |
| 120 | wake_up_interruptible(&pgdat->kswapd_wait); | 120 | wake_up_interruptible(&pgdat->kswapd_wait); |
| 121 | } | 121 | } |
| 122 | 122 | ||
| @@ -124,7 +124,7 @@ index 30a88b945a44..1198e74d1860 100644 | |||
| 124 | /* | 124 | /* |
| 125 | * Try to free `nr_to_reclaim' of memory, system-wide, and return the number of | 125 | * Try to free `nr_to_reclaim' of memory, system-wide, and return the number of |
| 126 | * freed pages. | 126 | * freed pages. |
| 127 | @@ -3564,7 +3563,6 @@ unsigned long shrink_all_memory(unsigned long nr_to_reclaim) | 127 | @@ -3614,7 +3613,6 @@ unsigned long shrink_all_memory(unsigned long nr_to_reclaim) |
| 128 | 128 | ||
| 129 | return nr_reclaimed; | 129 | return nr_reclaimed; |
| 130 | } | 130 | } |
| @@ -133,5 +133,5 @@ index 30a88b945a44..1198e74d1860 100644 | |||
| 133 | /* It's optimal to keep kswapds on the same CPUs as their memory, but | 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 | 134 | not required for correctness. So if the last cpu in a node goes |
| 135 | -- | 135 | -- |
| 136 | 2.12.1 | 136 | 2.13.2 |
| 137 | 137 | ||
diff --git a/patches/boot_time_opt_guest/guest_boot_time_opt.scc b/patches/boot_time_opt_guest/guest_boot_time_opt.scc index 3636c01..c571cbf 100644 --- a/patches/boot_time_opt_guest/guest_boot_time_opt.scc +++ b/patches/boot_time_opt_guest/guest_boot_time_opt.scc | |||
| @@ -1,17 +1,15 @@ | |||
| 1 | define KFEATURE_DESCRIPTION "Boot time optimization changes ported from ClearLinux , https://github.com/clearlinux-pkgs/linux-kvm" | 1 | define KFEATURE_DESCRIPTION "Boot time optimization changes ported from ClearLinux , https://github.com/clearlinux-pkgs/linux-kvm" |
| 2 | define KFEATURE_COMPATIBILITY all | 2 | define KFEATURE_COMPATIBILITY all |
| 3 | 3 | ||
| 4 | patch 0103-sysrq-skip-synchronize_rcu-if-there-is-no-old-op.patch | 4 | patch 0102-sysrq-skip-synchronize_rcu-if-there-is-no-old-op.patch |
| 5 | patch 0104-fbcon-enable-no-blink-by-default.patch | 5 | patch 0103-fbcon-enable-no-blink-by-default.patch |
| 6 | patch 0105-vmstats-wakeups.patch | 6 | patch 0104-mm-reduce-vmstat-wakeups.patch |
| 7 | # Remove patch because it causes ixgvbevf to not initialize correctly in the guest | 7 | patch 0106-cgroup-delayed-work.patch |
| 8 | #patch 0106-pci-probe.patch | 8 | patch 0107-smpboot-reuse-timer-calibration.patch |
| 9 | patch 0107-cgroup.patch | 9 | patch 0108-perf.patch |
| 10 | patch 0108-smpboot-reuse-timer-calibration.patch | 10 | patch 0109-pci-probe-identify-known-devices.patch |
| 11 | patch 0109-perf.patch | 11 | patch 0110-init-no-wait-for-the-known-devices.patch |
| 12 | patch 0110-pci-probe-identify-known-devices.patch | 12 | patch 0111-ksm-wakeups.patch |
| 13 | patch 0111-init-no-wait-for-the-known-devices.patch | ||
| 14 | patch 0112-ksm-wakeups.patch | ||
| 15 | 13 | ||
| 16 | patch 0151-mm-Export-do_madvise.patch | 14 | patch 0151-mm-Export-do_madvise.patch |
| 17 | patch 0152-x86-kvm-Notify-host-to-release-pages.patch | 15 | patch 0152-x86-kvm-Notify-host-to-release-pages.patch |
