Skip to content

Conversation

@robn
Copy link
Member

@robn robn commented Nov 18, 2025

Motivation and Context

Looking into the literature on task queueing and scheduling, I discovered that "thread pool" and "task queue" are basically the same thing. As a consummate professional, I naturally said "wuh?", and had a look at our own libtpool. Sure enough, almost the same interface. To hide my shame, I have elected to remove it entirely, and perhaps no one will ever know.

No but seriously, its a bit like libuutil (#17934) - the same as a thing we use everywhere else. Lets not carry two when one will do.

Description

Just the two commits. First, a small adjustment to libspl/taskq so it is self-initialising. Then, converting all the tpool_t users to taskq_t.

How Has This Been Tested?

Compile checked on Linux & FreeBSD, full ZTS pass on Linux.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

robn added 2 commits November 18, 2025 15:19
Doing it this way means that callers don't have to call
system_taskq_init() and also get the system and system_delay taskqs that
they possibly don't even want.

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <[email protected]>
They're basically the same thing; lets just carry one.

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <[email protected]>
@amotin amotin added the Status: Code Review Needed Ready for review and testing label Nov 18, 2025
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Accepted Ready to integrate (reviewed, tested)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants