Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix abd, have taskq_wait_synced() wait for threads to be created #24

Merged

Conversation

rottegift
Copy link
Collaborator

taskq_wait_synced() did a VERIFY() on whether the taskq's threads were the requested number, but taskq_create() can ultimately return early because taskq_thread_create() is allowed to return when two desired threads are created.

fix this race panic. also, taskq_wait_synced() may fail if if num_ecores is nonzero (on Apple Silicon), so create a flag that lets taskq_create_common() deal with the max_ncpus.

Make boot_ncpus a variable that's MAX(1, (int)max_ncores - num_ecores). boot_ncpus is used in common code.

Modify the alignments and quanta/import sizes of the abd kmem and vmem cache creations. Make DEBUG builds work with KMF_LITE | KMF_BUFCTL on the abd kmem caches.

Motivation and Context

Description

How Has This Been Tested?

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)
  • 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:

@rottegift rottegift added bug Something isn't working Ready For Review Ready For Review labels Dec 6, 2023
@rottegift rottegift self-assigned this Dec 6, 2023
@lundman lundman force-pushed the macOS_20231129 branch 2 times, most recently from 144bf1a to 33ad46e Compare December 6, 2023 09:25
taskq_wait_synced() did a VERIFY() on whether the taskq's
threads were the requested number, but taskq_create() can
ultimately return early because taskq_thread_create() is
allowed to return when two desired threads are created.

Fix this race panic.  Also, taskq_wait_synced() may fail if
if num_ecores is nonzero (on Apple Silicon), so create a
flag that lets taskq_create_common() deal with the
max_ncpus.

Make boot_ncpus a variable that's MAX(1, (int)max_ncores - num_ecores).
boot_ncpus is used in common code.

Modify the alignments and quanta/import sizes of the abd
kmem and vmem cache creations.  Make DEBUG builds work
with KMF_LITE | KMF_BUFCTL on the abd kmem caches.

Signed-off-by: Sean Doran <smd@use.net>
@lundman lundman merged commit 4c607f0 into openzfsonosx:macOS_20231129 Dec 6, 2023
15 of 20 checks passed
lundman pushed a commit that referenced this pull request Mar 5, 2024
taskq_wait_synced() did a VERIFY() on whether the taskq's
threads were the requested number, but taskq_create() can
ultimately return early because taskq_thread_create() is
allowed to return when two desired threads are created.

Fix this race panic.  Also, taskq_wait_synced() may fail if
if num_ecores is nonzero (on Apple Silicon), so create a
flag that lets taskq_create_common() deal with the
max_ncpus.

Make boot_ncpus a variable that's MAX(1, (int)max_ncores - num_ecores).
boot_ncpus is used in common code.

Modify the alignments and quanta/import sizes of the abd
kmem and vmem cache creations.  Make DEBUG builds work
with KMF_LITE | KMF_BUFCTL on the abd kmem caches.

Signed-off-by: Sean Doran <smd@use.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Ready For Review Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants