On Thu, Dec 07, 2017 at 08:01:24PM +0800, Wei Wang wrote:
> On 12/03/2017 09:50 AM, Tetsuo Handa wrote:
> > Matthew Wilcox wrote:
> > > On Fri, Dec 01, 2017 at 03:09:08PM +, Wang, Wei W wrote:
> > > > On Friday, December 1, 2017 9:02 PM, Tetsuo Handa wrote:
> > > > > If start == end is legal,
>
On 12/03/2017 09:50 AM, Tetsuo Handa wrote:
Matthew Wilcox wrote:
On Fri, Dec 01, 2017 at 03:09:08PM +, Wang, Wei W wrote:
On Friday, December 1, 2017 9:02 PM, Tetsuo Handa wrote:
If start == end is legal,
for (; start < end; start = (start | (IDA_BITMAP_BITS - 1)) + 1) {
makes this
Matthew Wilcox wrote:
> On Fri, Dec 01, 2017 at 03:09:08PM +, Wang, Wei W wrote:
> > On Friday, December 1, 2017 9:02 PM, Tetsuo Handa wrote:
> > > If start == end is legal,
> > >
> > >for (; start < end; start = (start | (IDA_BITMAP_BITS - 1)) + 1) {
> > >
> > > makes this loop do nothin
Matthew Wilcox wrote:
> On Thu, Nov 30, 2017 at 10:35:03PM +0900, Tetsuo Handa wrote:
> > 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.
> >
>
On Fri, Dec 01, 2017 at 03:09:08PM +, Wang, Wei W wrote:
> On Friday, December 1, 2017 9:02 PM, Tetsuo Handa wrote:
> > If start == end is legal,
> >
> >for (; start < end; start = (start | (IDA_BITMAP_BITS - 1)) + 1) {
> >
> > makes this loop do nothing because 10 < 10 is false.
>
> How
Wei Wang wrote:
> On 11/30/2017 06:34 PM, Tetsuo Handa wrote:
> > Wei Wang wrote:
> >> + * @start: the start of the bit range, inclusive
> >> + * @end: the end of the bit range, inclusive
> >> + *
> >> + * This function is used to clear a bit in the xbitmap. If all the bits
> >> of the
> >> + * bi
On Fri, Dec 01, 2017 at 10:02:01PM +0900, Tetsuo Handa wrote:
> If start == end is legal,
>
>for (; start < end; start = (start | (IDA_BITMAP_BITS - 1)) + 1) {
>
> makes this loop do nothing because 10 < 10 is false.
... and this is why we add tests to the test-suite!
On Friday, December 1, 2017 9:02 PM, Tetsuo Handa wrote:
> Wei Wang wrote:
> > On 11/30/2017 06:34 PM, Tetsuo Handa wrote:
> > > Wei Wang wrote:
> > >> + * @start: the start of the bit range, inclusive
> > >> + * @end: the end of the bit range, inclusive
> > >> + *
> > >> + * This function is used
On Thu, Nov 30, 2017 at 10:35:03PM +0900, Tetsuo Handa wrote:
> 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
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.)
>
Wei Wang wrote:
> /**
> + * xb_clear_bit - clear a range of bits in the xbitmap
Name mismatch.
> + * @start: the start of the bit range, inclusive
> + * @end: the end of the bit range, inclusive
> + *
> + * This function is used to clear a bit in the xbitmap. If all the bits of
> the
> + * bitm
This patch adds support to find next 1 or 0 bit in a xbmitmap range and
clear a range of bits.
More possible optimizations to add in the future:
1) xb_set_bit_range: set a range of bits.
2) when searching a bit, if the bit is not found in the slot, move on to
the next slot directly.
3) add tags to
12 matches
Mail list logo