Displaying 20 results from an estimated 176 matches for "bits_per_byte".
2016 Jul 27
2
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...> + int ret = 1;
> +
> + max_pfn = get_max_pfn();
> + mutex_lock(&vb->balloon_lock);
> + while (pfn < max_pfn) {
> + memset(vb->page_bitmap, 0, vb->bmap_len);
> + ret = get_free_pages(pfn, pfn + vb->pfn_limit,
> + vb->page_bitmap, vb->bmap_len * BITS_PER_BYTE);
> + hdr->cmd = cpu_to_virtio16(vb->vdev, BALLOON_GET_FREE_PAGES);
> + hdr->page_shift = cpu_to_virtio16(vb->vdev, PAGE_SHIFT);
> + hdr->req_id = cpu_to_virtio64(vb->vdev, req_id);
> + hdr->start_pfn = cpu_to_virtio64(vb->vdev, pfn);
> + bmap_len = vb-&g...
2016 Jul 27
2
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...> + int ret = 1;
> +
> + max_pfn = get_max_pfn();
> + mutex_lock(&vb->balloon_lock);
> + while (pfn < max_pfn) {
> + memset(vb->page_bitmap, 0, vb->bmap_len);
> + ret = get_free_pages(pfn, pfn + vb->pfn_limit,
> + vb->page_bitmap, vb->bmap_len * BITS_PER_BYTE);
> + hdr->cmd = cpu_to_virtio16(vb->vdev, BALLOON_GET_FREE_PAGES);
> + hdr->page_shift = cpu_to_virtio16(vb->vdev, PAGE_SHIFT);
> + hdr->req_id = cpu_to_virtio64(vb->vdev, req_id);
> + hdr->start_pfn = cpu_to_virtio64(vb->vdev, pfn);
> + bmap_len = vb-&g...
2016 Jul 27
4
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
On 07/26/2016 06:23 PM, Liang Li wrote:
> + vb->pfn_limit = VIRTIO_BALLOON_PFNS_LIMIT;
> + vb->pfn_limit = min(vb->pfn_limit, get_max_pfn());
> + vb->bmap_len = ALIGN(vb->pfn_limit, BITS_PER_LONG) /
> + BITS_PER_BYTE + 2 * sizeof(unsigned long);
> + hdr_len = sizeof(struct balloon_bmap_hdr);
> + vb->bmap_hdr = kzalloc(hdr_len + vb->bmap_len, GFP_KERNEL);
This ends up doing a 1MB kmalloc() right? That seems a _bit_ big. How
big was the pfn buffer before?
2016 Jul 27
4
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
On 07/26/2016 06:23 PM, Liang Li wrote:
> + vb->pfn_limit = VIRTIO_BALLOON_PFNS_LIMIT;
> + vb->pfn_limit = min(vb->pfn_limit, get_max_pfn());
> + vb->bmap_len = ALIGN(vb->pfn_limit, BITS_PER_LONG) /
> + BITS_PER_BYTE + 2 * sizeof(unsigned long);
> + hdr_len = sizeof(struct balloon_bmap_hdr);
> + vb->bmap_hdr = kzalloc(hdr_len + vb->bmap_len, GFP_KERNEL);
This ends up doing a 1MB kmalloc() right? That seems a _bit_ big. How
big was the pfn buffer before?
2016 Jul 28
0
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...t; > + max_pfn = get_max_pfn();
> > + mutex_lock(&vb->balloon_lock);
> > + while (pfn < max_pfn) {
> > + memset(vb->page_bitmap, 0, vb->bmap_len);
> > + ret = get_free_pages(pfn, pfn + vb->pfn_limit,
> > + vb->page_bitmap, vb->bmap_len * BITS_PER_BYTE);
> > + hdr->cmd = cpu_to_virtio16(vb->vdev,
> BALLOON_GET_FREE_PAGES);
> > + hdr->page_shift = cpu_to_virtio16(vb->vdev, PAGE_SHIFT);
> > + hdr->req_id = cpu_to_virtio64(vb->vdev, req_id);
> > + hdr->start_pfn = cpu_to_virtio64(vb->vdev, pfn);...
2016 Jul 28
2
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
...ave Hansen wrote:
> > On 07/26/2016 06:23 PM, Liang Li wrote:
> > > + vb->pfn_limit = VIRTIO_BALLOON_PFNS_LIMIT;
> > > + vb->pfn_limit = min(vb->pfn_limit, get_max_pfn());
> > > + vb->bmap_len = ALIGN(vb->pfn_limit, BITS_PER_LONG) /
> > > + BITS_PER_BYTE + 2 * sizeof(unsigned long);
> > > + hdr_len = sizeof(struct balloon_bmap_hdr);
> > > + vb->bmap_hdr = kzalloc(hdr_len + vb->bmap_len, GFP_KERNEL);
> >
> > This ends up doing a 1MB kmalloc() right? That seems a _bit_ big.
> > How big was the pfn buffer bef...
2016 Jul 28
2
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
...ave Hansen wrote:
> > On 07/26/2016 06:23 PM, Liang Li wrote:
> > > + vb->pfn_limit = VIRTIO_BALLOON_PFNS_LIMIT;
> > > + vb->pfn_limit = min(vb->pfn_limit, get_max_pfn());
> > > + vb->bmap_len = ALIGN(vb->pfn_limit, BITS_PER_LONG) /
> > > + BITS_PER_BYTE + 2 * sizeof(unsigned long);
> > > + hdr_len = sizeof(struct balloon_bmap_hdr);
> > > + vb->bmap_hdr = kzalloc(hdr_len + vb->bmap_len, GFP_KERNEL);
> >
> > This ends up doing a 1MB kmalloc() right? That seems a _bit_ big.
> > How big was the pfn buffer bef...
2016 Jul 27
0
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...balloon_bmap_hdr *hdr = vb->bmap_hdr;
+ int ret = 1;
+
+ max_pfn = get_max_pfn();
+ mutex_lock(&vb->balloon_lock);
+ while (pfn < max_pfn) {
+ memset(vb->page_bitmap, 0, vb->bmap_len);
+ ret = get_free_pages(pfn, pfn + vb->pfn_limit,
+ vb->page_bitmap, vb->bmap_len * BITS_PER_BYTE);
+ hdr->cmd = cpu_to_virtio16(vb->vdev, BALLOON_GET_FREE_PAGES);
+ hdr->page_shift = cpu_to_virtio16(vb->vdev, PAGE_SHIFT);
+ hdr->req_id = cpu_to_virtio64(vb->vdev, req_id);
+ hdr->start_pfn = cpu_to_virtio64(vb->vdev, pfn);
+ bmap_len = vb->pfn_limit / BITS_PER_BY...
2017 Mar 10
0
[virtio-dev] Re: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...on.c
>> +++ b/drivers/virtio/virtio_balloon.c
>> @@ -42,6 +42,10 @@
>> #define OOM_VBALLOON_DEFAULT_PAGES 256
>> #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80
>>
>> +#define PAGE_BMAP_SIZE (8 * PAGE_SIZE)
>> +#define PFNS_PER_PAGE_BMAP (PAGE_BMAP_SIZE * BITS_PER_BYTE)
>> +#define PAGE_BMAP_COUNT_MAX 32
>> +
>> static int oom_pages = OOM_VBALLOON_DEFAULT_PAGES;
>> module_param(oom_pages, int, S_IRUSR | S_IWUSR);
>> MODULE_PARM_DESC(oom_pages, "pages to free on OOM");
>> @@ -50,6 +54,16 @@ MODULE_PARM_DESC(oom_p...
2016 Oct 25
1
[RESEND PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -42,6 +42,10 @@
> #define OOM_VBALLOON_DEFAULT_PAGES 256
> #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80
>
> +#define BALLOON_BMAP_SIZE (8 * PAGE_SIZE)
> +#define PFNS_PER_BMAP (BALLOON_BMAP_SIZE * BITS_PER_BYTE)
> +#define BALLOON_BMAP_COUNT 32
> +
> static int oom_pages = OOM_VBALLOON_DEFAULT_PAGES;
> module_param(oom_pages, int, S_IRUSR | S_IWUSR);
> MODULE_PARM_DESC(oom_pages, "pages to free on OOM");
> @@ -67,6 +71,13 @@ struct virtio_balloon {
>
> /* Number of...
2016 Oct 25
1
[RESEND PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -42,6 +42,10 @@
> #define OOM_VBALLOON_DEFAULT_PAGES 256
> #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80
>
> +#define BALLOON_BMAP_SIZE (8 * PAGE_SIZE)
> +#define PFNS_PER_BMAP (BALLOON_BMAP_SIZE * BITS_PER_BYTE)
> +#define BALLOON_BMAP_COUNT 32
> +
> static int oom_pages = OOM_VBALLOON_DEFAULT_PAGES;
> module_param(oom_pages, int, S_IRUSR | S_IWUSR);
> MODULE_PARM_DESC(oom_pages, "pages to free on OOM");
> @@ -67,6 +71,13 @@ struct virtio_balloon {
>
> /* Number of...
2019 Apr 26
0
[PATCH 08/10] virtio/s390: add indirection to indicators access
...vcdev, ccw, VIRTIO_CCW_DOING_SET_CONF_IND);
if (ret)
@@ -1092,17 +1102,17 @@ static void virtio_ccw_int_handler(struct ccw_device *cdev,
vcdev->err = -EIO;
}
virtio_ccw_check_activity(vcdev, activity);
- for_each_set_bit(i, &vcdev->indicators,
- sizeof(vcdev->indicators) * BITS_PER_BYTE) {
+ for_each_set_bit(i, indicators(vcdev),
+ sizeof(*indicators(vcdev)) * BITS_PER_BYTE) {
/* The bit clear must happen before the vring kick. */
- clear_bit(i, &vcdev->indicators);
+ clear_bit(i, indicators(vcdev));
barrier();
vq = virtio_ccw_vq_by_ind(vcdev, i);
vring_int...
2017 Mar 08
3
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -42,6 +42,10 @@
> #define OOM_VBALLOON_DEFAULT_PAGES 256
> #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80
>
> +#define PAGE_BMAP_SIZE (8 * PAGE_SIZE)
> +#define PFNS_PER_PAGE_BMAP (PAGE_BMAP_SIZE * BITS_PER_BYTE)
> +#define PAGE_BMAP_COUNT_MAX 32
> +
> static int oom_pages = OOM_VBALLOON_DEFAULT_PAGES;
> module_param(oom_pages, int, S_IRUSR | S_IWUSR);
> MODULE_PARM_DESC(oom_pages, "pages to free on OOM");
> @@ -50,6 +54,16 @@ MODULE_PARM_DESC(oom_pages, "pages to free o...
2017 Mar 08
3
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -42,6 +42,10 @@
> #define OOM_VBALLOON_DEFAULT_PAGES 256
> #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80
>
> +#define PAGE_BMAP_SIZE (8 * PAGE_SIZE)
> +#define PFNS_PER_PAGE_BMAP (PAGE_BMAP_SIZE * BITS_PER_BYTE)
> +#define PAGE_BMAP_COUNT_MAX 32
> +
> static int oom_pages = OOM_VBALLOON_DEFAULT_PAGES;
> module_param(oom_pages, int, S_IRUSR | S_IWUSR);
> MODULE_PARM_DESC(oom_pages, "pages to free on OOM");
> @@ -50,6 +54,16 @@ MODULE_PARM_DESC(oom_pages, "pages to free o...
2019 May 23
0
[PATCH v2 6/8] virtio/s390: add indirection to indicators access
...vcdev, ccw, VIRTIO_CCW_DOING_SET_CONF_IND);
if (ret)
@@ -1093,17 +1103,17 @@ static void virtio_ccw_int_handler(struct ccw_device *cdev,
vcdev->err = -EIO;
}
virtio_ccw_check_activity(vcdev, activity);
- for_each_set_bit(i, &vcdev->indicators,
- sizeof(vcdev->indicators) * BITS_PER_BYTE) {
+ for_each_set_bit(i, indicators(vcdev),
+ sizeof(*indicators(vcdev)) * BITS_PER_BYTE) {
/* The bit clear must happen before the vring kick. */
- clear_bit(i, &vcdev->indicators);
+ clear_bit(i, indicators(vcdev));
barrier();
vq = virtio_ccw_vq_by_ind(vcdev, i);
vring_int...
2019 Jun 12
0
[PATCH v5 6/8] virtio/s390: add indirection to indicators access
...vcdev, ccw, VIRTIO_CCW_DOING_SET_CONF_IND);
if (ret)
@@ -1093,17 +1103,17 @@ static void virtio_ccw_int_handler(struct ccw_device *cdev,
vcdev->err = -EIO;
}
virtio_ccw_check_activity(vcdev, activity);
- for_each_set_bit(i, &vcdev->indicators,
- sizeof(vcdev->indicators) * BITS_PER_BYTE) {
+ for_each_set_bit(i, indicators(vcdev),
+ sizeof(*indicators(vcdev)) * BITS_PER_BYTE) {
/* The bit clear must happen before the vring kick. */
- clear_bit(i, &vcdev->indicators);
+ clear_bit(i, indicators(vcdev));
barrier();
vq = virtio_ccw_vq_by_ind(vcdev, i);
vring_int...
2019 May 29
0
[PATCH v3 6/8] virtio/s390: add indirection to indicators access
...vcdev, ccw, VIRTIO_CCW_DOING_SET_CONF_IND);
if (ret)
@@ -1093,17 +1103,17 @@ static void virtio_ccw_int_handler(struct ccw_device *cdev,
vcdev->err = -EIO;
}
virtio_ccw_check_activity(vcdev, activity);
- for_each_set_bit(i, &vcdev->indicators,
- sizeof(vcdev->indicators) * BITS_PER_BYTE) {
+ for_each_set_bit(i, indicators(vcdev),
+ sizeof(*indicators(vcdev)) * BITS_PER_BYTE) {
/* The bit clear must happen before the vring kick. */
- clear_bit(i, &vcdev->indicators);
+ clear_bit(i, indicators(vcdev));
barrier();
vq = virtio_ccw_vq_by_ind(vcdev, i);
vring_int...
2016 Dec 21
0
[PATCH v6 kernel 3/5] virtio-balloon: speed up inflate/deflate process
...index f59cb4f..03383b3 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -42,6 +42,10 @@
#define OOM_VBALLOON_DEFAULT_PAGES 256
#define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80
+#define BALLOON_BMAP_SIZE (8 * PAGE_SIZE)
+#define PFNS_PER_BMAP (BALLOON_BMAP_SIZE * BITS_PER_BYTE)
+#define BALLOON_BMAP_COUNT 32
+
static int oom_pages = OOM_VBALLOON_DEFAULT_PAGES;
module_param(oom_pages, int, S_IRUSR | S_IWUSR);
MODULE_PARM_DESC(oom_pages, "pages to free on OOM");
@@ -67,6 +71,20 @@ struct virtio_balloon {
/* Number of balloon pages we've told the Host w...
2019 Jun 12
1
[PATCH v5 4/8] s390/airq: use DMA memory for adapter interrupts
...rq_iv_create(unsigned long bits, unsigned long flags)
> goto out;
> iv->bits = bits;
> iv->flags = flags;
> - size = BITS_TO_LONGS(bits) * sizeof(unsigned long);
> + size = iv_size(bits);
>
> if (flags & AIRQ_IV_CACHELINE) {
> - if ((cache_line_size() * BITS_PER_BYTE) < bits)
> + if ((cache_line_size() * BITS_PER_BYTE) < bits
> + || !airq_iv_cache)
I still think squashing this into the same if statement is a bit ugly,
but not really an issue.
> goto out_free;
>
> - iv->vector = kmem_cache_zalloc(airq_iv_cache, GFP_KERNEL);
&...
2019 Jun 11
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
On Tue, 11 Jun 2019 16:27:21 +0200
Halil Pasic <pasic at linux.ibm.com> wrote:
> On Tue, 11 Jun 2019 12:17:21 +0200
> Cornelia Huck <cohuck at redhat.com> wrote:
>
> > On Thu, 6 Jun 2019 13:51:23 +0200
> > Halil Pasic <pasic at linux.ibm.com> wrote:
> >
> > > Protected virtualization guests have to use shared pages for airq
> > >