summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-05-24 10:09:36 +0000
committerpjd <pjd@FreeBSD.org>2010-05-24 10:09:36 +0000
commit27418a37e7f3641179665968631d55d8f9489578 (patch)
treee9513d13068368e462403515d2f3a49929289cc8 /sys/kern
parent243b56bf05c84c22d57ea1ec8335b4b9c2ce1fa2 (diff)
downloadFreeBSD-src-27418a37e7f3641179665968631d55d8f9489578.zip
FreeBSD-src-27418a37e7f3641179665968631d55d8f9489578.tar.gz
MFC r207920,r207934,r207936,r207937,r207970,r208142,r208147,r208148,r208166,
r208454,r208455,r208458: r207920: Back out r205134. It is not stable. r207934: Add missing new line characters to the warnings. r207936: Eventhough r203504 eliminates taste traffic provoked by vdev_geom.c, ZFS still like to open all vdevs, close them and open them again, which in turn provokes taste traffic anyway. I don't know of any clean way to fix it, so do it the hard way - if we can't open provider for writing just retry 5 times with 0.5 pauses. This should elimitate accidental races caused by other classes tasting providers created on top of our vdevs. Reported by: James R. Van Artsdalen <james-freebsd-fs2@jrv.org> Reported by: Yuri Pankov <yuri.pankov@gmail.com> r207937: I added vfs_lowvnodes event, but it was only used for a short while and now it is totally unused. Remove it. r207970: When there is no memory or KVA, try to help by reclaiming some vnodes. This helps with 'kmem_map too small' panics. No objections from: kib Tested by: Alexander V. Ribchansky <shurik@zk.informjust.ua> r208142: The whole point of having dedicated worker thread for each leaf VDEV was to avoid calling zio_interrupt() from geom_up thread context. It turns out that when provider is forcibly removed from the system and we kill worker thread there can still be some ZIOs pending. To complete pending ZIOs when there is no worker thread anymore we still have to call zio_interrupt() from geom_up context. To avoid this race just remove use of worker threads altogether. This should be more or less fine, because I also thought that zio_interrupt() does more work, but it only makes small UMA allocation with M_WAITOK. It also saves one context switch per I/O request. PR: kern/145339 Reported by: Alex Bakhtin <Alex.Bakhtin@gmail.com> r208147: Add task structure to zio and use it instead of allocating one. This eliminates the only place where we can sleep when calling zio_interrupt(). As a side-effect this can actually improve performance a little as we allocate one less thing for every I/O. Prodded by: kib r208148: Allow to configure UMA usage for ZIO data via loader and turn it on by default for amd64. On i386 I saw performance degradation when UMA was used, but for amd64 it should help. r208166: Fix userland build by making io_task available only for the kernel and by providing taskq_dispatch_safe() macro. r208454: Remove ZIO_USE_UMA from arc.c as well. r208455: ZIO_USE_UMA is no longer used. r208458: Create UMA zones unconditionally.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_subr.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 0265b74..18d75dd 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -800,7 +800,6 @@ vnlru_proc(void)
}
mtx_unlock(&mountlist_mtx);
if (done == 0) {
- EVENTHANDLER_INVOKE(vfs_lowvnodes, desiredvnodes / 10);
#if 0
/* These messages are temporary debugging aids */
if (vnlru_nowhere < 5)
@@ -822,6 +821,19 @@ static struct kproc_desc vnlru_kp = {
};
SYSINIT(vnlru, SI_SUB_KTHREAD_UPDATE, SI_ORDER_FIRST, kproc_start,
&vnlru_kp);
+
+static void
+vfs_lowmem(void *arg __unused)
+{
+
+ /*
+ * On low memory condition free 1/8th of the free vnodes.
+ */
+ mtx_lock(&vnode_free_list_mtx);
+ vnlru_free(freevnodes / 8);
+ mtx_unlock(&vnode_free_list_mtx);
+}
+EVENTHANDLER_DEFINE(vm_lowmem, vfs_lowmem, NULL, 0);
/*
* Routines having to do with the management of the vnode table.
OpenPOWER on IntegriCloud