Displaying 8 results from an estimated 8 matches for "xbit_find_set".
Did you mean:
xb_find_set
2017 Dec 15
2
[PATCH v19 3/7] xbitmap: add more operations
...w Wilcox wrote:
> Here's the API I'm looking at right now. The user need take no lock;
> the locking (spinlock) is handled internally to the implementation.
I looked at the API some more and found some flaws:
- how does xbit_alloc communicate back which bit it allocated?
- What if xbit_find_set() is called on a completely empty array with
a range of 0, ULONG_MAX -- there's no invalid number to return.
- xbit_clear() can't return an error. Neither can xbit_zero().
- Need to add __must_check to various return values to discourage sloppy
programming
So I modify the proposed...
2017 Dec 15
2
[PATCH v19 3/7] xbitmap: add more operations
...w Wilcox wrote:
> Here's the API I'm looking at right now. The user need take no lock;
> the locking (spinlock) is handled internally to the implementation.
I looked at the API some more and found some flaws:
- how does xbit_alloc communicate back which bit it allocated?
- What if xbit_find_set() is called on a completely empty array with
a range of 0, ULONG_MAX -- there's no invalid number to return.
- xbit_clear() can't return an error. Neither can xbit_zero().
- Need to add __must_check to various return values to discourage sloppy
programming
So I modify the proposed...
2017 Dec 17
0
[PATCH v19 3/7] xbitmap: add more operations
...ch seems conflict with the above "the user need take no lock".
Doesn't the caller need a lock to avoid concurrent accesses to the ida bitmap?
> I looked at the API some more and found some flaws:
> - how does xbit_alloc communicate back which bit it allocated?
> - What if xbit_find_set() is called on a completely empty array with
> a range of 0, ULONG_MAX -- there's no invalid number to return.
We'll change it to "bool xb_find_set(.., unsigned long *result)", returning false indicates no "1" bit is found.
> - xbit_clear() can't return...
2017 Dec 15
0
[PATCH v19 3/7] xbitmap: add more operations
..._zero(struct xbitmap *, unsigned long start, unsigned long nbits);
int xbit_fill(struct xbitmap *, unsigned long start, unsigned long nbits,
gfp_t);
unsigned long xbit_find_clear(struct xbitmap *, unsigned long start,
unsigned long max);
unsigned long xbit_find_set(struct xbitmap *, unsigned long start,
unsigned long max);
> static bool set_ulong(struct ulong_list_head *head, const unsigned long value)
> {
> if (!ptr) {
> ptr = kzalloc(sizeof(*ptr), GFP_NOWAIT | __GFP_NOWARN);
> if (!ptr)
> goto out1;
>...
2017 Dec 17
2
[PATCH v19 3/7] xbitmap: add more operations
...9;m proposing will take care of the locking for you.
There's also no preallocation in the API.
> We'll change it to "bool xb_find_set(.., unsigned long *result)", returning false indicates no "1" bit is found.
I put a replacement proposal in the next paragraph:
bool xbit_find_set(struct xbitmap *, unsigned long *start, unsigned long max);
Maybe 'start' is the wrong name for that parameter. Let's call it 'bit'.
It's both "where to start" and "first bit found".
> > - xbit_clear() can't return an error. Neither can xbi...
2017 Dec 17
2
[PATCH v19 3/7] xbitmap: add more operations
...9;m proposing will take care of the locking for you.
There's also no preallocation in the API.
> We'll change it to "bool xb_find_set(.., unsigned long *result)", returning false indicates no "1" bit is found.
I put a replacement proposal in the next paragraph:
bool xbit_find_set(struct xbitmap *, unsigned long *start, unsigned long max);
Maybe 'start' is the wrong name for that parameter. Let's call it 'bit'.
It's both "where to start" and "first bit found".
> > - xbit_clear() can't return an error. Neither can xbi...
2017 Dec 12
21
[PATCH v19 0/7] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following
new features:
1) fast ballooning: transfer ballooned pages between the guest and host in
chunks using sgs, instead of one array each time; and
2) free page block reporting: a new virtqueue to report guest free pages
to the host.
The second feature can be used to accelerate live migration of VMs. Here
are some details:
Live
2017 Dec 12
21
[PATCH v19 0/7] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following
new features:
1) fast ballooning: transfer ballooned pages between the guest and host in
chunks using sgs, instead of one array each time; and
2) free page block reporting: a new virtqueue to report guest free pages
to the host.
The second feature can be used to accelerate live migration of VMs. Here
are some details:
Live