HomeFreeBSD

Simplify taskqgroup inititialization.

Description

Simplify taskqgroup inititialization.

taskqgroup initialization was broken into two steps:

  1. allocate the taskqgroup structure, at SI_SUB_TASKQ;
  2. initialize taskqueues, start taskqueue threads, enqueue "binder" tasks to bind threads to specific CPUs, at SI_SUB_SMP.

Step 2 tries to handle the case where tasks have already been attached
to a queue, by migrating them to their intended queue. In particular,
tasks can't be enqueued before step 2 has completed. This breaks NFS
mountroot on systems using an iflib-based driver when EARLY_AP_STARTUP
is not defined, since mountroot happens before SI_SUB_SMP in this case.

Simplify initialization: do all initialization except for CPU binding at
SI_SUB_TASKQ. This means that until CPU binding is completed, group
tasks may be executed on a CPU other than that to which they were bound,
but this should not be a problem for existing users of the taskqgroup
KPIs.

Reported by: sbruno
Tested by: bdragon, sbruno
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24188

Details

Provenance
markjAuthored on
Differential Revision
D24188: Simplify taskqgroup inititialization.
Parents
rS359435: fusefs: add a dtrace probe that fires after mounting is complete
Branches
Unknown
Tags
Unknown