freebsd-dev/include/sys
Brian Behlendorf ae6ba3dbe6 Improve meta data performance
Profiling the system during meta data intensive workloads such
as creating/removing millions of files, revealed that the system
was cpu bound.  A large fraction of that cpu time was being spent
waiting on the virtual address space spin lock.

It turns out this was caused by certain heavily used kmem_caches
being backed by virtual memory.  By default a kmem_cache will
dynamically determine the type of memory used based on the object
size.  For large objects virtual memory is usually preferable
and for small object physical memory is a better choice.  See
the spl_slab_alloc() function for a longer discussion on this.

However, there is a certain amount of gray area when defining a
'large' object.  For the following caches it turns out they were
just over the line:

  * dnode_cache
  * zio_cache
  * zio_link_cache
  * zio_buf_512_cache
  * zfs_data_buf_512_cache

Now because we know there will be a lot of churn in these caches,
and because we know the slabs will still be reasonably sized.
We can safely request with the KMC_KMEM flag that the caches be
backed with physical memory addresses.  This entirely avoids the
need to serialize on the virtual address space lock.

As a bonus this also reduces our vmalloc usage which will be good
for 32-bit kernels which have a very small virtual address space.
It will also probably be good for interactive performance since
unrelated processes could also block of this same global lock.
Finally, we may see less cpu time being burned in the arc_reclaim
and txg_sync_threads.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #258
2011-11-03 10:19:21 -07:00
..
fm Autogen refresh for udev changes 2011-08-08 16:30:27 -07:00
fs Autogen refresh for udev changes 2011-08-08 16:30:27 -07:00
arc.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
avl_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
avl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
bplist.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
bpobj.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dbuf.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
ddt.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dmu_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dmu_objset.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dmu_traverse.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dmu_tx.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dmu_zfetch.h Add missing ZFS tunables 2011-05-04 10:02:37 -07:00
dmu.h Illumos #755: dmu_recv_stream builds incomplete guid_to_ds_map 2011-10-18 11:18:14 -07:00
dnode.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dsl_dataset.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dsl_deadlist.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dsl_deleg.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dsl_dir.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dsl_pool.h Prototype/structure update for Linux 2011-02-10 09:27:21 -08:00
dsl_prop.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dsl_scan.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dsl_synctask.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
efi_partition.h Make libefi-created GPT compatible with gptfdisk 2011-09-26 09:44:43 -07:00
Makefile.am Add xvattr support 2011-03-02 11:43:50 -08:00
Makefile.in Autogen refresh for udev changes 2011-08-08 16:30:27 -07:00
metaslab_impl.h Illumos #1051: zfs should handle imbalanced luns 2011-08-01 12:09:11 -07:00
metaslab.h Illumos #1051: zfs should handle imbalanced luns 2011-08-01 12:09:11 -07:00
nvpair_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
nvpair.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
refcount.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
rrwlock.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
sa_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
sa.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
spa_boot.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
spa_impl.h Illumos #1051: zfs should handle imbalanced luns 2011-08-01 12:09:11 -07:00
spa.h Illumos #1051: zfs should handle imbalanced luns 2011-08-01 12:09:11 -07:00
space_map.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
txg_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
txg.h Add API to wait for pending commit callbacks 2011-02-16 11:20:06 -08:00
u8_textprep_data.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
u8_textprep.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
uberblock_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
uberblock.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
uio_impl.h Add basic uio support 2011-02-10 09:21:43 -08:00
unique.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
uuid.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
vdev_disk.h Linux 2.6.x compat, blkdev_compat.h 2011-02-23 12:29:38 -08:00
vdev_file.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
vdev_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
vdev.h Add missing ZFS tunables 2011-05-04 10:02:37 -07:00
xvattr.h Add xvattr support 2011-03-02 11:43:50 -08:00
zap_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zap_leaf.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zap.h Export symbols for the full ZAP API 2011-09-27 16:12:36 -07:00
zfs_acl.h Add xvattr support 2011-03-02 11:43:50 -08:00
zfs_context.h Improve meta data performance 2011-11-03 10:19:21 -07:00
zfs_debug.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zfs_dir.h Prototype/structure update for Linux 2011-02-10 09:27:21 -08:00
zfs_fuid.h Prototype/structure update for Linux 2011-02-10 09:27:21 -08:00
zfs_ioctl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zfs_onexit.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zfs_rlock.h Range lock performance improvements 2011-03-08 12:44:06 -08:00
zfs_sa.h Export symbols for the full SA API 2011-10-05 15:59:56 -07:00
zfs_stat.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zfs_vfsops.h Export symbols for the VFS API 2011-10-11 10:25:59 -07:00
zfs_vnops.h Cleanup mmap(2) writes 2011-08-02 10:34:55 -07:00
zfs_znode.h Linux compat 2.6.39: mount_nodev() 2011-07-01 13:36:39 -07:00
zil_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zil.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zio_checksum.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zio_compress.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zio_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zio.h Initial zio delay timing 2010-10-12 14:55:02 -07:00
zpl.h Linux compat 2.6.39: mount_nodev() 2011-07-01 13:36:39 -07:00
zrlock.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zvol.h Linux 2.6.x compat, blkdev_compat.h 2011-02-23 12:29:38 -08:00