Skip to content

generic radix trees; drop flex arrays

Kent Overstreet linux-raid linux-sctp linux-security-module lkml selinux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7openvswitch: convert to kvmallocnet/openvswitch/flow.h net/openvswitch/flow_netlink.h net/openvswitch/flow_table.c +1 more+13 -430 replies
2/7md: convert to kvmallocdrivers/md/raid5-ppl.c drivers/md/raid5.c drivers/md/raid5.h+46 -560 replies
3/7selinux: convert to kvmallocsecurity/selinux/ss/avtab.c security/selinux/ss/avtab.h security/selinux/ss/conditional.c +3 more+62 -1442 replies
4/7Generic radix treesDocumentation/core-api/generic-radix-tree.rst Documentation/core-api/index.rst include/linux/generic-radix-tree.h +2 more+463 -10 replies
5/7proc: commit to genradixfs/proc/base.c+15 -280 replies
6/7sctp: Convert to genradixinclude/net/sctp/structs.h net/sctp/stream.c net/sctp/stream_interleave.c+28 -957 replies
7/7Drop flex_arraysDocumentation/core-api/flexible-arrays.rst Documentation/flexible-arrays.txt include/linux/flex_array.h +4 more+1 -8070 replies

Reviews trailers per patch

3 of 7 patches have a Reviewed-by or Acked-by.

PatchMatthew WilcoxDave Hansen
1/7R-b
2/7R-b
3/7
4/7
5/7
6/7
7/7A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] generic radix trees; drop flex arrays

this has been sitting on my todo list for far too long; let's try and get it merged before flex arrays grow any new users.

The only significant change since the last time I mailed this out is that it's now safe to use a genradix from multiple threads, including when new nodes are being allocated.

Since we never _free_ nodes on a genradix while it's in use (only when the entire tree is being freed), this adds very little code - we just use cmpxchg for adding pointers to new nodes, there's no need to use rcu_read_lock() or anything like that. And for the types of things we seem to want to use it for it's quite useful.

Andrew, would you mind picking up this series, or would someone else be more suitable? The patch series has been sent out a few times and seen a fair amoun of review.

Kent Overstreet (7):
openvswitch: convert to kvmalloc
md: convert to kvmalloc
selinux: convert to kvmalloc
Generic radix trees
proc: commit to genradix
sctp: Convert to genradix
Drop flex_arrays

 Documentation/core-api/flexible-arrays.rst    | 130 ------
 Documentation/core-api/generic-radix-tree.rst |  12 +
 Documentation/core-api/index.rst              |   1 +
 Documentation/flexible-arrays.txt             | 123 ------
 drivers/md/raid5-ppl.c                        |   6 +-
 drivers/md/raid5.c                            |  87 ++--
 drivers/md/raid5.h                            |   9 +-
 fs/proc/base.c                                |  43 +-
 include/linux/flex_array.h                    | 149 -------
 include/linux/generic-radix-tree.h            | 231 ++++++++++
 include/linux/poison.h                        |   3 -
 include/net/sctp/structs.h                    |  15 +-
 lib/Makefile                                  |   5 +-
 lib/flex_array.c                              | 398 ------------------
 lib/generic-radix-tree.c                      | 217 ++++++++++
 net/openvswitch/flow.h                        |   1 -
 net/openvswitch/flow_netlink.h                |   1 -
 net/openvswitch/flow_table.c                  |  51 +--
 net/openvswitch/flow_table.h                  |   3 +-
 net/sctp/stream.c                             | 106 +----
 net/sctp/stream_interleave.c                  |   2 +-
 security/selinux/ss/avtab.c                   |  40 +-
 security/selinux/ss/avtab.h                   |   4 +-
 security/selinux/ss/conditional.c             |   6 +-
 security/selinux/ss/policydb.c                | 122 ++----
 security/selinux/ss/policydb.h                |  12 +-
 security/selinux/ss/services.c                |  22 +-
 tools/include/linux/poison.h                  |   3 -
 28 files changed, 628 insertions(+), 1174 deletions(-)
 delete mode 100644 Documentation/core-api/flexible-arrays.rst
 create mode 100644 Documentation/core-api/generic-radix-tree.rst
 delete mode 100644 Documentation/flexible-arrays.txt
 delete mode 100644 include/linux/flex_array.h
 create mode 100644 include/linux/generic-radix-tree.h
 delete mode 100644 lib/flex_array.c
 create mode 100644 lib/generic-radix-tree.c
Signature · 1 line
2.20.1