于 2013-5-9 22:13, Mel Gorman 写道:
On Thu, May 09, 2013 at 05:50:05PM +0800, wenchaolinux@xxxxxxxxx wrote:
From: Wenchao Xia <wenchaolinux@xxxxxxxxx>
This serial try to enable mremap syscall to cow some private memory region,
just like what fork() did. As a result, user space application would got a
mirror of those region, and it can be used as a snapshot for further processing.
What not just fork()? Even if the application was threaded it should be
managable to handle fork just for processing the private memory region
in question. I'm having trouble figuring out what sort of application
would require an interface like this.
It have some troubles: parent - child communication, sometimes
page copy.
I'd like to snapshot qemu guest's RAM, currently solution is:
1) fork()
2) pipe guest RAM data from child to parent.
3) parent write down the contents.
To avoid complex communication for data control, and file content
protecting, So let parent instead of child handling the data with
a pipe, but this brings additional copy(). I think an explicit API
cow mapping an memory region inside one process, could avoid it,
and faster and cow less pages, also make user space code nicer.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>