Re: remap_file_pages() use

From: Dave Hansen
Date: Mon May 19 2014 - 13:50:45 EST


On 05/19/2014 09:42 AM, Armin Rigo wrote:
> If there is an official way to know in advance how many remappings our
> process is allowed to perform, then we could adapt as the size
> increases. Or maybe catching ENOMEM and doubling the remapping size
> (in some process-wide synchronization point). All in all, thanks for
> the note: it looks like there are solutions (even if less elegant than
> remap_file_pages from the user's perspective).

We keep the current count as mm->map_count in the kernel, and the limit
is available because it's a sysctl. It wouldn't be hard to dump
mm->map_count out in a /proc file somewhere if it would be useful to
you. Would that work, or is there some other interface that would be
more convenient?
--
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/