During boot, tasks can be enqueued by drivers before the scheduler is up
and the ACPI taskqueue threads running. Such tasks pile up in the task
queue until they can actually be processed. This makes the number
reported by the 'debug.acpi.tasks_hiwater' sysctl(8) knob less useful,
as if it is representative of the maximum amount of storage needed, it
does not allow to understand the degree of task concurrency at run-time,
which itself can be useful to size the queue and/or the number of
processing threads.
Create a separate counter for tasks queued at boot, and update it
instead of the already existing one before the taskqueue starts being
processed. Export it via the new 'debug.acpi.boot_tasks_nb' sysctl(8)
knob. The existing counter is now updated only after this phase.