X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fspa.c;h=c4a8418ef53f05522e7e62b7663b9aaf30e68087;hb=47621f3d76abf63e178b95a446134565cc553b1a;hp=dea58f1e6ae4b0bd7db8238805edfb595a84bc5f;hpb=c28b227942b421ebdc03c9df9a012642fb517223;p=zfs.git diff --git a/module/zfs/spa.c b/module/zfs/spa.c index dea58f1..c4a8418 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -22,6 +22,9 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ +/* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + */ /* * This file contains all the routines used when modifying on-disk SPA state. @@ -95,7 +98,7 @@ typedef struct zio_taskq_info { } zio_taskq_info_t; static const char *const zio_taskq_types[ZIO_TASKQ_TYPES] = { - "issue", "issue_high", "intr", "intr_high" + "iss", "iss_h", "int", "int_h" }; /* @@ -106,8 +109,8 @@ const zio_taskq_info_t zio_taskqs[ZIO_TYPES][ZIO_TASKQ_TYPES] = { /* ISSUE ISSUE_HIGH INTR INTR_HIGH */ { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, { ZTI_FIX(8), ZTI_NULL, ZTI_BATCH, ZTI_NULL }, - { ZTI_BATCH, ZTI_FIX(5), ZTI_FIX(8), ZTI_FIX(5) }, - { ZTI_FIX(100), ZTI_NULL, ZTI_ONE, ZTI_NULL }, + { ZTI_BATCH, ZTI_FIX(5), ZTI_FIX(16), ZTI_FIX(5) }, + { ZTI_PCT(100), ZTI_NULL, ZTI_ONE, ZTI_NULL }, { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, }; @@ -614,9 +617,8 @@ spa_get_errlists(spa_t *spa, avl_tree_t *last, avl_tree_t *scrub) static taskq_t * spa_taskq_create(spa_t *spa, const char *name, enum zti_modes mode, - uint_t value) + uint_t value, uint_t flags) { - uint_t flags = TASKQ_PREPOPULATE; boolean_t batch = B_FALSE; switch (mode) { @@ -666,18 +668,22 @@ spa_create_zio_taskqs(spa_t *spa) const zio_taskq_info_t *ztip = &zio_taskqs[t][q]; enum zti_modes mode = ztip->zti_mode; uint_t value = ztip->zti_value; + uint_t flags = 0; char name[32]; + if (t == ZIO_TYPE_WRITE) + flags |= TASKQ_NORECLAIM; + (void) snprintf(name, sizeof (name), "%s_%s", zio_type_name[t], zio_taskq_types[q]); spa->spa_zio_taskq[t][q] = - spa_taskq_create(spa, name, mode, value); + spa_taskq_create(spa, name, mode, value, flags); } } } -#ifdef _KERNEL +#if defined(_KERNEL) && defined(HAVE_SPA_THREAD) static void spa_thread(void *arg) { @@ -767,6 +773,7 @@ spa_activate(spa_t *spa, int mode) ASSERT(spa->spa_proc == &p0); spa->spa_did = 0; +#ifdef HAVE_SPA_THREAD /* Only create a process if we're going to be around a while. */ if (spa_create_process && strcmp(spa->spa_name, TRYIMPORT_NAME) != 0) { if (newproc(spa_thread, (caddr_t)spa, syscid, maxclsyspri, @@ -787,6 +794,7 @@ spa_activate(spa_t *spa, int mode) #endif } } +#endif /* HAVE_SPA_THREAD */ mutex_exit(&spa->spa_proc_lock); /* If we didn't create a process, we need to create our taskqs. */ @@ -1971,7 +1979,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t *config, cmn_err(CE_WARN, "pool '%s' could not be " "loaded as it was last accessed by " "another system (host: %s hostid: 0x%lx). " - "See: http://www.sun.com/msg/ZFS-8000-EY", + "See: http://zfsonlinux.org/msg/ZFS-8000-EY", spa_name(spa), hostname, (unsigned long)hostid); return (EBADF);