[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v18 05/10] xbitmap: add more operations
From: |
Tetsuo Handa |
Subject: |
Re: [Qemu-devel] [PATCH v18 05/10] xbitmap: add more operations |
Date: |
Thu, 30 Nov 2017 22:35:03 +0900 |
Tetsuo Handa wrote:
> > +
> > + if (ebit >= BITS_PER_LONG)
> > + continue;
>
> (I don't understand how radix tree works, but generally this patchset looks
> fuzzy
> to me about boundary cases. Thus, I want to confirm that this is not an
> overlook.)
> Why is making "ebit >= BITS_PER_LONG" (e.g. start == 62) case a no-op correct?
> Aren't there bits which should have been cleared in this case?
According to xb_set_bit(), it seems to me that we are trying to avoid memory
allocation
for "struct ida_bitmap" when all set bits within a 1024-bits bitmap reside in
the first
61 bits.
But does such saving help? Is there characteristic bias that majority of set
bits resides
in the first 61 bits, for "bit" is "unsigned long" which holds a page number
(isn't it)?
If no such bias, wouldn't eliminating radix_tree_exception() case and always
storing
"struct ida_bitmap" simplifies the code (and make the processing faster)?
- [Qemu-devel] [PATCH v18 00/10] Virtio-balloon Enhancement, Wei Wang, 2017/11/29
- [Qemu-devel] [PATCH v18 04/10] xbitmap: potential improvement, Wei Wang, 2017/11/29
- [Qemu-devel] [PATCH v18 06/10] virtio_ring: add a new API, virtqueue_add_one_desc, Wei Wang, 2017/11/29
- [Qemu-devel] [PATCH v18 07/10] virtio-balloon: VIRTIO_BALLOON_F_SG, Wei Wang, 2017/11/29
- [Qemu-devel] [PATCH v18 08/10] mm: support reporting free page blocks, Wei Wang, 2017/11/29
- [Qemu-devel] [PATCH v18 09/10] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ, Wei Wang, 2017/11/29
- [Qemu-devel] [PATCH v18 10/10] virtio-balloon: don't report free pages when page poisoning is enabled, Wei Wang, 2017/11/29