diff options
author | Paul Dagnelie <[email protected]> | 2020-12-10 14:09:23 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-10 14:09:23 -0800 |
commit | 60a4c7d2a2f8e8123e3c2e45d1773b5849f74b16 (patch) | |
tree | 6b524ac39fb098004ed115ff9fc14b10350d28a4 /include/os/linux | |
parent | f483daa870e7d129ea988f976429e1210e8aa2e6 (diff) |
Implement memory and CPU hotplug
ZFS currently doesn't react to hotplugging cpu or memory into the
system in any way. This patch changes that by adding logic to the ARC
that allows the system to take advantage of new memory that is added
for caching purposes. It also adds logic to the taskq infrastructure
to support dynamically expanding the number of threads allocated to a
taskq.
Reviewed-by: Brian Behlendorf <[email protected]>
Co-authored-by: Matthew Ahrens <[email protected]>
Co-authored-by: Brian Behlendorf <[email protected]>
Signed-off-by: Paul Dagnelie <[email protected]>
Closes #11212
Diffstat (limited to 'include/os/linux')
-rw-r--r-- | include/os/linux/spl/sys/taskq.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/os/linux/spl/sys/taskq.h b/include/os/linux/spl/sys/taskq.h index 16f4349e7..b50175a10 100644 --- a/include/os/linux/spl/sys/taskq.h +++ b/include/os/linux/spl/sys/taskq.h @@ -84,6 +84,8 @@ typedef struct taskq { int tq_nthreads; /* # of existing threads */ int tq_nspawn; /* # of threads being spawned */ int tq_maxthreads; /* # of threads maximum */ + /* If PERCPU flag is set, percent of NCPUs to have as threads */ + int tq_cpu_pct; int tq_pri; /* priority */ int tq_minalloc; /* min taskq_ent_t pool size */ int tq_maxalloc; /* max taskq_ent_t pool size */ @@ -99,6 +101,9 @@ typedef struct taskq { spl_wait_queue_head_t tq_work_waitq; /* new work waitq */ spl_wait_queue_head_t tq_wait_waitq; /* wait waitq */ tq_lock_role_t tq_lock_class; /* class when taking tq_lock */ + /* list node for the cpu hotplug callback */ + struct hlist_node tq_hp_cb_node; + boolean_t tq_hp_support; } taskq_t; typedef struct taskq_ent { |