Re: rmap.c: try_to_unmap_file(): VM_LOCKED not respected

From: Hugh Dickins
Date: Tue Jun 14 2005 - 08:51:58 EST


On Mon, 13 Jun 2005, li nux wrote:
> My application is using remap_file_pages and mlocks
> those pages.
> So in the code of try_to_unmap_file (see below),
> I should never reach the call to try_to_unmap_cluster,
> because for those pages VM_LOCKED is always set.
> But, under heavy load I am seeing try_to_unmap_cluster
> is getting called. Stack:
> try_to_unmap_cluster
> try_to_unmap_file
> try_to_unmap
> shrink_list
>
> Any idea why VM_LOCKED is not being respected ?

Does your application fork occasionally, probably to exec something?
VM_LOCKED is masked off the flags of the child's copy vma (see dup_mmap),
so you might be seeing page reclaim hitting the child in between fork
and exec. The parent's should remain safely VM_LOCKED as you intended.

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/