mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees.patch removed from -mm tree
Subsystems (6)
[email protected]
maintainerSubject: [merged] mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees.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:25 -0700
The patch titled
Subject: mm + fs: prepare for non-page entries in page cache radix trees
has been removed from the -mm tree. Its filename was
mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Johannes Weiner <[email protected]>
Subject: mm + fs: prepare for non-page entries in page cache radix trees
shmem mappings already contain exceptional entries where swap slot information is remembered.
To be able to store eviction information for regular page cache, prepare every site dealing with the radix trees directly to handle entries other than pages.
The common lookup functions will filter out non-page entries and return NULL for page cache holes, just as before. But provide a raw version of the API which returns non-page entries as well, and switch shmem over to use it.
---
fs/btrfs/compression.c | 2 include/linux/mm.h | 8 + include/linux/pagemap.h | 15 +- include/linux/pagevec.h | 5 include/linux/shmem_fs.h | 1 mm/filemap.c | 202 ++++++++++++++++++++++++++++++++----- mm/mincore.c | 20 ++- mm/readahead.c | 2 mm/shmem.c | 99 +++--------------- mm/swap.c | 51 +++++++++ mm/truncate.c | 74 +++++++++++-- 11 files changed, 349 insertions(+), 130 deletions(-)
fs/btrfs/compression.c renamed from fs/btrfs/compression.c~mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees +1 -1
@@ -472,7 +472,7 @@ static noinline int add_ra_bio_pages(strrcu_read_lock (); page =radix_tree_lookup (&mapping->page_tree, pg_index);rcu_read_unlock (); -if (page) { +if (page && !radix_tree_exceptional_entry (page)) { misses++;if (misses >4 )break ;
include/linux/mm.h renamed from include/linux/mm.h~mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees +8 -0
@@ -1041,6 +1041,14 @@ extern void show_free_areas(unsigned intextern bool skip_free_areas_node (unsigned int flags,int nid);int shmem_zero_setup (struct vm_area_struct *); +#ifdef CONFIG_SHMEM +bool shmem_mapping (struct address_space *mapping); +#else +static inline bool shmem_mapping (struct address_space *mapping) +{ +return false; +} +#endif extern int can_do_mlock (void );extern int user_shm_lock (size_t ,struct user_struct *);
include/linux/pagemap.h renamed from include/linux/pagemap.h~mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees +9 -6
@@ -248,12 +248,15 @@ pgoff_t page_cache_next_hole(struct addrpgoff_t page_cache_prev_hole (struct address_space *mapping,pgoff_t index,unsigned long max_scan); -extern struct page *find_get_page (struct address_space *mapping, -pgoff_t index); -extern struct page *find_lock_page (struct address_space *mapping, -pgoff_t index); -extern struct page *find_or_create_page (struct address_space *mapping, -pgoff_t index,gfp_t gfp_mask); +struct page *find_get_entry (struct address_space *mapping,pgoff_t offset); +struct page *find_get_page (struct address_space *mapping,pgoff_t offset); +struct page *find_lock_entry (struct address_space *mapping,pgoff_t offset); +struct page *find_lock_page (struct address_space *mapping,pgoff_t offset); +struct page *find_or_create_page (struct address_space *mapping,pgoff_t index, +gfp_t gfp_mask); +unsigned find_get_entries (struct address_space *mapping,pgoff_t start, +unsigned int nr_entries,struct page **entries, +pgoff_t *indices);unsigned find_get_pages (struct address_space *mapping,pgoff_t start,unsigned int nr_pages,struct page **pages); unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start,
include/linux/pagevec.h renamed from include/linux/pagevec.h~mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees +5 -0
@@ -22,6 +22,11 @@ struct pagevec {void __pagevec_release (struct pagevec *pvec);void __pagevec_lru_add (struct pagevec *pvec); +unsigned pagevec_lookup_entries (struct pagevec *pvec, +struct address_space *mapping, +pgoff_t start,unsigned nr_entries, +pgoff_t *indices); +void pagevec_remove_exceptionals (struct pagevec *pvec);unsigned pagevec_lookup (struct pagevec *pvec,struct address_space *mapping,pgoff_t start,unsigned nr_pages); unsigned pagevec_lookup_tag(struct pagevec *pvec,
include/linux/shmem_fs.h renamed from include/linux/shmem_fs.h~mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees +1 -0
@@ -51,6 +51,7 @@ extern struct file *shmem_kernel_file_se unsigned long flags);extern int shmem_zero_setup (struct vm_area_struct *);extern int shmem_lock (struct file *file,int lock,struct user_struct *user); +extern bool shmem_mapping (struct address_space *mapping);extern void shmem_unlock_mapping (struct address_space *mapping);extern struct page *shmem_read_mapping_page_gfp (struct address_space *mapping,pgoff_t index,gfp_t gfp_mask);
mm/filemap.c renamed from mm/filemap.c~mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees +178 -24
275 lines not on this page · raw message
mm/mincore.c renamed from mm/mincore.c~mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees +14 -6
@@ -70,13 +70,21 @@ static unsigned char mincore_page(struct* any other file mapping (ie. marked !present and faulted in with * tmpfs's .fault). So swapped out tmpfs mappings are tested here. */ - page =find_get_page (mapping, pgoff);#ifdef CONFIG_SWAP -/* shmem/tmpfs may return swap: account for swapcache page too. */ -if (radix_tree_exceptional_entry (page)) { -swp_entry_t swap =radix_to_swp_entry (page); - page =find_get_page (swap_address_space (swap), swap.val); - } +if (shmem_mapping (mapping)) { + page =find_get_entry (mapping, pgoff); +/* +* shmem/tmpfs may return swap: account for swapcache +* page too. +*/ +if (radix_tree_exceptional_entry (page)) { +swp_entry_t swp =radix_to_swp_entry (page); + page =find_get_page (swap_address_space (swp), swp.val); + } + }else + page =find_get_page (mapping, pgoff); +#else + page =find_get_page (mapping, pgoff);#endif if (page) { present =PageUptodate (page);
mm/readahead.c renamed from mm/readahead.c~mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees +1 -1
@@ -179,7 +179,7 @@ __do_page_cache_readahead(struct addressrcu_read_lock (); page =radix_tree_lookup (&mapping->page_tree, page_offset);rcu_read_unlock (); -if (page) +if (page && !radix_tree_exceptional_entry (page))continue ; page =page_cache_alloc_readahead (mapping);
mm/shmem.c renamed from mm/shmem.c~mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees +20 -79
175 lines not on this page · raw message
mm/swap.c renamed from mm/swap.c~mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees +51 -0
57 lines not on this page · raw message
mm/truncate.c renamed from mm/truncate.c~mm-fs-prepare-for-non-page-entries-in-page-cache-radix-trees +61 -13
184 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