search for: init_on_free

Displaying 10 results from an estimated 10 matches for "init_on_free".

2020 Apr 20
2
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...l* get migrated, even if 4) happens after 3). That's guaranteed by the 2-bitmap magic. Now, assume the following happens (in some future Linux version) (due to your "simply not migrating it" comment): 1) Guest balloon allocates and hints a page. Assume the page is zero due to want_init_on_free(). 2) Hypervisor processes the hinting request. 3) Guest frees the page. Assume we are implementing some magic to "skip" zeroing, as we assume it is still zero. Due to 2), the page won't get migrated. In 3) we expect the page to be 0. QEMU would have to make sure that we always get e...
2020 Apr 20
0
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...to guarantee that the page will have a coherent value stored in it. > Now, assume the following happens (in some future Linux version) (due to > your "simply not migrating it" comment): > > 1) Guest balloon allocates and hints a page. Assume the page is zero due > to want_init_on_free(). > 2) Hypervisor processes the hinting request. > 3) Guest frees the page. Assume we are implementing some magic to "skip" > zeroing, as we assume it is still zero. > > Due to 2), the page won't get migrated. In 3) we expect the page to be > 0. QEMU would have to m...
2020 Apr 16
2
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...e we will need to have it behave in a sane manner. So disabling it if we have a poison value we need to report, but have no mechanism to report it makes sense to me. The actual likelihood of us encountering this case should be pretty low anyway since it is not that common to have page poisoning or init_on_free enabled. > Yes you can not just drop them but you can maybe do > other things such as MADV_SOFT_OFFLINE. > > Finally, VIRTIO_BALLOON_F_FREE_PAGE_HINT does nothing > at all unless guest gets the command from hypervisor, > so there isn't even any overhead. The problem is we ca...
2020 Apr 17
4
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
> What do you call "hinting ends" though? The fact we put > a page in the VQ is not a guarantee that it's been consumed > by the hypervisor. > I'd say hinting ends once the hypervisor sets FREE_PAGE_REPORT_S_DONE. > > I think a strict definition is this: > - hint includes a command ID > - hint implies "page was unused at some point after guest
2020 Apr 17
0
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...ve in a sane manner. So disabling it if we > have a poison value we need to report, but have no mechanism to report > it makes sense to me. > > The actual likelihood of us encountering this case should be pretty > low anyway since it is not that common to have page poisoning or > init_on_free enabled. > > > Yes you can not just drop them but you can maybe do > > other things such as MADV_SOFT_OFFLINE. > > > > Finally, VIRTIO_BALLOON_F_FREE_PAGE_HINT does nothing > > at all unless guest gets the command from hypervisor, > > so there isn't even...
2020 Apr 17
0
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...and hinting can work. The problem is I am left wondering what assumptions we are allowed to leave in place. 1. Can we assume that we don't care about the contents in the pages in the balloon changing? 2. Can we assume that the guest will always rewrite the page after the deflate in the case of init_on_free or poison? 3. Can we assume that free page hinting will always function as a balloon setup, so no moving it over to a page reporting type setup? If we assume the above 3 items then there isn't any point in worrying about poison when it comes to free page hinting. It doesn't make sense to s...
2020 Apr 21
2
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
>>> 2. Can we assume that the guest will always rewrite the page after the >>> deflate in the case of init_on_free or poison? >> >> Depends on what we think is the right way to do - IOW if we think "some >> other content" as mentioned above is a BUG or not. > > So I wouldn't consider it a but as the zero page probably doesn't > apply. We are basically just indicatin...
2020 Apr 16
3
[PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...vers/virtio/virtio_balloon.c index 95d9c2f0a7be..08bc86a6e468 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -1110,8 +1110,12 @@ static int virtballoon_validate(struct virtio_device *vdev) /* Tell the host whether we care about poisoned pages. */ if (!want_init_on_free() && (IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY) || - !page_poisoning_enabled())) + !page_poisoning_enabled())) { __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON); + } else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) { + __virtio_clear_bit(vdev, V...
2020 Apr 16
3
[PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...vers/virtio/virtio_balloon.c index 95d9c2f0a7be..08bc86a6e468 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -1110,8 +1110,12 @@ static int virtballoon_validate(struct virtio_device *vdev) /* Tell the host whether we care about poisoned pages. */ if (!want_init_on_free() && (IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY) || - !page_poisoning_enabled())) + !page_poisoning_enabled())) { __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON); + } else if (!virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) { + __virtio_clear_bit(vdev, V...
2020 Apr 21
0
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
On Tue, Apr 21, 2020 at 12:29 AM David Hildenbrand <david at redhat.com> wrote: > > >>> 2. Can we assume that the guest will always rewrite the page after the > >>> deflate in the case of init_on_free or poison? > >> > >> Depends on what we think is the right way to do - IOW if we think "some > >> other content" as mentioned above is a BUG or not. > > > > So I wouldn't consider it a but as the zero page probably doesn't > > apply. We...