WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [RFC] design/API for plugging tmem into existing xen phy

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [RFC] design/API for plugging tmem into existing xen physical memory management code
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Thu, 19 Feb 2009 14:20:32 -0800 (PST)
Cc:
Delivery-date: Thu, 19 Feb 2009 14:22:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C5BCD809.2B8F%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
OK, here's the changes I've implemented to plug tmem into the
existing xen physical memory management code.  Hopefully it looks OK.

For easier review, this patch and the diffstat below includes only
files changed in the hypervisor for tmem.

I had some difficulty understanding the page_list macros so left
page_list_splice unimplemented for now.  The working code removes pages
from the tmem list one at a time and adds them to the scrub list,
but since the pages could number in the millions for a large-memory
machine, this could be very slow.

Also, I'm uncertain about the change in alloc_heap_page... is
any tlb flushing required given that tmem pages are never visible
outside of the hypervisor?

Thanks,
Dan

 arch/x86/mm.c                  |   36 +++++++++++++++++++++++++++++++++++
 arch/x86/setup.c               |    3 ++
 arch/x86/x86_32/entry.S        |    2 +
 arch/x86/x86_64/compat/entry.S |    2 +
 arch/x86/x86_64/entry.S        |    2 +
 common/Makefile                |    4 +++
 common/compat/Makefile         |    1 
 common/domain.c                |    4 +++
 common/page_alloc.c            |   42 +++++++++++++++++++++++++++++++++++------
 common/xmalloc_tlsf.c          |   33 ++++++++++++++++++++++----------
 include/Makefile               |    1 
 include/asm-x86/mm.h           |    2 +
 include/public/xen.h           |    1 
 include/xen/hypercall.h        |    5 ++++
 include/xen/mm.h               |   13 ++++++++++++
 include/xen/sched.h            |    3 ++
 include/xen/xmalloc.h          |    8 ++++++-
 include/xlat.lst               |    3 ++
 18 files changed, 148 insertions(+), 17 deletions(-)

Attachment: tmem-xen-mods-19187-090219.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel