From nobody Wed Nov 25 12:16:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jZJZP6jXXz71L05 for ; Wed, 25 Nov 2026 12:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jZJZP68Ywz3Qfl for ; Wed, 25 Nov 2026 12:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795609005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MbG65KY1Hwzc0LlM4iitgqvBnM9n4OPHdbVUZT1TyKg=; b=mgnC9y6p+vAue7gzgB0UuTk/UPipz7LJt/O0tK161GawlbOs8+AWXgYYP2SaBfuscWGDI5 yp8sKArnVYNb4eg9fYvpIVNoBzmhK+8xv1emCWdmUb+KuowyAdx02IcwyJ2n0RVVftWRyX ZsIIIdTiNho4qsujN055mLIaMudo4UmNGcpAQ7KTzyKNmxJxh2V0kJPkJoocIbJNyxJBq6 bzB+HlRgbTiB526uCxLBBznJnSDMUNoHOtywYksQAXvb0xbR38jjTLtyuONU0VvKvfG/bo hY4tDEGmbyeKfMiMzW0XdVqBo+nY4QTneH5l2tBkWEdmyKUv00K9ebrlUkEsOg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795609005; b=dN9EZbmK6m4xNoH3saAtpr5PGcG8bPVDMKfZcsPU4C+6oi0Mu9g4A1kuCfKD3sgOkWjjYl 4/RPH7x95o3my6UwyfJwURTg5ue9sSboqng0lmeUt6xLuQ0Cb6Dd094k2VZAdQveh/x4Ux dwtFwDHyzyVwdJ4lw57lrSRoIs1PzCyoPafg63uQMukzLOTw9OB0kJCEaVTqULJp8JhYFU PJYOb71UwqwBw1NEptEdeS2wxAqGBlm654ymMTcrrJ52kyy2bR7surTa/aG1eeltWlF6tl pm35W9zgaf8uVUT3lAEt/hdxNQuMYwQMUXX8KnA/+jDNb+B9jGO3hg3AMeR9Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795609005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MbG65KY1Hwzc0LlM4iitgqvBnM9n4OPHdbVUZT1TyKg=; b=m4rcgQqwHyg5BhMwnl5Z63Eipr0PAzecSCG9S8eWeMEcYrInElzPpbZKGBfpuNUVKA5KFJ XHLVIoZ9KSTtNakaXbw51bL0l+s7iPEAYTzr8dhF/nP38Tylvl8+UdM8fMpW/8i7W/hDyj xQmu4k5Aci2Yk3MCL45vSjWJcl7NRDFvzBlSn7VlsKFV3fbwcWg1y/Chz7pE/kKC0nR6jv I34hIfaf863zo9b0wIWSb6OrGeO7Fr895MNJGZpmOfQtFqtdnbhzQ3e5P4uhXJYqK0bFn9 aljAQhqPgyTLTEDs+n2XQvBNDQ1eHCZ5ZkQ0NPvxX9rpfP/aXABcvuIvaNRlDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jZJZP5qFNzPhQ for ; Wed, 25 Nov 2026 12:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f82a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Nov 2026 12:16:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: dd960a798daa - main - acpi: Tasks: Remove the now-redundant 'acpi_task_count' List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd960a798daa0562142102467daa47e6743b9ddc Auto-Submitted: auto-generated Date: Wed, 25 Nov 2026 12:16:45 +0000 Message-Id: <6b06d1ad.1f82a.6718a877@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=dd960a798daa0562142102467daa47e6743b9ddc commit dd960a798daa0562142102467daa47e6743b9ddc Author: Olivier Certner AuthorDate: 2026-10-08 13:13:31 +0000 Commit: Olivier Certner CommitDate: 2026-11-25 12:15:57 +0000 acpi: Tasks: Remove the now-redundant 'acpi_task_count' That number is used only up to the moment when the ACPI taskqueue's threads are started to print the number of tasks queued so far. This is now redundant with 'acpi_boot_tasks_nb'. So use the latter and remove it, with the benefit that no more useless updates are performed at task creation and end, which could create contention. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D61547 --- sys/dev/acpica/Osd/OsdSchedule.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/dev/acpica/Osd/OsdSchedule.c b/sys/dev/acpica/Osd/OsdSchedule.c index 11b5e5a4915a..6e8fcebb9a97 100644 --- a/sys/dev/acpica/Osd/OsdSchedule.c +++ b/sys/dev/acpica/Osd/OsdSchedule.c @@ -88,8 +88,6 @@ struct acpi_task_ctx { struct taskqueue *acpi_taskq; static struct acpi_task_ctx *acpi_tasks; -/* Unsynchronized as only useful in the mono-CPU startup phase. */ -static int acpi_task_count; static int acpi_taskq_started; /* @@ -117,7 +115,7 @@ SYSINIT(acpi_tasks, SI_SUB_DRIVERS, SI_ORDER_FIRST, acpi_task_init, NULL); static void acpi_taskq_init(void *arg) { - int i; + int boot_tasks_nb, i; acpi_taskq = taskqueue_create_fast("acpi_task", M_WAITOK, &taskqueue_thread_enqueue, &acpi_taskq); @@ -127,10 +125,10 @@ acpi_taskq_init(void *arg) taskqueue_start_threads(&acpi_taskq, acpi_max_threads, PWAIT, "acpi_task"); - if (acpi_task_count > 0) { + boot_tasks_nb = atomic_load_int(&acpi_boot_tasks_nb); + if (boot_tasks_nb > 0) { if (bootverbose) - printf("AcpiOsExecute: enqueue %d pending tasks\n", - acpi_task_count); + printf("AcpiOsExecute: enqueue %d pending tasks\n", boot_tasks_nb); for (i = 0; i < acpi_max_tasks; i++) if (atomic_cmpset_int(&acpi_tasks[i].at_flag, ACPI_TASK_USED, ACPI_TASK_USED | ACPI_TASK_ENQUEUED)) @@ -153,7 +151,6 @@ acpi_task_execute(void *context, int pending) at = (struct acpi_task_ctx *)context; at->at_function(at->at_context); atomic_clear_int(&at->at_flag, ACPI_TASK_USED | ACPI_TASK_ENQUEUED); - acpi_task_count--; } static ACPI_STATUS @@ -168,7 +165,6 @@ acpi_task_enqueue(int priority, ACPI_OSD_EXEC_CALLBACK Function, void *Context) if (atomic_cmpset_int(&acpi_tasks[i].at_flag, ACPI_TASK_FREE, ACPI_TASK_USED)) { at = &acpi_tasks[i]; - acpi_task_count++; break; }