Displaying 6 results from an estimated 6 matches for "xbit_".
Did you mean:
_bit_
2017 Dec 17
2
[PATCH v19 3/7] xbitmap: add more operations
...ot; The xb_ API requires you to handle your own locking" which 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?
Yes, the xb_ implementation requires you to handle your own locking.
The xbit_ API that I'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 pa...
2017 Dec 17
2
[PATCH v19 3/7] xbitmap: add more operations
...ot; The xb_ API requires you to handle your own locking" which 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?
Yes, the xb_ implementation requires you to handle your own locking.
The xbit_ API that I'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 pa...
2017 Dec 15
2
[PATCH v19 3/7] xbitmap: add more operations
On Fri, Dec 15, 2017 at 10:49:15AM -0800, Matthew 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 retu...
2017 Dec 15
2
[PATCH v19 3/7] xbitmap: add more operations
On Fri, Dec 15, 2017 at 10:49:15AM -0800, Matthew 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 retu...
2017 Dec 18
0
[PATCH v19 3/7] xbitmap: add more operations
On 12/18/2017 06:18 AM, Matthew Wilcox wrote:
> On Sun, Dec 17, 2017 at 01:47:21PM +0000, Wang, Wei W wrote:
>> On Saturday, December 16, 2017 3:22 AM, Matthew Wilcox wrote:
>>> On Fri, Dec 15, 2017 at 10:49:15AM -0800, Matthew Wilcox wrote:
>>> - xbit_clear() can't return an error. Neither can xbit_zero().
>> I found the current xbit_clear implementation only returns 0, and there isn't an error to be returned from this function. In this case, is it better to make the function "void"?
> Yes, I think so.
>
> My onl...
2017 Dec 17
0
[PATCH v19 3/7] xbitmap: add more operations
..." The xb_ API requires you to handle your own locking" which 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 indic...