mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-27 04:32:16 +03:00
OpenZFS 8558, 8602 - lwp_create() returns EAGAIN
8558 lwp_create() returns EAGAIN on system with more than 80K ZFS filesystems On a system with more than 80K ZFS filesystems, we've seen cases where lwp_create() will start to fail by returning EAGAIN. The problem being, for each of those 80K ZFS filesystems, a taskq will be created for each dataset as part of the ZIL for each dataset. Porting Notes: - The new nomem taskq kstat was dropped. - Added module options and documentation for new tunings zfs_zil_clean_taskq_nthr_pct, zfs_zil_clean_taskq_minalloc, zfs_zil_clean_taskq_maxalloc, and zfs_sync_taskq_batch_pct. Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Sebastien Roy <sebastien.roy@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Authored by: Prakash Surya <prakash.surya@delphix.com> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Chris Dunlop <chris@onthe.net.au> Ported-by: Brian Behlendorf <behlendorf1@llnl.gov> OpenZFS-issue: https://www.illumos.org/issues/8558 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/216d772 8602 remove unused "dp_early_sync_tasks" field from "dsl_pool" structure Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Authored by: Prakash Surya <prakash.surya@delphix.com> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Chris Dunlop <chris@onthe.net.au> Ported-by: Brian Behlendorf <behlendorf1@llnl.gov> OpenZFS-issue: https://www.illumos.org/issues/8602 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/2bcb545 Closes #6779
This commit is contained in:
+6
-9
@@ -1473,8 +1473,7 @@ zil_clean(zilog_t *zilog, uint64_t synced_txg)
|
||||
return;
|
||||
}
|
||||
ASSERT3U(itxg->itxg_txg, <=, synced_txg);
|
||||
ASSERT(itxg->itxg_txg != 0);
|
||||
ASSERT(zilog->zl_clean_taskq != NULL);
|
||||
ASSERT3U(itxg->itxg_txg, !=, 0);
|
||||
clean_me = itxg->itxg_itxs;
|
||||
itxg->itxg_itxs = NULL;
|
||||
itxg->itxg_txg = 0;
|
||||
@@ -1485,8 +1484,11 @@ zil_clean(zilog_t *zilog, uint64_t synced_txg)
|
||||
* free it in-line. This should be rare. Note, using TQ_SLEEP
|
||||
* created a bad performance problem.
|
||||
*/
|
||||
if (taskq_dispatch(zilog->zl_clean_taskq,
|
||||
(void (*)(void *))zil_itxg_clean, clean_me, TQ_NOSLEEP) == 0)
|
||||
ASSERT3P(zilog->zl_dmu_pool, !=, NULL);
|
||||
ASSERT3P(zilog->zl_dmu_pool->dp_zil_clean_taskq, !=, NULL);
|
||||
taskqid_t id = taskq_dispatch(zilog->zl_dmu_pool->dp_zil_clean_taskq,
|
||||
(void (*)(void *))zil_itxg_clean, clean_me, TQ_NOSLEEP);
|
||||
if (id == TASKQID_INVALID)
|
||||
zil_itxg_clean(clean_me);
|
||||
}
|
||||
|
||||
@@ -1959,13 +1961,10 @@ zil_open(objset_t *os, zil_get_data_t *get_data)
|
||||
{
|
||||
zilog_t *zilog = dmu_objset_zil(os);
|
||||
|
||||
ASSERT(zilog->zl_clean_taskq == NULL);
|
||||
ASSERT(zilog->zl_get_data == NULL);
|
||||
ASSERT(list_is_empty(&zilog->zl_lwb_list));
|
||||
|
||||
zilog->zl_get_data = get_data;
|
||||
zilog->zl_clean_taskq = taskq_create("zil_clean", 1, defclsyspri,
|
||||
2, 2, TASKQ_PREPOPULATE);
|
||||
|
||||
return (zilog);
|
||||
}
|
||||
@@ -2000,8 +1999,6 @@ zil_close(zilog_t *zilog)
|
||||
if (txg < spa_freeze_txg(zilog->zl_spa))
|
||||
VERIFY(!zilog_is_dirty(zilog));
|
||||
|
||||
taskq_destroy(zilog->zl_clean_taskq);
|
||||
zilog->zl_clean_taskq = NULL;
|
||||
zilog->zl_get_data = NULL;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user