HomeFreeBSD

zio: try to execute TYPE_NULL ZIOs on the current task

Description

zio: try to execute TYPE_NULL ZIOs on the current task

Many TYPE_NULL ZIOs are used to provide a sync point for child ZIOs, and
do not do any actual work themselves. However, they are still dispatched
to a dedicated, single-thread taskq, which leads to their execution
being entirely task switch and dequeue overhead for no actual reason.

This commit changes it so that when selecting a parent ZIO to execute,
if the parent is TYPE_NULL and has no done function (that is, no
additional work), it is executed on the same thread. This reduces task
switches and frees up CPU cores for other work.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #16134

Details

Provenance
rob.norris_klarasystems.comAuthored on Apr 29 2024, 10:57 PM
GitHub <noreply@github.com>Committed on Apr 29 2024, 10:57 PM
Parents
rGc3f2f1aa2dcc: vdev probe to slow disk can stall mmp write checker
Branches
Unknown
Tags
Unknown