Displaying 20 results from an estimated 33 matches for "__radix_tree_create".
2017 Nov 03
1
[PATCH v17 1/6] lib/xbitmap: Introduce xbitmap
...unsigned long index = bit / IDA_BITMAP_BITS;
> + struct radix_tree_root *root = &xb->xbrt;
> + struct radix_tree_node *node;
> + void **slot;
> + struct ida_bitmap *bitmap;
> + unsigned long ebit;
> +
> + bit %= IDA_BITMAP_BITS;
> + ebit = bit + 2;
> +
> + err = __radix_tree_create(root, index, 0, &node, &slot);
> + if (err)
> + return err;
> + bitmap = rcu_dereference_raw(*slot);
> + if (radix_tree_exception(bitmap)) {
> + unsigned long tmp = (unsigned long)bitmap;
> +
> + if (ebit < BITS_PER_LONG) {
> + tmp |= 1UL << ebit;
>...
2017 Nov 03
1
[PATCH v17 1/6] lib/xbitmap: Introduce xbitmap
...unsigned long index = bit / IDA_BITMAP_BITS;
> + struct radix_tree_root *root = &xb->xbrt;
> + struct radix_tree_node *node;
> + void **slot;
> + struct ida_bitmap *bitmap;
> + unsigned long ebit;
> +
> + bit %= IDA_BITMAP_BITS;
> + ebit = bit + 2;
> +
> + err = __radix_tree_create(root, index, 0, &node, &slot);
> + if (err)
> + return err;
> + bitmap = rcu_dereference_raw(*slot);
> + if (radix_tree_exception(bitmap)) {
> + unsigned long tmp = (unsigned long)bitmap;
> +
> + if (ebit < BITS_PER_LONG) {
> + tmp |= 1UL << ebit;
>...
2017 Aug 03
0
[PATCH v13 1/5] Introduce xbitmap
...#define XB_INDEX_BITS (BITS_PER_LONG - ilog2(IDA_BITMAP_BITS))
+#define XB_MAX_PATH (DIV_ROUND_UP(XB_INDEX_BITS, \
+ RADIX_TREE_MAP_SHIFT))
+#define XB_PRELOAD_SIZE (XB_MAX_PATH * 2 - 1)
+
+/*
* Per-cpu pool of preloaded nodes
*/
struct radix_tree_preload {
@@ -840,6 +849,8 @@ int __radix_tree_create(struct radix_tree_root *root, unsigned long index,
offset, 0, 0);
if (!child)
return -ENOMEM;
+ if (is_idr(root))
+ all_tag_set(child, IDR_FREE);
rcu_assign_pointer(*slot, node_to_entry(child));
if (node)
node->count++;
@@ -1986,8 +1997,8 @@ void __radix_tree_d...
2018 Dec 12
5
CentOS 7.6 external USB dmesg issue
...672ed>] io_schedule_timeout+0xad/0x130
[ 1085.193740] [<ffffffffa94c2886>] ? prepare_to_wait_exclusive+0x56/0x90
[ 1085.193744] [<ffffffffa9b67388>] io_schedule+0x18/0x20
[ 1085.193750] [<ffffffffa9743de3>] get_request+0x243/0x7d0
[ 1085.193756] [<ffffffffa977c401>] ? __radix_tree_create+0x11/0x360
[ 1085.193761] [<ffffffffa94c2d00>] ? wake_up_atomic_t+0x30/0x30
[ 1085.193767] [<ffffffffa9746cae>] blk_queue_bio+0xfe/0x400
[ 1085.193772] [<ffffffffa9744ef7>] generic_make_request+0x147/0x380
[ 1085.193778] [<ffffffffa97451a0>] submit_bio+0x70/0x150
[ 1085....
2016 Jan 15
0
freshclam: page allocation failure: order:0, mode:0x2204010
...58>] ? radix_tree_node_alloc+0x28/0xa0
[<ffffffff8124e111>] __slab_alloc+0x51/0x90
[<ffffffff8124e3a0>] kmem_cache_alloc+0x250/0x300
[<ffffffff8142d958>] ? radix_tree_node_alloc+0x28/0xa0
[<ffffffff8142d958>] radix_tree_node_alloc+0x28/0xa0
[<ffffffff8142db1c>] __radix_tree_create+0x7c/0x200
[<ffffffff8142dce1>] radix_tree_insert+0x41/0xe0
[<ffffffff81459432>] add_dma_entry+0xa2/0x170
[<ffffffff81459843>] debug_dma_map_page+0x113/0x150
[<ffffffff816240a8>] usb_hcd_map_urb_for_dma+0x5f8/0x780
[<ffffffff81108d8d>] ? trace_hardirqs_on+0xd/0x10...
2014 Nov 17
0
kworker/u16:57: page allocation failure: order:0, mode:0x284000
...] ? restore_all+0xf/0xf
[<c0755622>] ? radix_tree_node_alloc+0x22/0x90
[<c04a9728>] ? __lock_is_held+0x48/0x70
[<c05bac55>] kmem_cache_alloc+0x295/0x3c0
[<c0755622>] ? radix_tree_node_alloc+0x22/0x90
[<c0755622>] radix_tree_node_alloc+0x22/0x90
[<c0755e7c>] __radix_tree_create+0x6c/0x1c0
[<c0756009>] radix_tree_insert+0x39/0xe0
[<c077ae59>] add_dma_entry+0x89/0x150
[<c04121b0>] ? save_stack_trace+0x30/0x50
[<c077b21d>] debug_dma_map_page+0xfd/0x130
[<f83e3578>] nouveau_ttm_tt_populate+0x118/0x230 [nouveau]
[<f817de4e>] ttm_tt_bin...
2017 Dec 19
0
[PATCH v20 1/7] xbitmap: Introduce xbitmap
...AD_SIZE (IDA_MAX_PATH * 2 - 1)
+#define XB_INDEX_BITS (BITS_PER_LONG - ilog2(IDA_BITMAP_BITS))
+#define XB_MAX_PATH (DIV_ROUND_UP(XB_INDEX_BITS, \
+ RADIX_TREE_MAP_SHIFT))
+#define XB_PRELOAD_SIZE (XB_MAX_PATH * 2 - 1)
+
/*
* Per-cpu pool of preloaded nodes
*/
@@ -839,6 +844,8 @@ int __radix_tree_create(struct radix_tree_root *root, unsigned long index,
offset, 0, 0);
if (!child)
return -ENOMEM;
+ if (is_idr(root))
+ all_tag_set(child, IDR_FREE);
rcu_assign_pointer(*slot, node_to_entry(child));
if (node)
node->count++;
@@ -1982,7 +1989,7 @@ void __radix_tree_d...
2017 Dec 15
2
[PATCH v19 1/7] xbitmap: Introduce xbitmap
...index = bit / IDA_BITMAP_BITS;
20 struct radix_tree_root *root = &xb->xbrt;
21 struct radix_tree_node *node;
22 void **slot;
23 struct ida_bitmap *bitmap;
24 unsigned long ebit;
25
26 bit %= IDA_BITMAP_BITS;
27 ebit = bit + 2;
28
> 29 err = __radix_tree_create(root, index, 0, &node, &slot);
30 if (err)
31 return err;
32 bitmap = rcu_dereference_raw(*slot);
33 if (radix_tree_exception(bitmap)) {
34 unsigned long tmp = (unsigned long)bitmap;
35
36 if (ebit < BITS_PER_LONG) {
37 tmp |= 1UL << ebi...
2017 Dec 15
2
[PATCH v19 1/7] xbitmap: Introduce xbitmap
...index = bit / IDA_BITMAP_BITS;
20 struct radix_tree_root *root = &xb->xbrt;
21 struct radix_tree_node *node;
22 void **slot;
23 struct ida_bitmap *bitmap;
24 unsigned long ebit;
25
26 bit %= IDA_BITMAP_BITS;
27 ebit = bit + 2;
28
> 29 err = __radix_tree_create(root, index, 0, &node, &slot);
30 if (err)
31 return err;
32 bitmap = rcu_dereference_raw(*slot);
33 if (radix_tree_exception(bitmap)) {
34 unsigned long tmp = (unsigned long)bitmap;
35
36 if (ebit < BITS_PER_LONG) {
37 tmp |= 1UL << ebi...
2017 Dec 12
0
[PATCH v19 1/7] xbitmap: Introduce xbitmap
...*/
+#define XB_INDEX_BITS (BITS_PER_LONG - ilog2(IDA_BITMAP_BITS))
+#define XB_MAX_PATH (DIV_ROUND_UP(XB_INDEX_BITS, \
+ RADIX_TREE_MAP_SHIFT))
+#define XB_PRELOAD_SIZE (XB_MAX_PATH * 2 - 1)
+
+/*
* Per-cpu pool of preloaded nodes
*/
struct radix_tree_preload {
@@ -839,6 +847,8 @@ int __radix_tree_create(struct radix_tree_root *root, unsigned long index,
offset, 0, 0);
if (!child)
return -ENOMEM;
+ if (is_idr(root))
+ all_tag_set(child, IDR_FREE);
rcu_assign_pointer(*slot, node_to_entry(child));
if (node)
node->count++;
@@ -1982,7 +1992,7 @@ void __radix_tree_d...
2017 Nov 03
0
[PATCH v17 1/6] lib/xbitmap: Introduce xbitmap
...#define XB_INDEX_BITS (BITS_PER_LONG - ilog2(IDA_BITMAP_BITS))
+#define XB_MAX_PATH (DIV_ROUND_UP(XB_INDEX_BITS, \
+ RADIX_TREE_MAP_SHIFT))
+#define XB_PRELOAD_SIZE (XB_MAX_PATH * 2 - 1)
+
+/*
* Per-cpu pool of preloaded nodes
*/
struct radix_tree_preload {
@@ -840,6 +853,8 @@ int __radix_tree_create(struct radix_tree_root *root, unsigned long index,
offset, 0, 0);
if (!child)
return -ENOMEM;
+ if (is_idr(root))
+ all_tag_set(child, IDR_FREE);
rcu_assign_pointer(*slot, node_to_entry(child));
if (node)
node->count++;
@@ -1986,8 +2001,8 @@ void __radix_tree_d...
2017 Sep 11
1
[PATCH v15 1/5] lib/xbitmap: Introduce xbitmap
...*root = &xb->xbrt;
> + struct radix_tree_node *node;
> + void **slot;
> + struct ida_bitmap *bitmap;
> + unsigned long ebit, tmp;
> +
> + bit %= IDA_BITMAP_BITS;
> + ebit = bit + RADIX_TREE_EXCEPTIONAL_SHIFT;
> +
> + switch (ops) {
> + case XB_SET:
> + ret = __radix_tree_create(root, index, 0, &node, &slot);
> + if (ret)
> + return ret;
> + bitmap = rcu_dereference_raw(*slot);
> + if (radix_tree_exception(bitmap)) {
> + tmp = (unsigned long)bitmap;
> + if (ebit < BITS_PER_LONG) {
> + tmp |= 1UL << ebit;
> + rcu_assig...
2017 Sep 11
1
[PATCH v15 1/5] lib/xbitmap: Introduce xbitmap
...*root = &xb->xbrt;
> + struct radix_tree_node *node;
> + void **slot;
> + struct ida_bitmap *bitmap;
> + unsigned long ebit, tmp;
> +
> + bit %= IDA_BITMAP_BITS;
> + ebit = bit + RADIX_TREE_EXCEPTIONAL_SHIFT;
> +
> + switch (ops) {
> + case XB_SET:
> + ret = __radix_tree_create(root, index, 0, &node, &slot);
> + if (ret)
> + return ret;
> + bitmap = rcu_dereference_raw(*slot);
> + if (radix_tree_exception(bitmap)) {
> + tmp = (unsigned long)bitmap;
> + if (ebit < BITS_PER_LONG) {
> + tmp |= 1UL << ebit;
> + rcu_assig...
2017 Dec 22
2
[PATCH v20 3/7 RESEND] xbitmap: add more operations
...deep trees.
> - Rewrote xb_clear_bit() for the same reason.
> - Left out the use of radix tree exceptional entries. Thanks for taking
> them out! Keeps it clearer for now; if they prove useful, we can put
> them back in.
> - Removed the use of __radix_tree_delete and __radix_tree_create, so drop
> the changes to those functions.
>
> Other miscellaneous notes
> - I left xb_fill() in the header file, even though there's no implementation
> yet. Wouldn't be hard to add once we have a user.
> - Used SPDX tags instead of a license notice.
>
>...
2017 Dec 22
2
[PATCH v20 3/7 RESEND] xbitmap: add more operations
...deep trees.
> - Rewrote xb_clear_bit() for the same reason.
> - Left out the use of radix tree exceptional entries. Thanks for taking
> them out! Keeps it clearer for now; if they prove useful, we can put
> them back in.
> - Removed the use of __radix_tree_delete and __radix_tree_create, so drop
> the changes to those functions.
>
> Other miscellaneous notes
> - I left xb_fill() in the header file, even though there's no implementation
> yet. Wouldn't be hard to add once we have a user.
> - Used SPDX tags instead of a license notice.
>
>...
2017 Nov 03
0
[PATCH v17 2/6] radix tree test suite: add tests for xbitmap
...struct xb *xb, unsigned long bit)
+{
+ int err;
+ unsigned long index = bit / IDA_BITMAP_BITS;
+ struct radix_tree_root *root = &xb->xbrt;
+ struct radix_tree_node *node;
+ void **slot;
+ struct ida_bitmap *bitmap;
+ unsigned long ebit;
+
+ bit %= IDA_BITMAP_BITS;
+ ebit = bit + 2;
+
+ err = __radix_tree_create(root, index, 0, &node, &slot);
+ if (err)
+ return err;
+ bitmap = rcu_dereference_raw(*slot);
+ if (radix_tree_exception(bitmap)) {
+ unsigned long tmp = (unsigned long)bitmap;
+
+ if (ebit < BITS_PER_LONG) {
+ tmp |= 1UL << ebit;
+ rcu_assign_pointer(*slot, (void *)tmp);
+...
2017 Nov 03
12
[PATCH v17 0/6] 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 Nov 03
12
[PATCH v17 0/6] 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 21
0
[PATCH v20 3/7 RESEND] xbitmap: add more operations
...Should improve performance for deep trees.
- Rewrote xb_clear_bit() for the same reason.
- Left out the use of radix tree exceptional entries. Thanks for taking
them out! Keeps it clearer for now; if they prove useful, we can put
them back in.
- Removed the use of __radix_tree_delete and __radix_tree_create, so drop
the changes to those functions.
Other miscellaneous notes
- I left xb_fill() in the header file, even though there's no implementation
yet. Wouldn't be hard to add once we have a user.
- Used SPDX tags instead of a license notice.
I think we need more test cases ... in r...
2017 Dec 21
7
[PATCH v20 3/7 RESEND] xbitmap: add more operations
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 help searching.
Signed-off-by: Wei Wang <wei.w.wang at intel.com>
Cc: Matthew Wilcox