lib-radix_tree-tree-node-interface.patch removed from -mm tree
[email protected]
maintainerSubject: [merged] lib-radix_tree-tree-node-interface.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 04 Apr 2014 12:31:31 -0700
The patch titled
Subject: lib: radix_tree: tree node interface
has been removed from the -mm tree. Its filename was
lib-radix_tree-tree-node-interface.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Johannes Weiner <[email protected]>
Subject: lib: radix_tree: tree node interface
Make struct radix_tree_node part of the public interface and provide API functions to create, look up, and delete whole nodes. Refactor the existing insert, look up, delete functions on top of these new node primitives.
This will allow the VM to track and garbage collect page cache radix tree nodes.
---
include/linux/radix-tree.h | 34 ++++ lib/radix-tree.c | 263 +++++++++++++++++++---------------- 2 files changed, 182 insertions(+), 115 deletions(-)
include/linux/radix-tree.h renamed from include/linux/radix-tree.h~lib-radix_tree-tree-node-interface +34 -0
@@ -60,6 +60,33 @@ static inline int radix_tree_is_indirect#define RADIX_TREE_MAX_TAGS 3 +#ifdef __KERNEL__ +#define RADIX_TREE_MAP_SHIFT (CONFIG_BASE_SMALL ? 4 : 6) +#else +#define RADIX_TREE_MAP_SHIFT 3/* For more stressful testing */ +#endif + +#define RADIX_TREE_MAP_SIZE (1UL << RADIX_TREE_MAP_SHIFT) +#define RADIX_TREE_MAP_MASK (RADIX_TREE_MAP_SIZE-1) + +#define RADIX_TREE_TAG_LONGS \ + ((RADIX_TREE_MAP_SIZE + BITS_PER_LONG - 1) / BITS_PER_LONG) + +struct radix_tree_node { +unsigned int height;/* Height from the bottom */ +unsigned int count; +union { +struct radix_tree_node *parent;/* Used when ascending tree */ +struct rcu_head rcu_head;/* Used when freeing node */ + }; +void __rcu *slots[RADIX_TREE_MAP_SIZE ]; +unsigned long tags[RADIX_TREE_MAX_TAGS ][RADIX_TREE_TAG_LONGS ]; +}; + +#define RADIX_TREE_INDEX_BITS (8 /* CHAR_BIT */ * sizeof(unsigned long)) +#define RADIX_TREE_MAX_PATH (DIV_ROUND_UP(RADIX_TREE_INDEX_BITS, \ + RADIX_TREE_MAP_SHIFT)) +/* root tags are stored in gfp_mask, shifted by __GFP_BITS_SHIFT */ struct radix_tree_root {unsigned int height;
@@ -101,6 +128,7 @@ do { \* concurrently with other readers. * * The notable exceptions to this rule are the following functions: +* __radix_tree_lookup * radix_tree_lookup * radix_tree_lookup_slot * radix_tree_tag_get
@@ -216,9 +244,15 @@ static inline void radix_tree_replace_slrcu_assign_pointer (*pslot, item); } +int __radix_tree_create (struct radix_tree_root *root,unsigned long index, +struct radix_tree_node **nodep,void ***slotp);int radix_tree_insert (struct radix_tree_root *,unsigned long ,void *); +void *__radix_tree_lookup (struct radix_tree_root *root,unsigned long index, +struct radix_tree_node **nodep,void ***slotp);void *radix_tree_lookup (struct radix_tree_root *,unsigned long );void **radix_tree_lookup_slot (struct radix_tree_root *,unsigned long ); +bool __radix_tree_delete_node (struct radix_tree_root *root,unsigned long index, +struct radix_tree_node *node);void *radix_tree_delete_item (struct radix_tree_root *,unsigned long ,void *);void *radix_tree_delete (struct radix_tree_root *,unsigned long );unsigned int
lib/radix-tree.c renamed from lib/radix-tree.c~lib-radix_tree-tree-node-interface +148 -115
360 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
origin.patch
pagewalk-update-page-table-walker-core.patch pagewalk-add-walk_page_vma.patch smaps-redefine-callback-functions-for-page-table-walker.patch clear_refs-redefine-callback-functions-for-page-table-walker.patch pagemap-redefine-callback-functions-for-page-table-walker.patch numa_maps-redefine-callback-functions-for-page-table-walker.patch memcg-redefine-callback-functions-for-page-table-walker.patch arch-powerpc-mm-subpage-protc-use-walk_page_vma-instead-of-walk_page_range.patch pagewalk-remove-argument-hmask-from-hugetlb_entry.patch mempolicy-apply-page-table-walker-on-queue_pages_range.patch mm-revert-thp-make-madv_hugepage-check-for-mm-def_flags.patch mm-thp-add-vm_init_def_mask-and-prctl_thp_disable.patch exec-kill-the-unnecessary-mm-def_flags-setting-in-load_elf_binary.patch fork-collapse-copy_flags-into-copy_process.patch mm-mempolicy-rename-slab_node-for-clarity.patch mm-mempolicy-remove-per-process-flag.patch res_counter-remove-interface-for-locked-charging-and-uncharging.patch mm-vmallocc-enhance-vm_map_ram-comment.patch mm-vmallocc-enhance-vm_map_ram-comment-fix.patch mm-memcg-remove-unnecessary-preemption-disabling.patch mm-memcg-remove-mem_cgroup_move_account_page_stat.patch mm-memcg-inline-mem_cgroup_charge_common.patch mm-memcg-push-mm-handling-out-to-page-cache-charge-function.patch memcg-remove-unnecessary-mm-check-from-try_get_mem_cgroup_from_mm.patch memcg-get_mem_cgroup_from_mm.patch memcg-get_mem_cgroup_from_mm-fix.patch memcg-do-not-replicate-get_mem_cgroup_from_mm-in-__mem_cgroup_try_charge.patch memcg-sanitize-__mem_cgroup_try_charge-call-protocol.patch memcg-sanitize-__mem_cgroup_try_charge-call-protocol-fix.patch memcg-rename-high-level-charging-functions.patch mm-page_alloc-spill-to-remote-nodes-before-waking-kswapd.patch linux-next.patch
memcg-slab-never-try-to-merge-memcg-caches.patch memcg-slab-cleanup-memcg-cache-creation.patch memcg-slab-separate-memcg-vs-root-cache-creation-paths.patch memcg-slab-unregister-cache-from-memcg-before-starting-to-destroy-it.patch memcg-slab-do-not-destroy-children-caches-if-parent-has-aliases.patch slub-adjust-memcg-caches-when-creating-cache-alias.patch slub-rework-sysfs-layout-for-memcg-caches.patch debugging-keep-track-of-page-owners.patch