Re: [PATCHv2 0/3] Find mirrored memory, use for boot time allocations

From: Tony Luck
Date: Fri May 08 2015 - 19:41:34 EST


On Fri, May 8, 2015 at 1:49 PM, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> What I mean is: allow userspace to consume ZONE_MIRROR memory because
> we can snatch it back if it is needed for kernel memory.

For suitable interpretations of "snatch it back" ... if there is none
free in a GFP_NOWAIT request, then we are doomed. But we
could maintain some high/low watermarks to arrange the snatching
when mirrored memory is getting low, rather than all the way out.

It's worth a look - but perhaps at phase three. It would make life
a bit easier for people to get the right amount of mirror. If they
guess too high they are still wasting some memory because
every mirrored page has two pages in DIMM. But without this
sort of trick all the extra mirrored memory would be totally wasted.

-Tony
--
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/