search for: next_bit

Displaying 9 results from an estimated 9 matches for "next_bit".

2015 Feb 10
2
Re: HugePages - can't start guest that requires them
...error [3], > > + if (def->cpu && def->cpu->ncells) { > + /* Fortunately, we allow only guest NUMA nodes to be continuous > + * starting from zero. */ > + pos = def->cpu->ncells - 1; > + } > + > + next_bit = virBitmapNextSetBit(page->nodemask, pos); > + if (next_bit >= 0) { > + virReportError(VIR_ERR_XML_DETAIL, > + _("hugepages: node %zd not found"), > + next_bit); > + return -1; > +...
2015 Feb 04
2
Re: HugePages - can't start guest that requires them
*facepalm* Now that I'm re-reading the documentation it's obvious that <page/> and @nodeset are for the guest, "This tells the hypervisor that the guest should have its memory allocated using hugepages instead of the normal native page size." Pretty clear there. Thank you SO much for the guidance, I'll return to my tweaking. I'll report back here with my results.
2015 Feb 20
0
Re: HugePages - can't start guest that requires them
...if (def->cpu && def->cpu->ncells) { >> + /* Fortunately, we allow only guest NUMA nodes to be continuous >> + * starting from zero. */ >> + pos = def->cpu->ncells - 1; >> + } >> + >> + next_bit = virBitmapNextSetBit(page->nodemask, pos); >> + if (next_bit >= 0) { >> + virReportError(VIR_ERR_XML_DETAIL, >> + _("hugepages: node %zd not found"), >> + next_bit); >> +...
2015 Feb 09
0
Re: HugePages - can't start guest that requires them
...s the code responsible for throwing this error [3], + if (def->cpu && def->cpu->ncells) { + /* Fortunately, we allow only guest NUMA nodes to be continuous + * starting from zero. */ + pos = def->cpu->ncells - 1; + } + + next_bit = virBitmapNextSetBit(page->nodemask, pos); + if (next_bit >= 0) { + virReportError(VIR_ERR_XML_DETAIL, + _("hugepages: node %zd not found"), + next_bit); + return -1; + } Without digging too de...
2007 Apr 25
2
[LLVMdev] Work in progress patch to speed up andersen's implementation
...single bitmap, we will have already advanced past the just iterated bit. Return true if there is a bit to iterate. */ static inline bool bmp_iter_set (bitmap_iterator *bi, unsigned *bit_no) { /* If our current word is nonzero, it contains the bit we want. */ if (bi->bits) { next_bit: while (!(bi->bits & 1)) { bi->bits >>= 1; *bit_no += 1; } return true; } /* Round up to the word boundary. We might have just iterated past the end of the last word, hence the -1. It is not possible for bit_no to point at the beginning of the...
2017 Apr 14
2
[virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS
...unsigned long pfn_start, > > > + unsigned long *bmap, > > > + unsigned long len) > > > +{ > > > + unsigned long pos = 0, end = len * BITS_PER_BYTE; > > > + > > > + while (pos < end) { > > > + unsigned long one = find_next_bit(bmap, end, pos); > > > + > > > + if (one < end) { > > > + unsigned long chunk_size, zero; > > > + > > > + zero = find_next_zero_bit(bmap, end, one + 1); > > > > zero and one are unhelpful names unless they equal 0 and 1. > > cu...
2017 Apr 14
2
[virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS
...unsigned long pfn_start, > > > + unsigned long *bmap, > > > + unsigned long len) > > > +{ > > > + unsigned long pos = 0, end = len * BITS_PER_BYTE; > > > + > > > + while (pos < end) { > > > + unsigned long one = find_next_bit(bmap, end, pos); > > > + > > > + if (one < end) { > > > + unsigned long chunk_size, zero; > > > + > > > + zero = find_next_zero_bit(bmap, end, one + 1); > > > > zero and one are unhelpful names unless they equal 0 and 1. > > cu...
2017 Apr 13
3
[PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS
...to_chunks"? > + struct virtqueue *vq, > + unsigned long pfn_start, > + unsigned long *bmap, > + unsigned long len) > +{ > + unsigned long pos = 0, end = len * BITS_PER_BYTE; > + > + while (pos < end) { > + unsigned long one = find_next_bit(bmap, end, pos); > + > + if (one < end) { > + unsigned long chunk_size, zero; > + > + zero = find_next_zero_bit(bmap, end, one + 1); zero and one are unhelpful names unless they equal 0 and 1. current/next? > + if (zero >= end) > + chunk_size = end - one; &g...
2017 Apr 13
3
[PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS
...to_chunks"? > + struct virtqueue *vq, > + unsigned long pfn_start, > + unsigned long *bmap, > + unsigned long len) > +{ > + unsigned long pos = 0, end = len * BITS_PER_BYTE; > + > + while (pos < end) { > + unsigned long one = find_next_bit(bmap, end, pos); > + > + if (one < end) { > + unsigned long chunk_size, zero; > + > + zero = find_next_zero_bit(bmap, end, one + 1); zero and one are unhelpful names unless they equal 0 and 1. current/next? > + if (zero >= end) > + chunk_size = end - one; &g...