freebsd with flexible iflib nic queues
Go to file
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
cmd Simplify rpm build rules, added config/rpm.am. 2009-07-01 14:37:44 -07:00
config Linux 2.6.31 Compatibility Updates 2009-11-10 14:06:57 -08:00
include Linux 2.6.31 kmem cache alignment fixes and cleanup. 2009-11-13 11:12:43 -08:00
lib Simplify rpm build rules, added config/rpm.am. 2009-07-01 14:37:44 -07:00
module Linux 2.6.31 kmem cache alignment fixes and cleanup. 2009-11-13 11:12:43 -08:00
patches Reimplement rwlocks for Linux lock profiling/analysis. 2009-09-18 16:09:47 -07:00
scripts Simplify rpm build rules, added config/rpm.am. 2009-07-01 14:37:44 -07:00
AUTHORS Prep for spl-0.4.3 tag. 2009-03-20 14:48:30 -07:00
autogen.sh Packaging improvements for RHEL and SLES 2009-06-16 10:44:59 -07:00
ChangeLog Prep for 0.4.6 tag, updated META and ChangeLog. 2009-11-02 10:24:12 -08:00
configure Linux 2.6.31 Compatibility Updates 2009-11-10 14:06:57 -08:00
configure.ac Simplify rpm build rules, added config/rpm.am. 2009-07-01 14:37:44 -07:00
COPYING Go through and add a header with the proper UCRL number. 2008-05-26 04:38:26 +00:00
DISCLAIMER Go through and add a header with the proper UCRL number. 2008-05-26 04:38:26 +00:00
INSTALL Trivial commit to remove whitespace 2008-07-09 19:11:29 +00:00
Makefile.am Simplify rpm build rules, added config/rpm.am. 2009-07-01 14:37:44 -07:00
Makefile.in Simplify rpm build rules, added config/rpm.am. 2009-07-01 14:37:44 -07:00
META Prep for 0.4.6 tag, updated META and ChangeLog. 2009-11-02 10:24:12 -08:00
spl_config.h.in Autoconf --enable-debug-* cleanup 2009-10-30 13:58:51 -07:00
spl_unconfig.h Allow spl_config.h to be included by dependant packages 2009-03-17 14:55:59 -07:00
spl-modules.spec.in Remove usage of the __id_u macro for portability. 2009-10-05 12:51:58 -07:00
spl.spec.in Remove usage of the __id_u macro for portability. 2009-10-05 12:51:58 -07:00