search for: totalram_pages

Displaying 20 results from an estimated 79 matches for "totalram_pages".

2013 May 26
6
[PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages
Enhance adjust_managed_page_count() to adjust totalhigh_pages for highmem pages. And change code which directly adjusts totalram_pages to use adjust_managed_page_count() because it adjusts totalram_pages, totalhigh_pages and zone->managed_pages altogether in a safe way. Remove inc_totalhigh_pages() and dec_totalhigh_pages() from xen/balloon driver bacause adjust_managed_page_count() has already adjusted totalhigh_pages. This...
2013 May 26
6
[PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages
Enhance adjust_managed_page_count() to adjust totalhigh_pages for highmem pages. And change code which directly adjusts totalram_pages to use adjust_managed_page_count() because it adjusts totalram_pages, totalhigh_pages and zone->managed_pages altogether in a safe way. Remove inc_totalhigh_pages() and dec_totalhigh_pages() from xen/balloon driver bacause adjust_managed_page_count() has already adjusted totalhigh_pages. This...
2013 May 26
6
[PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages
Enhance adjust_managed_page_count() to adjust totalhigh_pages for highmem pages. And change code which directly adjusts totalram_pages to use adjust_managed_page_count() because it adjusts totalram_pages, totalhigh_pages and zone->managed_pages altogether in a safe way. Remove inc_totalhigh_pages() and dec_totalhigh_pages() from xen/balloon driver bacause adjust_managed_page_count() has already adjusted totalhigh_pages. This...
2007 Nov 16
1
how mem-set / balloon changes totalram_pages
...rent memory allocation of a dom, the MemTotal in /proc/meminfo will give the current allocation. In my understanding, the balloon driver simply alloc / free pages, so the MemTotal should not be changed. Only the free memory will be affected. In normal linux, the value of MemTotal comes from "totalram_pages" defined in arch/i386/mm/init.c I tried to located the code in Xen, which changes the variable, but I didn''t find such code. I tried to locate the implementation of HYPERCALL_memory_op, but I can only traced to "call hypercall_page + STR(...)" Can someone tell me where I...
2013 May 11
0
[PATCH v6, part3 13/16] mm: correctly update zone->mamaged_pages
Enhance adjust_managed_page_count() to adjust totalhigh_pages for highmem pages. And change code which directly adjusts totalram_pages to use adjust_managed_page_count() because it adjusts totalram_pages, totalhigh_pages and zone->managed_pages altogether in a safe way. Remove inc_totalhigh_pages() and dec_totalhigh_pages() from xen/balloon driver bacause adjust_managed_page_count() has already adjusted totalhigh_pages. This...
2013 May 11
0
[PATCH v6, part3 13/16] mm: correctly update zone->mamaged_pages
Enhance adjust_managed_page_count() to adjust totalhigh_pages for highmem pages. And change code which directly adjusts totalram_pages to use adjust_managed_page_count() because it adjusts totalram_pages, totalhigh_pages and zone->managed_pages altogether in a safe way. Remove inc_totalhigh_pages() and dec_totalhigh_pages() from xen/balloon driver bacause adjust_managed_page_count() has already adjusted totalhigh_pages. This...
2013 May 11
0
[PATCH v6, part3 13/16] mm: correctly update zone->mamaged_pages
Enhance adjust_managed_page_count() to adjust totalhigh_pages for highmem pages. And change code which directly adjusts totalram_pages to use adjust_managed_page_count() because it adjusts totalram_pages, totalhigh_pages and zone->managed_pages altogether in a safe way. Remove inc_totalhigh_pages() and dec_totalhigh_pages() from xen/balloon driver bacause adjust_managed_page_count() has already adjusted totalhigh_pages. This...
2006 Mar 08
0
[patch] small fix for memory information
Hi. I found small bug of memory information again. In recent -unstable, memory information in Guest OSs is difference with actual memory allocation when using extra mem option. Totalram_pages in Guest OS became amount of memory written mem option. However, when using -xen0 kernel, this information became correct information. This cause is that totalram_pages is not updated in init function, and by handle increase/decrease reservation functions after init function or not, totalram_page...
2018 Jun 15
2
[PATCH v33 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...ory per page) free memory to host. It is not flexible. > > How about allocating the buffer according to the guest memory size (proportional)? That is, > > /* Calculates the maximum number of 4MB (equals to 1024 pages) free pages blocks that the system can have */ > 4m_page_blocks = totalram_pages / 1024; > > /* Allocating one page can hold 512 free page blocks, so calculates the number of pages that can hold those 4MB blocks. And this allocation should not exceed 1024 pages */ > pages_to_allocate = min(4m_page_blocks / 512, 1024); > > For a 2TB guests, which has 2^19 page b...
2018 Jun 15
2
[PATCH v33 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...ory per page) free memory to host. It is not flexible. > > How about allocating the buffer according to the guest memory size (proportional)? That is, > > /* Calculates the maximum number of 4MB (equals to 1024 pages) free pages blocks that the system can have */ > 4m_page_blocks = totalram_pages / 1024; > > /* Allocating one page can hold 512 free page blocks, so calculates the number of pages that can hold those 4MB blocks. And this allocation should not exceed 1024 pages */ > pages_to_allocate = min(4m_page_blocks / 512, 1024); > > For a 2TB guests, which has 2^19 page b...
2013 Mar 10
1
[PATCH v2, part1 00/29] Use helper functions to simplify memory intialization code
...lso been expanded to reduce common code used by memory initializion. This is the first part, which applies to v3.9-rc1. It introduces following common helper functions to simplify free_initmem() and free_initrd_mem() on different architectures: adjust_managed_page_count(): will be used to adjust totalram_pages, totalhigh_pages, zone->managed_pages when reserving/unresering a page. __free_reserved_page(): free a reserved page into the buddy system without adjusting page statistics info free_reserved_page(): free a reserved page into the buddy system and adjust page statistics info mark_page_reserv...
2013 Mar 10
1
[PATCH v2, part1 00/29] Use helper functions to simplify memory intialization code
...lso been expanded to reduce common code used by memory initializion. This is the first part, which applies to v3.9-rc1. It introduces following common helper functions to simplify free_initmem() and free_initrd_mem() on different architectures: adjust_managed_page_count(): will be used to adjust totalram_pages, totalhigh_pages, zone->managed_pages when reserving/unresering a page. __free_reserved_page(): free a reserved page into the buddy system without adjusting page statistics info free_reserved_page(): free a reserved page into the buddy system and adjust page statistics info mark_page_reserv...
2008 Jan 08
1
[PATCH] kvm guest balloon driver
...e->bp_list, &tmp_list); + allocated++; + *pfn = page_to_pfn(node->bpage); + pfn++; + } + + r = send_balloon_buf(CMD_BALLOON_INFLATE, buf); + if (r) + goto out_free; + + spin_lock(&balloon_plist_lock); + list_splice(&tmp_list, &balloon_plist); + balloon_size += allocated; + totalram_pages -= allocated; + dprintk("%s: current balloon size=%d\n", __FUNCTION__, + balloon_size); + spin_unlock(&balloon_plist_lock); + return allocated; + +out_free: + list_for_each_entry_safe(node, tmp, &tmp_list, bp_list) { + __free_page(node->bpage); + list_del(&node-&gt...
2008 Jan 08
1
[PATCH] kvm guest balloon driver
...e->bp_list, &tmp_list); + allocated++; + *pfn = page_to_pfn(node->bpage); + pfn++; + } + + r = send_balloon_buf(CMD_BALLOON_INFLATE, buf); + if (r) + goto out_free; + + spin_lock(&balloon_plist_lock); + list_splice(&tmp_list, &balloon_plist); + balloon_size += allocated; + totalram_pages -= allocated; + dprintk("%s: current balloon size=%d\n", __FUNCTION__, + balloon_size); + spin_unlock(&balloon_plist_lock); + return allocated; + +out_free: + list_for_each_entry_safe(node, tmp, &tmp_list, bp_list) { + __free_page(node->bpage); + list_del(&node-&gt...
2008 Jan 14
6
[PATCH] KVM virtio balloon driver
...ge->lru, &tmp_list); + allocated++; + *pfn = page_to_pfn(page); + pfn++; + } + + r = send_balloon_buf(v, CMD_BALLOON_INFLATE, buf); + if (r) + goto out_free; + + spin_lock(&v->plist_lock); + list_splice(&tmp_list, &v->balloon_plist); + v->balloon_size += allocated; + totalram_pages -= allocated; + dprintk(&v->vdev->dev, "%s: current balloon size=%d\n", __func__, + v->balloon_size); + spin_unlock(&v->plist_lock); + return allocated; + +out_free: + list_for_each_entry_safe(page, tmp, &tmp_list, lru) { + list_del(&page->lru); + __free_...
2008 Jan 14
6
[PATCH] KVM virtio balloon driver
...ge->lru, &tmp_list); + allocated++; + *pfn = page_to_pfn(page); + pfn++; + } + + r = send_balloon_buf(v, CMD_BALLOON_INFLATE, buf); + if (r) + goto out_free; + + spin_lock(&v->plist_lock); + list_splice(&tmp_list, &v->balloon_plist); + v->balloon_size += allocated; + totalram_pages -= allocated; + dprintk(&v->vdev->dev, "%s: current balloon size=%d\n", __func__, + v->balloon_size); + spin_unlock(&v->plist_lock); + return allocated; + +out_free: + list_for_each_entry_safe(page, tmp, &tmp_list, lru) { + list_del(&page->lru); + __free_...
2018 Jun 15
2
[PATCH v33 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
On Fri, Jun 15, 2018 at 12:43:11PM +0800, Wei Wang wrote: > Negotiation of the VIRTIO_BALLOON_F_FREE_PAGE_HINT feature indicates the > support of reporting hints of guest free pages to host via virtio-balloon. > > Host requests the guest to report free page hints by sending a command > to the guest via setting the VIRTIO_BALLOON_HOST_CMD_FREE_PAGE_HINT bit > of the host_cmd
2018 Jun 15
2
[PATCH v33 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
On Fri, Jun 15, 2018 at 12:43:11PM +0800, Wei Wang wrote: > Negotiation of the VIRTIO_BALLOON_F_FREE_PAGE_HINT feature indicates the > support of reporting hints of guest free pages to host via virtio-balloon. > > Host requests the guest to report free page hints by sending a command > to the guest via setting the VIRTIO_BALLOON_HOST_CMD_FREE_PAGE_HINT bit > of the host_cmd
2018 Jun 16
0
[PATCH v33 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...t flexible. > > > > How about allocating the buffer according to the guest memory size > > (proportional)? That is, > > > > /* Calculates the maximum number of 4MB (equals to 1024 pages) free > > pages blocks that the system can have */ 4m_page_blocks = > > totalram_pages / 1024; > > > > /* Allocating one page can hold 512 free page blocks, so calculates > > the number of pages that can hold those 4MB blocks. And this > > allocation should not exceed 1024 pages */ pages_to_allocate = > > min(4m_page_blocks / 512, 1024); > > > &...
2006 Jun 08
5
balloon question
Running with Xen option dom0_mem=6G and kernel option mem=8G, I would have expected that I would see the system with a 2G balloon right after boot. However, the balloon is empty. Briefly looking at this, it would seem to me that, with all pages being reserved when the system starts and only the populated ones getting the reserved status cleared in __free_pages_bootmem(), the condition to put pages