[PATCH -V2 4/4] powerpc/kvm: Use 256K chunk to track both RMA and hash page table allocation.
Paul Mackerras
paulus at samba.org
Sat Jun 29 17:43:23 EST 2013
On Fri, Jun 28, 2013 at 02:41:02PM +0530, Aneesh Kumar K.V wrote:
> From: "Aneesh Kumar K.V" <aneesh.kumar at linux.vnet.ibm.com>
>
> Both RMA and hash page table request will be a multiple of 256K. We can use
> a chunk size of 256K to track the free/used 256K chunk in the bitmap. This
> should help to reduce the bitmap size.
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>
Looks good overall, just some minor comments below:
> + int chunk_count, nr_chunk;
I get a little nervous when I see "int" used for variables storing a
number of pages or related things such as chunks. Yes, int is enough
today but one day it won't be, and there is no time or space penalty
to using "long" instead, and in fact the code generated "long"
variables can be slightly shorter. So please make variables like this
"long". (That will require changes to earlier patches in this
series.)
> + * aling mask with chunk size. The bit tracks pages in chunk size
Should be "align".
Paul.
More information about the Linuxppc-dev
mailing list