search for: xb_clear

Displaying 4 results from an estimated 4 matches for "xb_clear".

Did you mean: ev_clear
2017 Sep 11
1
[PATCH v15 2/5] lib/xbitmap: add xb_find_next_bit() and xb_zero()
...map that the bits reside in > + * @start: the start of the range, inclusive > + * @end: the end of the range, inclusive > + */ > +void xb_zero(struct xb *xb, unsigned long start, unsigned long end) > +{ > + unsigned long i; > + > + for (i = start; i <= end; i++) > + xb_clear_bit(xb, i); > +} > +EXPORT_SYMBOL(xb_zero); Um. This is not exactly going to be quick if you're clearing a range of bits. I think it needs to be more along the lines of this: void xb_clear(struct xb *xb, unsigned long start, unsigned long end) { struct radix_tree_root *root =...
2017 Sep 11
1
[PATCH v15 2/5] lib/xbitmap: add xb_find_next_bit() and xb_zero()
...map that the bits reside in > + * @start: the start of the range, inclusive > + * @end: the end of the range, inclusive > + */ > +void xb_zero(struct xb *xb, unsigned long start, unsigned long end) > +{ > + unsigned long i; > + > + for (i = start; i <= end; i++) > + xb_clear_bit(xb, i); > +} > +EXPORT_SYMBOL(xb_zero); Um. This is not exactly going to be quick if you're clearing a range of bits. I think it needs to be more along the lines of this: void xb_clear(struct xb *xb, unsigned long start, unsigned long end) { struct radix_tree_root *root =...
2017 Sep 11
1
[PATCH v15 1/5] lib/xbitmap: Introduce xbitmap
...m: Matthew Wilcox <mawilcox at microsoft.com> > > The eXtensible Bitmap is a sparse bitmap representation which is > efficient for set bits which tend to cluster. It supports up to > 'unsigned long' worth of bits, and this commit adds the bare bones -- > xb_set_bit(), xb_clear_bit() and xb_test_bit(). > > Signed-off-by: Matthew Wilcox <mawilcox at microsoft.com> > Signed-off-by: Wei Wang <wei.w.wang at intel.com> > Cc: Andrew Morton <akpm at linux-foundation.org> > Cc: Michal Hocko <mhocko at kernel.org> > Cc: Michael S. Tsirkin...
2017 Sep 11
1
[PATCH v15 1/5] lib/xbitmap: Introduce xbitmap
...m: Matthew Wilcox <mawilcox at microsoft.com> > > The eXtensible Bitmap is a sparse bitmap representation which is > efficient for set bits which tend to cluster. It supports up to > 'unsigned long' worth of bits, and this commit adds the bare bones -- > xb_set_bit(), xb_clear_bit() and xb_test_bit(). > > Signed-off-by: Matthew Wilcox <mawilcox at microsoft.com> > Signed-off-by: Wei Wang <wei.w.wang at intel.com> > Cc: Andrew Morton <akpm at linux-foundation.org> > Cc: Michal Hocko <mhocko at kernel.org> > Cc: Michael S. Tsirkin...