search for: poison_v

Displaying 20 results from an estimated 96 matches for "poison_v".

Did you mean: poison
2018 Feb 08
0
[PATCH v28 4/4] virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON
The VIRTIO_BALLOON_F_PAGE_POISON feature bit is used to indicate if the guest is using page poisoning. Guest writes to the poison_val config field to tell host about the page poisoning value in use. Signed-off-by: Wei Wang <wei.w.wang at intel.com> Suggested-by: Michael S. Tsirkin <mst at redhat.com> Cc: Michael S. Tsirkin <mst at redhat.com> Cc: Michal Hocko <mhocko at suse.com> Cc: Andrew Morton <a...
2020 Apr 22
1
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
>>> What is the expectation there? I assume we are saying either >>> poison_val or unmodified? If so I would think the inflate case makes >>> much more sense as that is where the madvise is called that will >>> discard the data. If so it would be pretty easy to just add a check >>> for the poison value to the same spot we check >>> qemu_ba...
2018 Jan 17
0
[PATCH v22 3/3] virtio-balloon: don't report free pages when page poisoning is enabled
...ges should not be discarded by the live migration thread when page poisoning is enabled with PAGE_POISONING_NO_SANITY=n, because skipping the transfer of such poisoned free pages will trigger false positive when new pages are allocated and checked on the destination. This patch adds a config field, poison_val. Guest writes to the config field to tell the host about the poisoning value. The value will be 0 in the following cases: 1) PAGE_POISONING_NO_SANITY is enabled; 2) page poisoning is disabled; or 3) PAGE_POISONING_ZERO is enabled. Signed-off-by: Wei Wang <wei.w.wang at intel.com> Suggested...
2020 Jul 12
2
[PATCH] virtio_balloon: clear modern features under legacy
...e u32)cpu_to_le32(actual); virtio_cwrite(vb->vdev, struct virtio_balloon_config, actual, &actual); } this is LE even without VIRTIO_F_VERSION_1, so matches spec. /* Start with poison val of 0 representing general init */ __u32 poison_val = 0; /* * Let the hypervisor know that we are expecting a * specific value to be written back in balloon pages. */ if (!want_init_on_free()) memset(&poison_val, PAGE_POISON, sizeof(pois...
2020 Jul 12
2
[PATCH] virtio_balloon: clear modern features under legacy
...e u32)cpu_to_le32(actual); virtio_cwrite(vb->vdev, struct virtio_balloon_config, actual, &actual); } this is LE even without VIRTIO_F_VERSION_1, so matches spec. /* Start with poison val of 0 representing general init */ __u32 poison_val = 0; /* * Let the hypervisor know that we are expecting a * specific value to be written back in balloon pages. */ if (!want_init_on_free()) memset(&poison_val, PAGE_POISON, sizeof(pois...
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...empty line after }, or not, and stick to > it. I prefer an empty line but no biggie as long as we are consistent. Can add one. > >> if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) { >> /* Start with poison val of 0 representing general init */ >> __u32 poison_val = 0; >> @@ -986,15 +980,6 @@ static int virtballoon_probe(struct virtio_device *vdev) >> virtio_cwrite(vb->vdev, struct virtio_balloon_config, >> poison_val, &poison_val); >> } >> - /* >> - * We continue to use VIRTIO_BALLOON_F_DEFLATE_ON...
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...empty line after }, or not, and stick to > it. I prefer an empty line but no biggie as long as we are consistent. Can add one. > >> if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) { >> /* Start with poison val of 0 representing general init */ >> __u32 poison_val = 0; >> @@ -986,15 +980,6 @@ static int virtballoon_probe(struct virtio_device *vdev) >> virtio_cwrite(vb->vdev, struct virtio_balloon_config, >> poison_val, &poison_val); >> } >> - /* >> - * We continue to use VIRTIO_BALLOON_F_DEFLATE_ON...
2020 Aug 05
0
[PATCH v3 29/38] virtio_balloon: use LE config space accesses
...; + virtio_cread_le(vb->vdev, struct virtio_balloon_config, + free_page_hint_cmd_id, + &vb->cmd_id_received_cache); } return vb->cmd_id_received_cache; @@ -987,8 +979,8 @@ static int virtballoon_probe(struct virtio_device *vdev) if (!want_init_on_free()) memset(&poison_val, PAGE_POISON, sizeof(poison_val)); - virtio_cwrite(vb->vdev, struct virtio_balloon_config, - poison_val, &poison_val); + virtio_cwrite_le(vb->vdev, struct virtio_balloon_config, + poison_val, &poison_val); } vb->pr_dev_info.report = virtballoon_free_page_rep...
2018 Feb 08
9
[PATCH v28 0/4] Virtio-balloon: support free page reporting
...imization patched, it takes 5min12s. ChangeLog: v27->v28: - mm/page_poison: Move PAGE_POISON to page_poison.c and add a function to expose page poison val to kernel modules. v26->v27: - add a new patch to expose page_poisoning_enabled to kernel modules - virtio-balloon: set poison_val to 0xaaaaaaaa, instead of 0xaa v25->v26: virtio-balloon changes only - remove kicking free page vq since the host now polls the vq after initiating the reporting - report_free_page_func: detach all the used buffers after sending the stop cmd id. This avoids leaving the deta...
2018 Feb 08
9
[PATCH v28 0/4] Virtio-balloon: support free page reporting
...imization patched, it takes 5min12s. ChangeLog: v27->v28: - mm/page_poison: Move PAGE_POISON to page_poison.c and add a function to expose page poison val to kernel modules. v26->v27: - add a new patch to expose page_poisoning_enabled to kernel modules - virtio-balloon: set poison_val to 0xaaaaaaaa, instead of 0xaa v25->v26: virtio-balloon changes only - remove kicking free page vq since the host now polls the vq after initiating the reporting - report_free_page_func: detach all the used buffers after sending the stop cmd id. This avoids leaving the deta...
2020 Apr 21
2
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...But I just realized that you introduced this comment, not the original VIRTIO_BALLOON_F_PAGE_POISON commit. Should this have been "in reported pages when implicitly deflating them by reusing them." or sth. like that? > What is the expectation there? I assume we are saying either > poison_val or unmodified? If so I would think the inflate case makes > much more sense as that is where the madvise is called that will > discard the data. If so it would be pretty easy to just add a check > for the poison value to the same spot we check > qemu_balloon_is_inhibited. Okay, we ha...
2020 Jul 13
0
[PATCH] virtio_balloon: clear modern features under legacy
...irtio_cwrite(vb->vdev, struct virtio_balloon_config, actual, > &actual); > } > > > this is LE even without VIRTIO_F_VERSION_1, so matches spec. > > /* Start with poison val of 0 representing general init */ > __u32 poison_val = 0; > > /* > * Let the hypervisor know that we are expecting a > * specific value to be written back in balloon pages. > */ > if (!want_init_on_free()) > memset(&po...
2018 Jan 24
0
[PATCH v23 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...;stop_cmd_id); +} + #ifdef CONFIG_BALLOON_COMPACTION /* * virtballoon_migratepage - perform the balloon page migration on behalf of @@ -537,6 +680,7 @@ static struct file_system_type balloon_fs = { static int virtballoon_probe(struct virtio_device *vdev) { struct virtio_balloon *vb; + __u32 poison_val; int err; if (!vdev->config->get) { @@ -566,6 +710,21 @@ static int virtballoon_probe(struct virtio_device *vdev) if (err) goto out_free_vb; + if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_FREE_PAGE_VQ)) { + vb->balloon_wq = alloc_workqueue("balloon-wq", + WQ_...
2018 Jan 24
3
[PATCH v23 0/2] Virtio-balloon: support free page reporting
This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_VQ, implemented by this series enables the virtio-balloon driver to report hints of guest free pages to the host. It can be used to accelerate live migration of VMs. Here is an introduction of this usage: Live migration needs to transfer the VM's memory
2020 Mar 10
0
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...> > it. I prefer an empty line but no biggie as long as we are consistent. > > Can add one. > > > > >> if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) { > >> /* Start with poison val of 0 representing general init */ > >> __u32 poison_val = 0; > >> @@ -986,15 +980,6 @@ static int virtballoon_probe(struct virtio_device *vdev) > >> virtio_cwrite(vb->vdev, struct virtio_balloon_config, > >> poison_val, &poison_val); > >> } > >> - /* > >> - * We continue to u...
2020 Apr 20
2
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
>>> Now we are talking about what's safe to do with the page. >>> >>> If POISON flag is set by hypervisor but clear by guest, >>> or poison_val is 0, then it's clear it's safe to blow >>> away the page if we can figure out it's unused. >>> >>> Otherwise, it's much less clear :) >> >> Hah! Agreed :D > > That isn't quite true. The problem is in the case of hinting it isn'...
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...oom_nb.priority = VIRTIO_BALLOON_OOM_NOTIFY_PRIORITY; + err = register_oom_notifier(&vb->oom_nb); + if (err < 0) + goto out_unregister_shrinker; + } + if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) { /* Start with poison val of 0 representing general init */ __u32 poison_val = 0; @@ -986,15 +980,6 @@ static int virtballoon_probe(struct virtio_device *vdev) virtio_cwrite(vb->vdev, struct virtio_balloon_config, poison_val, &poison_val); } - /* - * We continue to use VIRTIO_BALLOON_F_DEFLATE_ON_OOM to decide if a - * shrinker needs to be register...
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...oom_nb.priority = VIRTIO_BALLOON_OOM_NOTIFY_PRIORITY; + err = register_oom_notifier(&vb->oom_nb); + if (err < 0) + goto out_unregister_shrinker; + } + if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) { /* Start with poison val of 0 representing general init */ __u32 poison_val = 0; @@ -986,15 +980,6 @@ static int virtballoon_probe(struct virtio_device *vdev) virtio_cwrite(vb->vdev, struct virtio_balloon_config, poison_val, &poison_val); } - /* - * We continue to use VIRTIO_BALLOON_F_DEFLATE_ON_OOM to decide if a - * shrinker needs to be register...
2020 Apr 21
2
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...ritten by the guest >> (even before the hinting request was processed by the host), the >> modified page will stay - whereby the unwritten parts might either be >> from the old, or from a page filled with X. Without >> VIRTIO_BALLOON_F_PAGE_POISON, X is zero, otherwise it is poison_val." [...] > > With the VIRTIO_BALLOON_F_PAGE_POISON we could make it so that when > the page comes out of the balloon it is either unmodified or it is > poison_val. Without the VIRTIO_BALLOON_F_PAGE_POISON feature present > you cannot make that guarantee and are stuck with th...
2018 Jan 24
2
[PATCH v23 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...BALLOON_COMPACTION > /* > * virtballoon_migratepage - perform the balloon page migration on behalf of > @@ -537,6 +680,7 @@ static struct file_system_type balloon_fs = { > static int virtballoon_probe(struct virtio_device *vdev) > { > struct virtio_balloon *vb; > + __u32 poison_val; > int err; > > if (!vdev->config->get) { > @@ -566,6 +710,21 @@ static int virtballoon_probe(struct virtio_device *vdev) > if (err) > goto out_free_vb; > > + if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_FREE_PAGE_VQ)) { > + vb->balloon_wq = allo...