Re: [PATCH] kvm : remove redundant initialization of page->private

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/11/2010 10:51 AM, Jan Kiszka wrote:
Avi Kivity wrote:
On 03/10/2010 04:31 PM, Minchan Kim wrote:
The prep_new_page() in page allocator calls set_page_private(page, 0).
So we don't need to reinitialize private of page.


Applied, thanks.  Please copy the kvm mailing list in the future on kvm
patches.

diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 741373e..9851d0e 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -326,7 +326,6 @@ static int mmu_topup_memory_cache_page(struct kvm_mmu_memory_cache *cache,
   		page = alloc_page(GFP_KERNEL);
   		if (!page)
   			return -ENOMEM;
-		set_page_private(page, 0);
   		cache->objects[cache->nobjs++] = page_address(page);
   	}
   	return 0;

Jan, this is kvm-kmod unfriendly.  kvm_alloc_page()?

Thanks for pointing out! Since which kernel can we rely on the implicit
set_page_private?


Um, git blame shows it goes all the way back to 2.6.12. So it was redundant all along.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]