Re: [PATCH 3/3] KVM: PPC: Add HPT preallocator

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

 



On Thu, Jan 19, 2012 at 12:17:38AM +0100, Alexander Graf wrote:

>  	/* Allocate guest's hashed page table */
> +
> +	/* using preallocated memory */
> +	li = kvm_alloc_hpt();
> +	if (li) {
> +		hpt = (ulong)li->base_virt;
> +		kvm->arch.hpt_li = li;
> +		goto has_hpt;
> +	}
> +
> +	/* using dynamic memory */
>  	hpt = __get_free_pages(GFP_KERNEL|__GFP_ZERO|__GFP_REPEAT|__GFP_NOWARN,
>  			       HPT_ORDER - PAGE_SHIFT);
> +
> +has_hpt:

This would look cleaner and be easier to follow if you used the "else"
keyword. :)

Paul.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux