Re: [PATCH 3/3] shmem: cleanup shmem_add_to_page_cache

2012-07-10 Thread Johannes Weiner
On Mon, Jul 09, 2012 at 03:46:53PM -0700, Hugh Dickins wrote: > shmem_add_to_page_cache() has three callsites, but only one of them > wants the radix_tree_preload() (an exceptional entry guarantees that > the radix tree node is present in the other cases), and only that site > can achieve

Re: [PATCH 3/3] shmem: cleanup shmem_add_to_page_cache

2012-07-10 Thread Johannes Weiner
On Mon, Jul 09, 2012 at 03:46:53PM -0700, Hugh Dickins wrote: shmem_add_to_page_cache() has three callsites, but only one of them wants the radix_tree_preload() (an exceptional entry guarantees that the radix tree node is present in the other cases), and only that site can achieve

[PATCH 3/3] shmem: cleanup shmem_add_to_page_cache

2012-07-09 Thread Hugh Dickins
shmem_add_to_page_cache() has three callsites, but only one of them wants the radix_tree_preload() (an exceptional entry guarantees that the radix tree node is present in the other cases), and only that site can achieve mem_cgroup_uncharge_cache_page() (PageSwapCache makes it a no-op in the other

[PATCH 3/3] shmem: cleanup shmem_add_to_page_cache

2012-07-09 Thread Hugh Dickins
shmem_add_to_page_cache() has three callsites, but only one of them wants the radix_tree_preload() (an exceptional entry guarantees that the radix tree node is present in the other cases), and only that site can achieve mem_cgroup_uncharge_cache_page() (PageSwapCache makes it a no-op in the other