From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark McLoughlin Subject: Re: [PATCH] virtio: Define and use per-architecture "pfn shift" constants Date: Thu, 06 Nov 2008 10:49:51 +0000 Message-ID: <1225968591.7284.9.camel@blaa> References: Reply-To: Mark McLoughlin Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org, kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kvm-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Hollis Blanchard Return-path: In-Reply-To: Sender: kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: kvm.vger.kernel.org On Wed, 2008-11-05 at 22:49 -0600, Hollis Blanchard wrote: > - info->queue = kzalloc(PAGE_ALIGN(vring_size(num,PAGE_SIZE)), GFP_KERNEL); > + vring_bytes = PAGE_ALIGN(vring_size(num, VRING_PAGE_SIZE)); > + info->queue = kzalloc(vring_bytes, GFP_KERNEL); You're still aligning the size to PAGE_SIZE rather than VRING_PAGE_SIZE? But actually, why do we align the size anyway? Also might make sense for vring_init() and vring_size() not to take a pagesize argument and hard-code them to use VRING_PAGE_SIZE. Cheers, Mark. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html