add new exported function replace_page()
Subsystems (3)
RFC PATCH 2/5 add new exported function replace_page()
Signature · 2 lines
-- woof.
Quoted 1 line
From
c6fc21397e37481696723115cb1680f42661be48Mon Sep 17 00:00:00 2001
From: Izik Eidus <izike-atKUWr5tajBWk0Htik3J/[email protected]>
Date: Mon, 21 Jan 2008 17:04:45 +0200
Subject: [PATCH] memory.c: add new exported function replace_page()
replace_page() - replace the pte mapping related to vm area between two pages (from oldpage to newpage)
--- include/linux/mm.h | 5 +++- mm/memory.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletions(-)
include/linux/mm.h +4 -1
@@ -1094,7 +1094,10 @@ int remap_pfn_range(struct vm_area_struct *, unsigned long addr, unsigned long pfn, unsigned long size, pgprot_t);int vm_insert_page (struct vm_area_struct *,unsigned long addr,struct page *);int vm_insert_pfn (struct vm_area_struct *vma,unsigned long addr, -unsigned long pfn); +unsigned long pfn); + +int replace_page (struct vm_area_struct *vma,struct page *oldpage, +struct page *newpage,pgprot_t prot);struct page *follow_page (struct vm_area_struct *,unsigned long address,unsigned int foll_flags);
mm/memory.c +60 -0
66 lines not on this page · raw message
Signature · 1 line
1.5.3.6
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel
Quoted 1 line · On Mon, 21 Jan 2008 18:10:50 +0200 Izik Eidus…
What prevents another CPU from freeing newpage while we run through the start of replace_page() ?
Signature · 6 lines
All rights reversed. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Quoted 9 lines · Rik van Riel
On Mon, 21 Jan 2008 18:10:50 +0200
Izik Eidus <izike-atKUWr5tajBWk0Htik3J/[email protected]> wrote:What prevents another CPU from freeing newpage while we run through the start of
replace_page()?
before calling to replace_page one have to call to get_page() and to do put_page() after it finished
this what i am doing in ksm.c
should i do it in diffrent way?
Signature · 7 lines
woof. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/