Re: kmalloc alignment

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

 



>>>>> On Tue, 19 Oct 2004 18:59:01 +0200, Ralf Baechle <ralf@xxxxxxxxxxxxxx> said:
ralf> The alignment needs to be large enough to store an arbitrary
ralf> fundamental data type including the 64-bit types such as long
ralf> long or double.

ralf> cache_line_size() is only used if a slab has SLAB_HWCACHE_ALIGN
ralf> set.

SLAB_HWCACHE_ALIGN is default ARCH_KMALLOC_FLAGS, so normal kmalloc
will use cache_line_size() (if no ARCH_KMALLOC_MINALIGN).

ralf> The alignment requirements are documented in
ralf> Documentation/DMA-API.txt and they are specified the way they
ralf> are for good reason.

Hmm... I had been thought of many PCI ether driver (which maps
skbuff), but I found skb_init() calls kmem_cache_create with
SLAB_HWCACHE_ALIGN.  Maybe I should learn much about it...  Thank you.


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux