Displaying 8 results from an estimated 8 matches for "xb_set".
2017 Dec 24
0
[PATCH v20 4/7] virtio-balloon: VIRTIO_BALLOON_F_SG
...t;>> + int ret;
>>> +
>>> + *pfn_min = min(pfn, *pfn_min);
>>> + *pfn_max = max(pfn, *pfn_max);
>>> +
>>> + do {
>>> + if (xb_preload(GFP_NOWAIT | __GFP_NOWARN) < 0)
>>> + return -ENOMEM;
>>> +
>>> + ret = xb_set_bit(&vb->page_xb, pfn);
>>> + xb_preload_end();
>>> + } while (unlikely(ret == -EAGAIN));
>> OK, so you don't need a spinlock because you're under a mutex? But you
>> can't allocate memory because you're in the balloon driver, and so a
>>...
2017 Sep 11
1
[PATCH v15 1/5] lib/xbitmap: Introduce xbitmap
...rote:
> From: 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: Mi...
2017 Sep 11
1
[PATCH v15 1/5] lib/xbitmap: Introduce xbitmap
...rote:
> From: 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: Mi...
2017 Dec 15
4
[PATCH v19 3/7] xbitmap: add more operations
On Tue, Dec 12, 2017 at 07:55:55PM +0800, Wei Wang wrote:
> +int xb_preload_and_set_bit(struct xb *xb, unsigned long bit, gfp_t gfp);
I'm struggling to understand when one would use this. The xb_ API
requires you to handle your own locking. But specifying GFP flags
here implies you can sleep. So ... um ... there's no locking?
> +void xb_clear_bit_range(struct xb *xb, unsigned
2017 Dec 15
4
[PATCH v19 3/7] xbitmap: add more operations
On Tue, Dec 12, 2017 at 07:55:55PM +0800, Wei Wang wrote:
> +int xb_preload_and_set_bit(struct xb *xb, unsigned long bit, gfp_t gfp);
I'm struggling to understand when one would use this. The xb_ API
requires you to handle your own locking. But specifying GFP flags
here implies you can sleep. So ... um ... there's no locking?
> +void xb_clear_bit_range(struct xb *xb, unsigned
2017 Dec 17
0
[PATCH v19 3/7] xbitmap: add more operations
...n one would use this. The xb_ API
>>> requires you to handle your own locking. But specifying GFP flags
>>> here implies you can sleep. So ... um ... there's no locking?
>> In the regular use cases, people would do xb_preload() before taking the
>> lock, and the xb_set/clear within the lock.
>>
>> In the virtio-balloon usage, we have a large number of bits to set with
>> the balloon_lock being held (we're not unlocking for each bit), so we
>> used the above wrapper to do preload and set within the balloon_lock,
>> and passed in G...
2017 Dec 19
15
[PATCH v20 0/7] Virtio-balloon Enhancement
...mplement it
in a style close to find_next_bit;
- rename xb_find_next_zero_bit to xb_find_clear, and re-implement
it in a stytle close to find_next_zero_bit;
- separate the implementation of xb_find_set and xb_find_clear for
the convenience of future updates.
3) patch 4: virtio-balloon
- xb_set_page: change the way to call xb_ related APIs
v18->v19:
1) patch 3:
- xb_clear_bit_range and xb_find_next_bit will deal with range [start,
end), where end is changed to be exclusive of the range.
- add overflow checks at the end of xb_clear_bit_range and
xb_find_next_bit
- add overflo...
2017 Dec 19
15
[PATCH v20 0/7] Virtio-balloon Enhancement
...mplement it
in a style close to find_next_bit;
- rename xb_find_next_zero_bit to xb_find_clear, and re-implement
it in a stytle close to find_next_zero_bit;
- separate the implementation of xb_find_set and xb_find_clear for
the convenience of future updates.
3) patch 4: virtio-balloon
- xb_set_page: change the way to call xb_ related APIs
v18->v19:
1) patch 3:
- xb_clear_bit_range and xb_find_next_bit will deal with range [start,
end), where end is changed to be exclusive of the range.
- add overflow checks at the end of xb_clear_bit_range and
xb_find_next_bit
- add overflo...