[openib-general] [PATCH 02/17] ehca: module infrastructure

Roland Dreier rdreier at cisco.com
Fri Mar 3 07:57:24 PST 2006


    Heiko> Hello Christoph, I only did kmalloc(PAGE_SIZE, GFP_KERNEL)
    Heiko> because we need some amount of memory which is 4k
    Heiko> aligned. I'm not sure, but I think if I use kmalloc(SIZE,
    Heiko> GFP_KERNEL) and SIZE is smaller as 4k the memory will not
    Heiko> be 4k aligned?

If you need something 4K aligned then you should be using 4096 instead
of PAGE_SIZE -- it's entirely possible to build a ppc64 kernel with
PAGE_SIZE == 65536.

It is true of course that smaller kmallocs will not be aligned.

 - R.



More information about the general mailing list