search for: entries_per_pag

Displaying 17 results from an estimated 17 matches for "entries_per_pag".

Did you mean: entries_per_page
2018 Jun 27
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...gt; > Best, > > > Wei > > How much memory is this allocating anyway? > > > > For every 2TB memory that the guest has, we allocate 4MB. Hmm I guess I'm missing something, I don't see it: + max_entries = max_free_page_blocks(ARRAY_ALLOC_ORDER); + entries_per_page = PAGE_SIZE / sizeof(__le64); + entries_per_array = entries_per_page * (1 << ARRAY_ALLOC_ORDER); + max_array_num = max_entries / entries_per_array + + !!(max_entries % entries_per_array); Looks like you always allocate the max number? > This is the sam...
2018 Jun 27
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...gt; > Best, > > > Wei > > How much memory is this allocating anyway? > > > > For every 2TB memory that the guest has, we allocate 4MB. Hmm I guess I'm missing something, I don't see it: + max_entries = max_free_page_blocks(ARRAY_ALLOC_ORDER); + entries_per_page = PAGE_SIZE / sizeof(__le64); + entries_per_array = entries_per_page * (1 << ARRAY_ALLOC_ORDER); + max_array_num = max_entries / entries_per_array + + !!(max_entries % entries_per_array); Looks like you always allocate the max number? > This is the sam...
2018 Jun 27
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...this allocating anyway? > > > > > > > For every 2TB memory that the guest has, we allocate 4MB. > > Hmm I guess I'm missing something, I don't see it: > > > > > > + max_entries = max_free_page_blocks(ARRAY_ALLOC_ORDER); > > + entries_per_page = PAGE_SIZE / sizeof(__le64); > > + entries_per_array = entries_per_page * (1 << ARRAY_ALLOC_ORDER); > > + max_array_num = max_entries / entries_per_array + > > + !!(max_entries % entries_per_array); > > > > Looks like you alwa...
2018 Jun 27
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...this allocating anyway? > > > > > > > For every 2TB memory that the guest has, we allocate 4MB. > > Hmm I guess I'm missing something, I don't see it: > > > > > > + max_entries = max_free_page_blocks(ARRAY_ALLOC_ORDER); > > + entries_per_page = PAGE_SIZE / sizeof(__le64); > > + entries_per_array = entries_per_page * (1 << ARRAY_ALLOC_ORDER); > > + max_array_num = max_entries / entries_per_array + > > + !!(max_entries % entries_per_array); > > > > Looks like you alwa...
2018 Jun 27
0
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...> Wei >>> How much memory is this allocating anyway? >>> >> For every 2TB memory that the guest has, we allocate 4MB. > Hmm I guess I'm missing something, I don't see it: > > > + max_entries = max_free_page_blocks(ARRAY_ALLOC_ORDER); > + entries_per_page = PAGE_SIZE / sizeof(__le64); > + entries_per_array = entries_per_page * (1 << ARRAY_ALLOC_ORDER); > + max_array_num = max_entries / entries_per_array + > + !!(max_entries % entries_per_array); > > Looks like you always allocate the max number...
2018 Jun 27
0
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...anyway? >>>>> >>>> For every 2TB memory that the guest has, we allocate 4MB. >>> Hmm I guess I'm missing something, I don't see it: >>> >>> >>> + max_entries = max_free_page_blocks(ARRAY_ALLOC_ORDER); >>> + entries_per_page = PAGE_SIZE / sizeof(__le64); >>> + entries_per_array = entries_per_page * (1 << ARRAY_ALLOC_ORDER); >>> + max_array_num = max_entries / entries_per_array + >>> + !!(max_entries % entries_per_array); >>> >>> Looks...
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...esses of the allocated > + * arrays, or NULL if no arrays are allocated. > + */ > +static __le64 **virtio_balloon_load_hints(struct virtio_balloon *vb, > + uint32_t *array_num, > + uint32_t *last_array_hints) > +{ > + __le64 **arrays; > + uint32_t max_entries, entries_per_page, entries_per_array, > + max_array_num, loaded_hints; All above likely should be int. > + int i; > + > + max_entries = max_free_page_blocks(ARRAY_ALLOC_ORDER); > + entries_per_page = PAGE_SIZE / sizeof(__le64); > + entries_per_array = entries_per_page * (1 << ARRAY_ALLOC...
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...esses of the allocated > + * arrays, or NULL if no arrays are allocated. > + */ > +static __le64 **virtio_balloon_load_hints(struct virtio_balloon *vb, > + uint32_t *array_num, > + uint32_t *last_array_hints) > +{ > + __le64 **arrays; > + uint32_t max_entries, entries_per_page, entries_per_array, > + max_array_num, loaded_hints; All above likely should be int. > + int i; > + > + max_entries = max_free_page_blocks(ARRAY_ALLOC_ORDER); > + entries_per_page = PAGE_SIZE / sizeof(__le64); > + entries_per_array = entries_per_page * (1 << ARRAY_ALLOC...
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
On Tue, Jun 26, 2018 at 08:27:44PM +0800, Wei Wang wrote: > On 06/26/2018 11:56 AM, Michael S. Tsirkin wrote: > > On Tue, Jun 26, 2018 at 11:46:35AM +0800, Wei Wang wrote: > > > > > > > > > > > > > > > + if (!arrays) > > > > > + return NULL; > > > > > + > > > > > + for (i = 0; i <
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
On Tue, Jun 26, 2018 at 08:27:44PM +0800, Wei Wang wrote: > On 06/26/2018 11:56 AM, Michael S. Tsirkin wrote: > > On Tue, Jun 26, 2018 at 11:46:35AM +0800, Wei Wang wrote: > > > > > > > > > > > > > > > + if (!arrays) > > > > > + return NULL; > > > > > + > > > > > + for (i = 0; i <
2018 Jun 25
0
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...ointer to the memory that holds the addresses of the allocated + * arrays, or NULL if no arrays are allocated. + */ +static __le64 **virtio_balloon_load_hints(struct virtio_balloon *vb, + uint32_t *array_num, + uint32_t *last_array_hints) +{ + __le64 **arrays; + uint32_t max_entries, entries_per_page, entries_per_array, + max_array_num, loaded_hints; + int i; + + max_entries = max_free_page_blocks(ARRAY_ALLOC_ORDER); + entries_per_page = PAGE_SIZE / sizeof(__le64); + entries_per_array = entries_per_page * (1 << ARRAY_ALLOC_ORDER); + max_array_num = max_entries / entries_per_array + +...
2018 Jun 26
0
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...nk not needed, because we have kicked host about starting the report, and the host side optimization won't exit unless receiving this stop sign or the migration thread asks to exit. > >> + int i; >> + >> + max_entries = max_free_page_blocks(ARRAY_ALLOC_ORDER); >> + entries_per_page = PAGE_SIZE / sizeof(__le64); >> + entries_per_array = entries_per_page * (1 << ARRAY_ALLOC_ORDER); >> + max_array_num = max_entries / entries_per_array + >> + !!(max_entries % entries_per_array); >> + arrays = kmalloc_array(max_array_num, sizeof(__le64 *), GFP_KERN...
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...ration thread asks to exit. You can't assume that. Host might want to sleep. If it doesn't then it will disable notifications and kick will be free. > > > > > + int i; > > > + > > > + max_entries = max_free_page_blocks(ARRAY_ALLOC_ORDER); > > > + entries_per_page = PAGE_SIZE / sizeof(__le64); > > > + entries_per_array = entries_per_page * (1 << ARRAY_ALLOC_ORDER); > > > + max_array_num = max_entries / entries_per_array + > > > + !!(max_entries % entries_per_array); > > > + arrays = kmalloc_array(max_array_num, si...
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...ration thread asks to exit. You can't assume that. Host might want to sleep. If it doesn't then it will disable notifications and kick will be free. > > > > > + int i; > > > + > > > + max_entries = max_free_page_blocks(ARRAY_ALLOC_ORDER); > > > + entries_per_page = PAGE_SIZE / sizeof(__le64); > > > + entries_per_array = entries_per_page * (1 << ARRAY_ALLOC_ORDER); > > > + max_array_num = max_entries / entries_per_array + > > > + !!(max_entries % entries_per_array); > > > + arrays = kmalloc_array(max_array_num, si...
2018 Jun 25
9
[PATCH v34 0/4] 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_HINT, 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
2018 Jun 25
9
[PATCH v34 0/4] 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_HINT, 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
2018 Jul 10
7
[PATCH v35 0/5] 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_HINT, 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