linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* RFC -- new zone type
@ 2011-09-28 18:09 Larry Bassel
  2011-09-29  6:07 ` Sameer Pramod Niphadkar
  2011-09-29 20:19 ` Andi Kleen
  0 siblings, 2 replies; 13+ messages in thread
From: Larry Bassel @ 2011-09-28 18:09 UTC (permalink / raw)
  To: linux-mm; +Cc: vgandhi

We need to create a large (~100M) contiguous physical memory region
which will only be needed occasionally. As this region will
use up 10-20% of all of the available memory, we do not want
to pre-reserve it at boot time. Instead, we want to create
this memory region "on the fly" when asked to by userspace,
and do it as quickly as possible, and return it to
system use when not needed.

AFAIK, this sort of operation is currently done using memory
compaction (as CMA does for instance).
Alternatively, this memory region (if it is in a fixed place)
could be created using "logical memory hotremove" and returned
to the system using "logical memory hotplug". In either case,
the contiguous physical memory would be created via migrating
pages from the "movable zone".

The problem with this approach is that the copying of up to 25000
pages may take considerable time (as well as finding destinations
for all of the pages if free memory is scarce -- this may
even fail, causing the memory region not to be created).

It was suggested to me that a new zone type which would be similar
to the "movable zone" but is only allowed to contain pages
that can be discarded (such as text) could solve this problem,
so that there is no copying or finding destination pages needed (thus
considerably reducing latency).

The downside I see is that there may not be anywhere near
25000 such discardable pages, so most of this zone would go unused, and
the memory would be "wasted" as in the case where it is pre-reserved.
Also, this is not currently supported, so new code would
have to be designed and implemented.

I would appreciate people's comments about:

1. Does this type of zone make any sense? It
would have to co-exist with the current movable zone type.

2. How hard would it be to implement this? The new zone type would
need to be supported and "discardable" pages steered into this zone.

3. Are there better ways of allocating a large memory region
with minimal latency that I haven't mentioned here?

Thanks.

Larry Bassel

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <20110928180909.GA7007@labbmf-linux.qualcomm.comCAOFJiu1_HaboUMqtjowA2xKNmGviDE55GUV4OD1vN2hXUf4-kQ@mail.gmail.com>]

end of thread, other threads:[~2011-10-12 22:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-28 18:09 RFC -- new zone type Larry Bassel
2011-09-29  6:07 ` Sameer Pramod Niphadkar
2011-09-29 16:38   ` [Xen-devel] " Dan Magenheimer
2011-09-29 17:00     ` Larry Bassel
2011-10-05 16:56     ` Larry Bassel
2011-10-05 19:43       ` Dan Magenheimer
2011-10-06 23:03         ` Larry Bassel
2011-10-07 15:23           ` Dan Magenheimer
2011-10-07 16:01             ` Seth Jennings
2011-10-07 17:19               ` Larry Bassel
2011-10-12 22:20                 ` Dan Magenheimer
2011-09-29 20:19 ` Andi Kleen
2011-09-30 17:01   ` Larry Bassel
     [not found] <20110928180909.GA7007@labbmf-linux.qualcomm.comCAOFJiu1_HaboUMqtjowA2xKNmGviDE55GUV4OD1vN2hXUf4-kQ@mail.gmail.com>
     [not found] ` <c2d9add1-0095-4319-8936-db1b156559bf@default20111005165643.GE7007@labbmf-linux.qualcomm.com>

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).