]> git.proxmox.com Git - mirror_zfs.git/commit
FreeBSD: Implement taskq_init_ent()
authorAlexander Motin <mav@FreeBSD.org>
Tue, 7 Nov 2023 19:37:18 +0000 (14:37 -0500)
committerGitHub <noreply@github.com>
Tue, 7 Nov 2023 19:37:18 +0000 (11:37 -0800)
commit020f6fd093b628af5a34eb1cea9a3d800aa17ffb
tree9ee4403246b472e985708f36b141fe85b0cd6730
parent58398cbd035116ba1d5756bae338664573e60d21
FreeBSD: Implement taskq_init_ent()

Previously taskq_init_ent() was an empty macro, while actual init
was done by taskq_dispatch_ent().  It could be slightly faster in
case taskq never enqueued. But without it taskq_empty_ent() relied
on the structure being zeroed by somebody else, that is not good.

As a side effect this allows the same task to be queued several
times, that is normal on FreeBSD, that may or may not get useful
here also one day.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15455
include/os/freebsd/spl/sys/taskq.h
module/os/freebsd/spl/spl_taskq.c