NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/57574 CVS commit: [netbsd-10] src



The following reply was made to PR kern/57574; it has been noted by GNATS.

From: "Martin Husemann" <martin%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/57574 CVS commit: [netbsd-10] src
Date: Mon, 4 Sep 2023 16:57:57 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Mon Sep  4 16:57:57 UTC 2023
 
 Modified Files:
 	src/sys/kern [netbsd-10]: subr_workqueue.c
 	src/tests/rump/kernspace [netbsd-10]: kernspace.h workqueue.c
 	src/tests/rump/rumpkern [netbsd-10]: Makefile t_workqueue.c
 
 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #342):
 
 	sys/kern/subr_workqueue.c: revision 1.42
 	sys/kern/subr_workqueue.c: revision 1.43
 	sys/kern/subr_workqueue.c: revision 1.44
 	sys/kern/subr_workqueue.c: revision 1.45
 	sys/kern/subr_workqueue.c: revision 1.46
 	tests/rump/kernspace/workqueue.c: revision 1.7
 	sys/kern/subr_workqueue.c: revision 1.47
 	tests/rump/kernspace/workqueue.c: revision 1.8
 	tests/rump/kernspace/workqueue.c: revision 1.9
 	tests/rump/rumpkern/t_workqueue.c: revision 1.3
 	tests/rump/rumpkern/t_workqueue.c: revision 1.4
 	tests/rump/kernspace/kernspace.h: revision 1.9
 	tests/rump/rumpkern/Makefile: revision 1.20
 
 tests/rump/rumpkern: Use PROGDPLIBS, not explicit -L/-l.
 
 This way we relink the t_* test programs whenever changes under
 tests/rump/kernspace change libkernspace.a.
 
 workqueue(9) tests: Nix trailing whitespace.
 
 workqueue(9) tests: Destroy struct work immediately on entry.
 
 workqueue(9) tests: Add test for PR kern/57574.
 
 workqueue(9): Avoid touching running work items in workqueue_wait.
 
 As soon as the workqueue function has called, it is forbidden to
 touch the struct work passed to it -- the function might free or
 reuse the data structure it is embedded in.
 
 So workqueue_wait is forbidden to search the queue for the batch of
 running work items.  Instead, use a generation number which is odd
 while the thread is processing a batch of work and even when not.
 
 There's still a small optimization available with the struct work
 pointer to wait for: if we find the work item in one of the per-CPU
 _pending_ queues, then after we wait for a batch of work to complete
 on that CPU, we don't need to wait for work on any other CPUs.
 PR kern/57574
 
 workqueue(9): Sprinkle dtrace probes for workqueue_wait edge cases.
 
 Let's make it easy to find out whether these are hit.
 
 workqueue(9): Stop violating queue(3) internals.
 
 workqueue(9): Avoid unnecessary mutex_exit/enter cycle each loop.
 
 workqueue(9): Sort includes.
 No functional change intended.
 
 workqueue(9): Factor out wq->wq_flags & WQ_FPU in workqueue_worker.
 No functional change intended.  Makes it clearer that s is
 initialized when used.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.41 -r1.41.2.1 src/sys/kern/subr_workqueue.c
 cvs rdiff -u -r1.8 -r1.8.10.1 src/tests/rump/kernspace/kernspace.h
 cvs rdiff -u -r1.6 -r1.6.16.1 src/tests/rump/kernspace/workqueue.c
 cvs rdiff -u -r1.19 -r1.19.8.1 src/tests/rump/rumpkern/Makefile
 cvs rdiff -u -r1.2 -r1.2.16.1 src/tests/rump/rumpkern/t_workqueue.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index