[lkml]   [2014]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 04/10] mm: shmem: save one radix tree lookup when truncating swapped pages
On Mon, Feb 03, 2014 at 07:53:36PM -0500, Johannes Weiner wrote:
> Page cache radix tree slots are usually stabilized by the page lock,
> but shmem's swap cookies have no such thing. Because the overall
> truncation loop is lockless, the swap entry is currently confirmed by
> a tree lookup and then deleted by another tree lookup under the same
> tree lock region.
> Use radix_tree_delete_item() instead, which does the verification and
> deletion with only one lookup. This also allows removing the
> delete-only special case from shmem_radix_tree_replace().
> Signed-off-by: Johannes Weiner <>
> Reviewed-by: Minchan Kim <>
> Reviewed-by: Rik van Riel <>

Acked-by: Mel Gorman <>

Mel Gorman

 \ /
  Last update: 2014-02-12 12:41    [W:0.135 / U:1.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site