search for: virtio_balloon_page_bmap_size

Displaying 13 results from an estimated 13 matches for "virtio_balloon_page_bmap_size".

2017 May 04
0
[PATCH v10 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...loon.c index ecb64e9..df16912 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -43,6 +43,20 @@ #define OOM_VBALLOON_DEFAULT_PAGES 256 #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80 +/* The size of one page_bmap used to record inflated/deflated pages. */ +#define VIRTIO_BALLOON_PAGE_BMAP_SIZE (8 * PAGE_SIZE) +/* + * Callulates how many pfns can a page_bmap record. A bit corresponds to a + * page of PAGE_SIZE. + */ +#define VIRTIO_BALLOON_PFNS_PER_PAGE_BMAP \ + (VIRTIO_BALLOON_PAGE_BMAP_SIZE * BITS_PER_BYTE) + +/* The number of page_bmap to allocate by default. */ +#define VIRTIO_BALLOON...
2017 May 05
1
[PATCH v10 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...; --- a/drivers/virtio/virtio_balloon.c > +++ b/drivers/virtio/virtio_balloon.c > @@ -43,6 +43,20 @@ > #define OOM_VBALLOON_DEFAULT_PAGES 256 > #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80 > > +/* The size of one page_bmap used to record inflated/deflated pages. */ > +#define VIRTIO_BALLOON_PAGE_BMAP_SIZE (8 * PAGE_SIZE) > +/* > + * Callulates how many pfns can a page_bmap record. A bit corresponds to a > + * page of PAGE_SIZE. > + */ > +#define VIRTIO_BALLOON_PFNS_PER_PAGE_BMAP \ > + (VIRTIO_BALLOON_PAGE_BMAP_SIZE * BITS_PER_BYTE) > + > +/* The number of page_bmap to allocat...
2017 May 05
1
[PATCH v10 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...; --- a/drivers/virtio/virtio_balloon.c > +++ b/drivers/virtio/virtio_balloon.c > @@ -43,6 +43,20 @@ > #define OOM_VBALLOON_DEFAULT_PAGES 256 > #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80 > > +/* The size of one page_bmap used to record inflated/deflated pages. */ > +#define VIRTIO_BALLOON_PAGE_BMAP_SIZE (8 * PAGE_SIZE) > +/* > + * Callulates how many pfns can a page_bmap record. A bit corresponds to a > + * page of PAGE_SIZE. > + */ > +#define VIRTIO_BALLOON_PFNS_PER_PAGE_BMAP \ > + (VIRTIO_BALLOON_PAGE_BMAP_SIZE * BITS_PER_BYTE) > + > +/* The number of page_bmap to allocat...
2017 Jun 09
0
[PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...945c 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -51,6 +51,36 @@ MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); static struct vfsmount *balloon_mnt; #endif +/* The size of one page_bmap used to record inflated/deflated pages. */ +#define VIRTIO_BALLOON_PAGE_BMAP_SIZE (8 * PAGE_SIZE) +/* + * Callulates how many pfns can a page_bmap record. A bit corresponds to a + * page of PAGE_SIZE. + */ +#define VIRTIO_BALLOON_PFNS_PER_PAGE_BMAP \ + (VIRTIO_BALLOON_PAGE_BMAP_SIZE * BITS_PER_BYTE) + +/* The number of page_bmap to allocate by default. */ +#define VIRTIO_BALLOON...
2017 Jun 13
5
[PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...rtio_balloon.c > +++ b/drivers/virtio/virtio_balloon.c > @@ -51,6 +51,36 @@ MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); > static struct vfsmount *balloon_mnt; > #endif > > +/* The size of one page_bmap used to record inflated/deflated pages. */ > +#define VIRTIO_BALLOON_PAGE_BMAP_SIZE (8 * PAGE_SIZE) At this size, you probably want alloc_pages to avoid kmalloc overhead. > +/* > + * Callulates how many pfns can a page_bmap record. A bit corresponds to a > + * page of PAGE_SIZE. > + */ > +#define VIRTIO_BALLOON_PFNS_PER_PAGE_BMAP \ > + (VIRTIO_BALLOON_PAGE_BMAP...
2017 Jun 13
5
[PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...rtio_balloon.c > +++ b/drivers/virtio/virtio_balloon.c > @@ -51,6 +51,36 @@ MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); > static struct vfsmount *balloon_mnt; > #endif > > +/* The size of one page_bmap used to record inflated/deflated pages. */ > +#define VIRTIO_BALLOON_PAGE_BMAP_SIZE (8 * PAGE_SIZE) At this size, you probably want alloc_pages to avoid kmalloc overhead. > +/* > + * Callulates how many pfns can a page_bmap record. A bit corresponds to a > + * page of PAGE_SIZE. > + */ > +#define VIRTIO_BALLOON_PFNS_PER_PAGE_BMAP \ > + (VIRTIO_BALLOON_PAGE_BMAP...
2017 May 04
8
[PATCH v10 0/6] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch series implements the follow two things: 1) Optimization of balloon page transfer: instead of transferring balloon pages to host one by one, the new mechanism transfers them in chunks. 2) A mechanism to report info of guest unused pages: the pages have been unused at some time between when host sent command and when guest reported them. Host uses that by tracking memory changes and
2017 May 04
8
[PATCH v10 0/6] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch series implements the follow two things: 1) Optimization of balloon page transfer: instead of transferring balloon pages to host one by one, the new mechanism transfers them in chunks. 2) A mechanism to report info of guest unused pages: the pages have been unused at some time between when host sent command and when guest reported them. Host uses that by tracking memory changes and
2017 Jun 09
11
[PATCH v11 0/6] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new features: 1) fast ballooning: transfer ballooned pages between the guest and host in chunks, instead of one by one; and 2) cmdq: a new virtqueue to send commands between the device and driver. Currently, it supports commands to report memory stats (replace the old statq mechanism) and report guest unused pages. Liang Li
2017 Jun 09
11
[PATCH v11 0/6] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new features: 1) fast ballooning: transfer ballooned pages between the guest and host in chunks, instead of one by one; and 2) cmdq: a new virtqueue to send commands between the device and driver. Currently, it supports commands to report memory stats (replace the old statq mechanism) and report guest unused pages. Liang Li
2017 Jun 13
0
[PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
On 06/13/2017 10:56 AM, Michael S. Tsirkin wrote: >> +/* The size of one page_bmap used to record inflated/deflated pages. */ >> +#define VIRTIO_BALLOON_PAGE_BMAP_SIZE (8 * PAGE_SIZE) > At this size, you probably want alloc_pages to avoid kmalloc > overhead. For slub, at least, kmalloc() just calls alloc_pages() basically directly. There's virtually no overhead.
2017 Jun 09
0
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
...; static struct vfsmount *balloon_mnt; #endif +/* Types of pages to chunk */ +#define PAGE_CHUNK_TYPE_BALLOON 0 /* Chunk of inflate/deflate pages */ +#define PAGE_CHNUK_UNUSED_PAGE 1 /* Chunk of unused pages */ + /* The size of one page_bmap used to record inflated/deflated pages. */ #define VIRTIO_BALLOON_PAGE_BMAP_SIZE (8 * PAGE_SIZE) /* @@ -81,12 +85,25 @@ struct virtio_balloon_page_chunk { unsigned long *page_bmap[VIRTIO_BALLOON_PAGE_BMAP_MAX_NUM]; }; +struct virtio_balloon_cmdq_unused_page { + struct virtio_balloon_cmdq_hdr hdr; + struct vring_desc *desc_table; + /* Number of added descriptors */ + unsig...
2017 Jun 15
0
[virtio-dev] Re: [PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...ng_desc) to describe a chunk. This avoids the overhead of kmalloc() the indirect table. >> +/* >> + * Callulates how many pfns can a page_bmap record. A bit corresponds to a >> + * page of PAGE_SIZE. >> + */ >> +#define VIRTIO_BALLOON_PFNS_PER_PAGE_BMAP \ >> + (VIRTIO_BALLOON_PAGE_BMAP_SIZE * BITS_PER_BYTE) >> + >> +/* The number of page_bmap to allocate by default. */ >> +#define VIRTIO_BALLOON_PAGE_BMAP_DEFAULT_NUM 1 > It's not by default, it's at probe time, right? It is the number of page bitmap being kept throughout the whole lifecycle of the driver....