L2ARC: Implement per-device feed threads for parallel writes

Transform L2ARC from single global feed thread to per-device threads,
enabling parallel writes to multiple L2ARC devices. Each device runs
its own feed thread independently, improving multi-device throughput.
Previously, a single thread served all devices sequentially; now each
device writes concurrently. Threads are created during device addition
and torn down on removal.

Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #18093
This commit is contained in:
Ameer Hamza
2025-12-11 23:06:19 +05:00
committed by Brian Behlendorf
parent 825dc41ad4
commit b525525b44
4 changed files with 172 additions and 184 deletions
-3
View File
@@ -2668,7 +2668,6 @@ spa_init(spa_mode_t mode)
zpool_prop_init();
zpool_feature_init();
vdev_prop_init();
l2arc_start();
scan_init();
qat_init();
spa_import_progress_init();
@@ -2678,8 +2677,6 @@ spa_init(spa_mode_t mode)
void
spa_fini(void)
{
l2arc_stop();
spa_evict_all();
vdev_file_fini();