search for: balloon_page_bitmap_init

Displaying 6 results from an estimated 6 matches for "balloon_page_bitmap_init".

2016 May 20
6
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...e_bitmap; + unsigned long start_pfn, end_pfn; + unsigned long bmap_len; /* * The pages we've told the Host we're not using are enqueued * at vb_dev_info->pages list. @@ -111,15 +116,66 @@ static void balloon_ack(struct virtqueue *vq) wake_up(&vb->acked); } +static int balloon_page_bitmap_init(struct virtio_balloon *vb) +{ + unsigned long max_pfn, bmap_bytes; + + max_pfn = get_max_pfn(); + bmap_bytes = ALIGN(max_pfn, BITS_PER_LONG) / BITS_PER_BYTE; + if (!vb->page_bitmap) + vb->page_bitmap = kzalloc(bmap_bytes, GFP_KERNEL); + else { + if (bmap_bytes <= vb->bmap_len) + mem...
2016 May 20
6
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...e_bitmap; + unsigned long start_pfn, end_pfn; + unsigned long bmap_len; /* * The pages we've told the Host we're not using are enqueued * at vb_dev_info->pages list. @@ -111,15 +116,66 @@ static void balloon_ack(struct virtqueue *vq) wake_up(&vb->acked); } +static int balloon_page_bitmap_init(struct virtio_balloon *vb) +{ + unsigned long max_pfn, bmap_bytes; + + max_pfn = get_max_pfn(); + bmap_bytes = ALIGN(max_pfn, BITS_PER_LONG) / BITS_PER_BYTE; + if (!vb->page_bitmap) + vb->page_bitmap = kzalloc(bmap_bytes, GFP_KERNEL); + else { + if (bmap_bytes <= vb->bmap_len) + mem...
2016 May 24
4
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...gt; /* > > * The pages we've told the Host we're not using are enqueued > > * at vb_dev_info->pages list. > > @@ -111,15 +116,66 @@ static void balloon_ack(struct virtqueue *vq) > > wake_up(&vb->acked); > > } > > > > +static int balloon_page_bitmap_init(struct virtio_balloon *vb) { > > + unsigned long max_pfn, bmap_bytes; > > + > > + max_pfn = get_max_pfn(); > > This is racy. max_pfn could be increased by memory hotplug after you got it. > > > > + bmap_bytes = ALIGN(max_pfn, BITS_PER_LONG) / BITS_PER_BYTE; &g...
2016 May 24
4
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...gt; /* > > * The pages we've told the Host we're not using are enqueued > > * at vb_dev_info->pages list. > > @@ -111,15 +116,66 @@ static void balloon_ack(struct virtqueue *vq) > > wake_up(&vb->acked); > > } > > > > +static int balloon_page_bitmap_init(struct virtio_balloon *vb) { > > + unsigned long max_pfn, bmap_bytes; > > + > > + max_pfn = get_max_pfn(); > > This is racy. max_pfn could be increased by memory hotplug after you got it. > > > > + bmap_bytes = ALIGN(max_pfn, BITS_PER_LONG) / BITS_PER_BYTE; &g...
2016 May 20
0
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...> + unsigned long bmap_len; > /* > * The pages we've told the Host we're not using are enqueued > * at vb_dev_info->pages list. > @@ -111,15 +116,66 @@ static void balloon_ack(struct virtqueue *vq) > wake_up(&vb->acked); > } > > +static int balloon_page_bitmap_init(struct virtio_balloon *vb) > +{ > + unsigned long max_pfn, bmap_bytes; > + > + max_pfn = get_max_pfn(); This is racy. max_pfn could be increased by memory hotplug after you got it. > + bmap_bytes = ALIGN(max_pfn, BITS_PER_LONG) / BITS_PER_BYTE; > + if (!vb->page_bitmap) >...
2016 May 24
0
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...ges we've told the Host we're not using are enqueued > > > * at vb_dev_info->pages list. > > > @@ -111,15 +116,66 @@ static void balloon_ack(struct virtqueue *vq) > > > wake_up(&vb->acked); > > > } > > > > > > +static int balloon_page_bitmap_init(struct virtio_balloon *vb) { > > > + unsigned long max_pfn, bmap_bytes; > > > + > > > + max_pfn = get_max_pfn(); > > > > This is racy. max_pfn could be increased by memory hotplug after you got it. > > > > > > > + bmap_bytes = ALIGN(max...