| History log of /src/tests/rump/kernspace |
| Revision | Date | Author | Comments |
| 1.7 | 24-Dec-2018 |
thorpej | Add rump-based test cases for threadpool(9).
|
| 1.6 | 29-Sep-2017 |
maya | branches: 1.6.2; 1.6.4; Add simple test for workqueue(9)
|
| 1.5 | 14-Jan-2011 |
pooka | branches: 1.5.38; elementary tests for rump sigmodels
|
| 1.4 | 06-Jan-2011 |
pooka | Add some tests for lock errors. Notably, some of them fare nicely with just the pthread consistency checks (which are enabled by default in rumpuser), but others require real LOCKDEBUG.
|
| 1.3 | 14-Jun-2010 |
pooka | add a vm allocator test which tests that: * RUMP_MEMLIMIT works * allocating memory with PR_NOWAIT will fail immediately if no memory is available and PR_WAITOK will wait for memory to be available
|
| 1.2 | 31-May-2010 |
pooka | need bsd.own.mk to avoid the "NETBSDSRCDIR is nothing" syndrome
|
| 1.1 | 31-May-2010 |
pooka | Add some kernel namespace (i.e. _KERNEL) helpers for regression tests.
|
| 1.5.38.1 | 16-Jan-2018 |
martin | Pull up following revision(s) (requested by ozaki-r in ticket #497): tests/rump/rumpkern/Makefile: revision 1.16 tests/rump/kernspace/Makefile: revision 1.6 tests/rump/kernspace/workqueue.c: revision 1.1 tests/rump/kernspace/workqueue.c: revision 1.2 tests/rump/kernspace/workqueue.c: revision 1.3 tests/rump/kernspace/workqueue.c: revision 1.4 tests/rump/kernspace/workqueue.c: revision 1.5 tests/rump/kernspace/workqueue.c: revision 1.6 tests/rump/rumpkern/t_workqueue.c: revision 1.1 sys/sys/workqueue.h: revision 1.10 tests/rump/rumpkern/t_workqueue.c: revision 1.2 tests/rump/kernspace/kernspace.h: revision 1.5 tests/rump/kernspace/kernspace.h: revision 1.6 sys/net/if_bridge.c: revision 1.147 distrib/sets/lists/debug/mi: revision 1.225 sys/kern/subr_workqueue.c: revision 1.34 share/man/man9/workqueue.9: revision 1.12 sys/net/if_spppsubr.c: revision 1.178 distrib/sets/lists/tests/mi: revision 1.763 Add simple test for workqueue(9) Add declaration. build fix sorry, I forgot to commit this file. Tweak use of cv_timedwait - Handle its return value - Specify more appropriate time-out periods (2 ticks is too short) Fix a race condition on taking the mutex The workqueue worker can take the mutex before the tester tries to take it after calling workqueue_enqueue. If it happens, the worker calls cv_broadcast before the tester calls cv_timedwait and the tester will wait until the cv timed out Take the mutex before calling workqueue_enqueue so that the tester surely calls cv_timedwait before the worker calls cv_broadcast. The fix stabilizes the test, t_workqueue/workqueue1. Add workqueue_wait that waits for a specific work to finish The caller must ensure that no new work is enqueued before calling workqueue_wait. Note that Note that if the workqueue is WQ_PERCPU, the caller can enqueue a new work to another queue other than the waiting queue. Discussed on tech-kern@ Ensure the timer isn't running by using workqueue_wait Functionalize some routines to add new tests easily (NFC) Add a test case for workqueue_wait Fix build
|
| 1.6.4.1 | 10-Jun-2019 |
christos | Sync with HEAD
|
| 1.6.2.1 | 26-Dec-2018 |
pgoyette | Sync with HEAD, resolve a few conflicts
|
| 1.1 | 14-Jun-2010 |
pooka | add a vm allocator test which tests that: * RUMP_MEMLIMIT works * allocating memory with PR_NOWAIT will fail immediately if no memory is available and PR_WAITOK will wait for memory to be available
|
| 1.8 | 17-Mar-2020 |
ad | Tweak the March 14th change to make page waits interlocked by pg->interlock. Remove unneeded changes and only deal with the PQ_WANTED flag, to exclude possible bugs.
|
| 1.7 | 14-Mar-2020 |
ad | Catch up with reality.
|
| 1.6 | 23-Feb-2020 |
ad | UVM locking changes, proposed on tech-kern:
- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock. - Break v_interlock and vmobjlock apart. v_interlock remains a mutex. - Do partial PV list locking in the x86 pmap. Others to follow later.
|
| 1.5 | 07-Aug-2011 |
rmind | branches: 1.5.42; Rename slightly misleading KTHREAD_JOINABLE to KTHREAD_MUSTJOIN.
|
| 1.4 | 12-Jun-2011 |
mrg | vmobjlock is now a pointer to kmutex_t. use it as one.
|
| 1.3 | 09-Sep-2010 |
pooka | branches: 1.3.4; hold object lock across page unbusy
|
| 1.2 | 08-Sep-2010 |
pooka | vm object must be locked during page allocation.
|
| 1.1 | 31-May-2010 |
pooka | Add some kernel namespace (i.e. _KERNEL) helpers for regression tests.
|
| 1.3.4.1 | 23-Jun-2011 |
cherry | Catchup with rmind-uvmplock merge.
|
| 1.5.42.1 | 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
| 1.9 | 09-Aug-2023 |
riastradh | workqueue(9) tests: Add test for PR kern/57574.
XXX pullup-10 XXX pullup-9 XXX pullup-8
|
| 1.8 | 28-Dec-2018 |
thorpej | branches: 1.8.2; 1.8.10; Add a test case that exercises repeated sceduling and cancelling of a job, with periodic dropping of the interlock.
|
| 1.7 | 24-Dec-2018 |
thorpej | Add rump-based test cases for threadpool(9).
|
| 1.6 | 28-Dec-2017 |
ozaki-r | branches: 1.6.2; 1.6.4; Add a test case for workqueue_wait
|
| 1.5 | 29-Sep-2017 |
maya | Add declaration. build fix
sorry, I forgot to commit this file.
|
| 1.4 | 14-Jan-2011 |
pooka | branches: 1.4.38; elementary tests for rump sigmodels
|
| 1.3 | 06-Jan-2011 |
pooka | Add some tests for lock errors. Notably, some of them fare nicely with just the pthread consistency checks (which are enabled by default in rumpuser), but others require real LOCKDEBUG.
|
| 1.2 | 14-Jun-2010 |
pooka | add a vm allocator test which tests that: * RUMP_MEMLIMIT works * allocating memory with PR_NOWAIT will fail immediately if no memory is available and PR_WAITOK will wait for memory to be available
|
| 1.1 | 31-May-2010 |
pooka | Add some kernel namespace (i.e. _KERNEL) helpers for regression tests.
|
| 1.4.38.1 | 16-Jan-2018 |
martin | Pull up following revision(s) (requested by ozaki-r in ticket #497): tests/rump/rumpkern/Makefile: revision 1.16 tests/rump/kernspace/Makefile: revision 1.6 tests/rump/kernspace/workqueue.c: revision 1.1 tests/rump/kernspace/workqueue.c: revision 1.2 tests/rump/kernspace/workqueue.c: revision 1.3 tests/rump/kernspace/workqueue.c: revision 1.4 tests/rump/kernspace/workqueue.c: revision 1.5 tests/rump/kernspace/workqueue.c: revision 1.6 tests/rump/rumpkern/t_workqueue.c: revision 1.1 sys/sys/workqueue.h: revision 1.10 tests/rump/rumpkern/t_workqueue.c: revision 1.2 tests/rump/kernspace/kernspace.h: revision 1.5 tests/rump/kernspace/kernspace.h: revision 1.6 sys/net/if_bridge.c: revision 1.147 distrib/sets/lists/debug/mi: revision 1.225 sys/kern/subr_workqueue.c: revision 1.34 share/man/man9/workqueue.9: revision 1.12 sys/net/if_spppsubr.c: revision 1.178 distrib/sets/lists/tests/mi: revision 1.763 Add simple test for workqueue(9) Add declaration. build fix sorry, I forgot to commit this file. Tweak use of cv_timedwait - Handle its return value - Specify more appropriate time-out periods (2 ticks is too short) Fix a race condition on taking the mutex The workqueue worker can take the mutex before the tester tries to take it after calling workqueue_enqueue. If it happens, the worker calls cv_broadcast before the tester calls cv_timedwait and the tester will wait until the cv timed out Take the mutex before calling workqueue_enqueue so that the tester surely calls cv_timedwait before the worker calls cv_broadcast. The fix stabilizes the test, t_workqueue/workqueue1. Add workqueue_wait that waits for a specific work to finish The caller must ensure that no new work is enqueued before calling workqueue_wait. Note that Note that if the workqueue is WQ_PERCPU, the caller can enqueue a new work to another queue other than the waiting queue. Discussed on tech-kern@ Ensure the timer isn't running by using workqueue_wait Functionalize some routines to add new tests easily (NFC) Add a test case for workqueue_wait Fix build
|
| 1.6.4.1 | 10-Jun-2019 |
christos | Sync with HEAD
|
| 1.6.2.2 | 18-Jan-2019 |
pgoyette | Synch with HEAD
|
| 1.6.2.1 | 26-Dec-2018 |
pgoyette | Sync with HEAD, resolve a few conflicts
|
| 1.8.10.1 | 04-Sep-2023 |
martin | 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.
|
| 1.8.2.1 | 18-Apr-2024 |
martin | Pull up following revision(s) (requested by riastradh in ticket #1830):
sys/kern/subr_workqueue.c: revision 1.40 sys/kern/subr_workqueue.c: revision 1.41 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 sys/kern/subr_workqueue.c: revision 1.39 share/man/man9/workqueue.9: revision 1.15 (all via patch)
workqueue: Lift unnecessary restriction on workqueue_wait.
Allow multiple concurrent waits at a time, and allow enqueueing work at the same time (as long as it's not the work we're waiting for).
This way multiple users can use a shared global workqueue and safely wait for individual work items concurrently, while the workqueue is still in use for other items (e.g., wg(4) peers).
This has the side effect of taking away a diagnostic measure, but I think allowing the diagnostic's false positives instead of rejecting them is worth it. We could cheaply add it back with some false negatives if it's important. workqueue(9): workqueue_wait and workqueue_destroy may sleep.
But might not, so assert sleepable up front. workqueue(9): Sprinkle dtrace probes. 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.
|
| 1.1 | 06-Jan-2011 |
pooka | Add some tests for lock errors. Notably, some of them fare nicely with just the pthread consistency checks (which are enabled by default in rumpuser), but others require real LOCKDEBUG.
|
| 1.2 | 23-May-2020 |
ad | Move proc_lock into the data segment. It was dynamically allocated because at the time we had mutex_obj_alloc() but not __cacheline_aligned.
|
| 1.1 | 14-Jan-2011 |
pooka | elementary tests for rump sigmodels
|
| 1.2 | 07-Aug-2011 |
rmind | Rename slightly misleading KTHREAD_JOINABLE to KTHREAD_MUSTJOIN.
|
| 1.1 | 31-May-2010 |
pooka | Add some kernel namespace (i.e. _KERNEL) helpers for regression tests.
|
| 1.6 | 02-Feb-2024 |
andvar | s/shold/should/
|
| 1.5 | 04-Jan-2019 |
thorpej | branches: 1.5.2; Fix a silly bug the "cancel thrash" test: the exit condition for the job was never set, and so if the job actually got started before the cancellation request came in, it would never finish and the cancellation request would just hang forever.
Should address a spurious automated test failure reported by kre@.
|
| 1.4 | 28-Dec-2018 |
thorpej | Add a test case that exercises repeated sceduling and cancelling of a job, with periodic dropping of the interlock.
|
| 1.3 | 26-Dec-2018 |
thorpej | - De-opaque'ify struct threadpool_job. - De-_t'ify all of the structure types.
No functional chage, no ABI change (verified with old rump unit test before and after new librump.so).
Per Taylor's request.
|
| 1.2 | 25-Dec-2018 |
thorpej | branches: 1.2.2; Include some non-critical-but-still-for-correctness lines of code in the cancellation unit test. (I could have sworn I actually typed these lines, no really...)
|
| 1.1 | 24-Dec-2018 |
thorpej | Add rump-based test cases for threadpool(9).
|
| 1.2.2.3 | 18-Jan-2019 |
pgoyette | Synch with HEAD
|
| 1.2.2.2 | 26-Dec-2018 |
pgoyette | Sync with HEAD, resolve a few conflicts
|
| 1.2.2.1 | 25-Dec-2018 |
pgoyette | file threadpool.c was added on branch pgoyette-compat on 2018-12-26 14:02:10 +0000
|
| 1.5.2.2 | 10-Jun-2019 |
christos | Sync with HEAD
|
| 1.5.2.1 | 04-Jan-2019 |
christos | file threadpool.c was added on branch phil-wifi on 2019-06-10 22:10:10 +0000
|
| 1.4 | 21-Mar-2014 |
dholland | remove sys/simplelock.h (straggler)
|
| 1.3 | 28-Jan-2012 |
rmind | branches: 1.3.6; tsleep(9) no more.
|
| 1.2 | 07-Aug-2011 |
rmind | branches: 1.2.2; Rename slightly misleading KTHREAD_JOINABLE to KTHREAD_MUSTJOIN.
|
| 1.1 | 31-May-2010 |
pooka | Add some kernel namespace (i.e. _KERNEL) helpers for regression tests.
|
| 1.2.2.2 | 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
| 1.2.2.1 | 17-Apr-2012 |
yamt | sync with head
|
| 1.3.6.1 | 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
| 1.10 | 10-Aug-2023 |
riastradh | workqueue(9) tests: Fix mistake in rev. 1.9.
Somehow, despite manually verifying a build/install/test of every revision in my patch series, I managed to commit the wrong version of the file for what became rev. 1.9, so the test was just broken when it went in and remained broken in the commit where I fixed the real bug and removed the xfail marker on the test.
PR kern/5757
XXX pullup-10 XXX pullup-9 XXX pullup-8
|
| 1.9 | 09-Aug-2023 |
riastradh | workqueue(9) tests: Add test for PR kern/57574.
XXX pullup-10 XXX pullup-9 XXX pullup-8
|
| 1.8 | 09-Aug-2023 |
riastradh | workqueue(9) tests: Destroy struct work immediately on entry.
|
| 1.7 | 09-Aug-2023 |
riastradh | workqueue(9) tests: Nix trailing whitespace.
|
| 1.6 | 28-Dec-2017 |
ozaki-r | branches: 1.6.2; 1.6.8; 1.6.16; Fix build
|
| 1.5 | 28-Dec-2017 |
ozaki-r | Add a test case for workqueue_wait
|
| 1.4 | 28-Dec-2017 |
ozaki-r | Functionalize some routines to add new tests easily (NFC)
|
| 1.3 | 28-Dec-2017 |
ozaki-r | Fix a race condition on taking the mutex
The workqueue worker can take the mutex before the tester tries to take it after calling workqueue_enqueue. If it happens, the worker calls cv_broadcast before the tester calls cv_timedwait and the tester will wait until the cv timed out
Take the mutex before calling workqueue_enqueue so that the tester surely calls cv_timedwait before the worker calls cv_broadcast.
The fix stabilizes the test, t_workqueue/workqueue1.
|
| 1.2 | 28-Dec-2017 |
ozaki-r | Tweak use of cv_timedwait
- Handle its return value - Specify more appropriate time-out periods (2 ticks is too short)
|
| 1.1 | 29-Sep-2017 |
maya | Add simple test for workqueue(9)
|
| 1.6.16.2 | 07-Sep-2023 |
martin | Pull up following revision(s) (requested by riastradh in ticket #353):
tests/rump/kernspace/workqueue.c: revision 1.10
workqueue(9) tests: Fix mistake in rev. 1.9.
Somehow, despite manually verifying a build/install/test of every revision in my patch series, I managed to commit the wrong version of the file for what became rev. 1.9, so the test was just broken when it went in and remained broken in the commit where I fixed the real bug and removed the xfail marker on the test.
PR kern/5757
|
| 1.6.16.1 | 04-Sep-2023 |
martin | 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.
|
| 1.6.8.1 | 18-Apr-2024 |
martin | Pull up following revision(s) (requested by riastradh in ticket #1830):
sys/kern/subr_workqueue.c: revision 1.40 sys/kern/subr_workqueue.c: revision 1.41 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 sys/kern/subr_workqueue.c: revision 1.39 share/man/man9/workqueue.9: revision 1.15 (all via patch)
workqueue: Lift unnecessary restriction on workqueue_wait.
Allow multiple concurrent waits at a time, and allow enqueueing work at the same time (as long as it's not the work we're waiting for).
This way multiple users can use a shared global workqueue and safely wait for individual work items concurrently, while the workqueue is still in use for other items (e.g., wg(4) peers).
This has the side effect of taking away a diagnostic measure, but I think allowing the diagnostic's false positives instead of rejecting them is worth it. We could cheaply add it back with some false negatives if it's important. workqueue(9): workqueue_wait and workqueue_destroy may sleep.
But might not, so assert sleepable up front. workqueue(9): Sprinkle dtrace probes. 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.
|
| 1.6.2.2 | 16-Jan-2018 |
martin | Pull up following revision(s) (requested by ozaki-r in ticket #497): tests/rump/rumpkern/Makefile: revision 1.16 tests/rump/kernspace/Makefile: revision 1.6 tests/rump/kernspace/workqueue.c: revision 1.1 tests/rump/kernspace/workqueue.c: revision 1.2 tests/rump/kernspace/workqueue.c: revision 1.3 tests/rump/kernspace/workqueue.c: revision 1.4 tests/rump/kernspace/workqueue.c: revision 1.5 tests/rump/kernspace/workqueue.c: revision 1.6 tests/rump/rumpkern/t_workqueue.c: revision 1.1 sys/sys/workqueue.h: revision 1.10 tests/rump/rumpkern/t_workqueue.c: revision 1.2 tests/rump/kernspace/kernspace.h: revision 1.5 tests/rump/kernspace/kernspace.h: revision 1.6 sys/net/if_bridge.c: revision 1.147 distrib/sets/lists/debug/mi: revision 1.225 sys/kern/subr_workqueue.c: revision 1.34 share/man/man9/workqueue.9: revision 1.12 sys/net/if_spppsubr.c: revision 1.178 distrib/sets/lists/tests/mi: revision 1.763 Add simple test for workqueue(9) Add declaration. build fix sorry, I forgot to commit this file. Tweak use of cv_timedwait - Handle its return value - Specify more appropriate time-out periods (2 ticks is too short) Fix a race condition on taking the mutex The workqueue worker can take the mutex before the tester tries to take it after calling workqueue_enqueue. If it happens, the worker calls cv_broadcast before the tester calls cv_timedwait and the tester will wait until the cv timed out Take the mutex before calling workqueue_enqueue so that the tester surely calls cv_timedwait before the worker calls cv_broadcast. The fix stabilizes the test, t_workqueue/workqueue1. Add workqueue_wait that waits for a specific work to finish The caller must ensure that no new work is enqueued before calling workqueue_wait. Note that Note that if the workqueue is WQ_PERCPU, the caller can enqueue a new work to another queue other than the waiting queue. Discussed on tech-kern@ Ensure the timer isn't running by using workqueue_wait Functionalize some routines to add new tests easily (NFC) Add a test case for workqueue_wait Fix build
|
| 1.6.2.1 | 28-Dec-2017 |
martin | file workqueue.c was added on branch netbsd-8 on 2018-01-16 13:01:10 +0000
|