[PATCH] Palacios free pages function in kitten.

3 views
Skip to first unread message

Philip Soltero

unread,
Dec 22, 2010, 2:06:22 PM12/22/10
to V3VEE Development
I sent this last night, but for some reason it never posted so I'm resending.

Over a month ago the Palacios page free interface was updated;
however, kitten was not updated. This patch should take care of that.

palacios_free_pages

Philip Soltero

unread,
Dec 22, 2010, 3:05:49 AM12/22/10
to v3vee-de...@googlegroups.com
palacios_free_pages

Kevin Pedretti

unread,
Feb 3, 2011, 2:39:03 PM2/3/11
to v3vee-de...@googlegroups.com
Philip,

Jack checked in your prototype change awhile back, but not the modification to query.end.  The current code in Kitten only will release a single page on each palacios_free_pages() call.  Is that intentional... i.e. the num_pages arg should be ignored?  If it should not be ignored, I'll check in the patch below if it looks OK to you.

Kevin


ktpedre@ubuntu:~/src/kitten/arch/x86_64/kernel/palacios$ hg diff
diff -r 3a27e5635d40 arch/x86_64/kernel/palacios/palacios.c
--- a/arch/x86_64/kernel/palacios/palacios.c    Wed Jan 19 09:31:59 2011 +0100
+++ b/arch/x86_64/kernel/palacios/palacios.c    Thu Feb 03 11:35:50 2011 -0800
@@ -143,9 +143,7 @@
 }
 
 /**
- * Frees a page previously allocated via palacios_allocate_page().
- * Note that palacios_allocate_page() can allocate multiple pages with
- * a single call while palacios_free_page() only frees a single page.
+ * Frees pages previously allocated via palacios_allocate_pages().
  */
 static void
 palacios_free_pages(
@@ -160,7 +158,7 @@
     pmem_region_unset_all(&query);
 
     query.start        = (uintptr_t) page_paddr;
-    query.end        = (uintptr_t) page_paddr + PAGE_SIZE;
+    query.end        = (uintptr_t) page_paddr + num_pages * PAGE_SIZE;
     query.allocated        = true;
     query.allocated_is_set    = true;


--
You received this message because you are subscribed to the Google Groups "V3VEE Development" group.
To post to this group, send email to v3vee-de...@googlegroups.com.
To unsubscribe from this group, send email to v3vee-developm...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/v3vee-development?hl=en.


Jack Lange

unread,
Feb 4, 2011, 11:54:01 AM2/4/11
to v3vee-de...@googlegroups.com
Wow I'm lazy. For some reason I thought that Kitten tracked the
allocation ranges and freed everything based on the start address.
Probably should have read the comment...

My fault, go ahead and commit.
--Jack

Reply all
Reply to author
Forward
0 new messages