zfs/module/splat
Brian Behlendorf 8b45dda2bc Linux 2.6.31 kmem cache alignment fixes and cleanup.
The big fix here is the removal of kmalloc() in kv_alloc().  It used
to be true in previous kernels that kmallocs over PAGE_SIZE would
always be pages aligned.  This is no longer true atleast in 2.6.31
there are no longer any alignment expectations.  Since kv_alloc()
requires the resulting address to be page align we no only either
directly allocate pages in the KMC_KMEM case, or directly call
__vmalloc() both of which will always return a page aligned address.
Additionally, to avoid wasting memory size is always a power of two.

As for cleanup several helper functions were introduced to calculate
the aligned sizes of various data structures.  This helps ensure no
case is accidentally missed where the alignment needs to be taken in
to account.  The helpers now use P2ROUNDUP_TYPE instead of P2ROUNDUP
which is safer since the type will be explict and we no longer count
on the compiler to auto promote types hopefully as we expected.

Always wnforce minimum (SPL_KMEM_CACHE_ALIGN) and maximum (PAGE_SIZE)
alignment restrictions at cache creation time.

Use SPL_KMEM_CACHE_ALIGN in splat alignment test.
2009-11-13 11:12:43 -08:00
..
Makefile.in Add basic credential support and splat tests. 2009-07-27 17:18:59 -07:00
splat-atomic.c SLES10 Fixes (part 9) 2009-05-21 10:56:11 -07:00
splat-condvar.c SLES10 Fixes (part 9) 2009-05-21 10:56:11 -07:00
splat-cred.c Add basic credential support and splat tests. 2009-07-27 17:18:59 -07:00
splat-ctl.c Use kobject_set_name() for increased portability. 2009-10-02 16:21:59 -07:00
splat-generic.c SLES10 Fixes (part 9) 2009-05-21 10:56:11 -07:00
splat-internal.h Reimplement rwlocks for Linux lock profiling/analysis. 2009-09-18 16:09:47 -07:00
splat-kmem.c Linux 2.6.31 kmem cache alignment fixes and cleanup. 2009-11-13 11:12:43 -08:00
splat-kobj.c SLES10 Fixes (part 9) 2009-05-21 10:56:11 -07:00
splat-list.c SLES10 Fixes (part 9) 2009-05-21 10:56:11 -07:00
splat-mutex.c Reimplement mutexs for Linux lock profiling/analysis 2009-09-25 14:47:01 -07:00
splat-random.c SLES10 Fixes (part 9) 2009-05-21 10:56:11 -07:00
splat-rwlock.c Reimplement rwlocks for Linux lock profiling/analysis. 2009-09-18 16:09:47 -07:00
splat-taskq.c SLES10 Fixes (part 9) 2009-05-21 10:56:11 -07:00
splat-thread.c SLES10 Fixes (part 9) 2009-05-21 10:56:11 -07:00
splat-time.c SLES10 Fixes (part 9) 2009-05-21 10:56:11 -07:00
splat-vnode.c SLES10 Fixes (part 9) 2009-05-21 10:56:11 -07:00