From: Dan Magenheimer Subject: RE: [RFC] design/API for plugging tmem into existing xen physical memory management code Date: Thu, 19 Feb 2009 14:24:31 -0800 (PST) Message-ID: <904d6503-63df-42d2-b290-b5750d4f9bbc@default> References: <7fa87e98-d57c-44f3-9488-923a336e317b@default> Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <7fa87e98-d57c-44f3-9488-923a336e317b@default> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: dan.magenheimer@oracle.com, Keir Fraser , "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org Oops, always after the email is sent! :-) I neglected the page_scrub_lock around scrub_list_add and scrub_list_splice. Consider those already added. Dan > -----Original Message----- > From: Dan Magenheimer=20 > Sent: Thursday, February 19, 2009 3:21 PM > To: Keir Fraser; Xen-Devel (E-mail) > Subject: RE: [Xen-devel] [RFC] design/API for plugging tmem into > existing xen physical memory management code >=20 >=20 > OK, here's the changes I've implemented to plug tmem into the > existing xen physical memory management code. Hopefully it looks OK. >=20 > For easier review, this patch and the diffstat below includes only > files changed in the hypervisor for tmem. >=20 > I had some difficulty understanding the page_list macros so left > page_list_splice unimplemented for now. The working code=20 > 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. >=20 > 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? >=20 > Thanks, > Dan >=20 > arch/x86/mm.c | 36=20 > +++++++++++++++++++++++++++++++++++ > 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=20 > common/domain.c | 4 +++ > common/page_alloc.c | 42=20 > +++++++++++++++++++++++++++++++++++------ > common/xmalloc_tlsf.c | 33=20 > ++++++++++++++++++++++---------- > include/Makefile | 1=20 > include/asm-x86/mm.h | 2 + > include/public/xen.h | 1=20 > 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(-)