Bug 270661 - taskqgroup_cpu_create does taskqueue_thread_enqueue not gtaskqueue_thread_enqueue
Summary: taskqgroup_cpu_create does taskqueue_thread_enqueue not gtaskqueue_thread_enq...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Mark Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-05 20:12 UTC by Nick Reilly
Modified: 2024-01-07 17:03 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Reilly 2023-04-05 20:12:53 UTC
taskqgroup_cpu_create() does taskqueue_thread_enqueue not gtaskqueue_thread_enqueue leading to code in subr_taskqueue.c being used by code in subr_gtaskqueue.c
Comment 1 Mark Johnston freebsd_committer freebsd_triage 2023-04-07 01:26:09 UTC
Hmm, and this also means that the check "enqueue == gtaskqueue_thread_enqueue" in _gtaskqueue_create() is always false...
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-12-31 16:49:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e1f336704d308679d4178fd5063dba854b22a07b

commit e1f336704d308679d4178fd5063dba854b22a07b
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-12-31 16:36:12 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-12-31 16:49:08 +0000

    gtaskqueue: Fix a typo

    This is a no-op in practice since gtaskqueue_thread_enqueue() and
    taskqueue_thread_enqueue() are identical, and while _gtaskqueue_create()
    compares the enqueue callback pointer with gtaskqueue_thread_enqueue(),
    the result has no effect since TQ_FLAGS_UNLOCKED_ENQUEUE was copied
    directly from subr_taskqueue.c and is unused in the gtaskqueue code.

    Fix it anyway since it's a bug.  More generally we really need to
    consolidate subr_taskqueue.c and subr_gtaskqueue.c.

    PR:             270661
    MFC after:      1 week

 sys/kern/subr_gtaskqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-01-07 16:58:44 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=144e7a72f476f8f8453c40532c6f95c1f9add7ae

commit 144e7a72f476f8f8453c40532c6f95c1f9add7ae
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-12-31 16:36:12 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-01-07 16:56:04 +0000

    gtaskqueue: Fix a typo

    This is a no-op in practice since gtaskqueue_thread_enqueue() and
    taskqueue_thread_enqueue() are identical, and while _gtaskqueue_create()
    compares the enqueue callback pointer with gtaskqueue_thread_enqueue(),
    the result has no effect since TQ_FLAGS_UNLOCKED_ENQUEUE was copied
    directly from subr_taskqueue.c and is unused in the gtaskqueue code.

    Fix it anyway since it's a bug.  More generally we really need to
    consolidate subr_taskqueue.c and subr_gtaskqueue.c.

    PR:             270661
    MFC after:      1 week

    (cherry picked from commit e1f336704d308679d4178fd5063dba854b22a07b)

 sys/kern/subr_gtaskqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-01-07 17:03:46 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=c8bfd3fda78cd89cfc9d419a26946603c2124b10

commit c8bfd3fda78cd89cfc9d419a26946603c2124b10
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-12-31 16:36:12 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-01-07 16:56:35 +0000

    gtaskqueue: Fix a typo

    This is a no-op in practice since gtaskqueue_thread_enqueue() and
    taskqueue_thread_enqueue() are identical, and while _gtaskqueue_create()
    compares the enqueue callback pointer with gtaskqueue_thread_enqueue(),
    the result has no effect since TQ_FLAGS_UNLOCKED_ENQUEUE was copied
    directly from subr_taskqueue.c and is unused in the gtaskqueue code.

    Fix it anyway since it's a bug.  More generally we really need to
    consolidate subr_taskqueue.c and subr_gtaskqueue.c.

    PR:             270661
    MFC after:      1 week

    (cherry picked from commit e1f336704d308679d4178fd5063dba854b22a07b)

 sys/kern/subr_gtaskqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)