#
1.18 |
|
01-Aug-2020 |
anton |
Add support for remote coverage to kcov. Remote coverage is collected from threads other than the one currently having kcov enabled. A thread with kcov enabled occasionally delegates work to another thread, collecting coverage from such threads improves the ability of syzkaller to correlate side effects in the kernel caused by issuing a syscall.
Remote coverage is divided into subsystems. The only supported subsystem right now collects coverage from scheduled tasks and timeouts on behalf of a kcov enabled thread. In order to make this work `struct task' and `struct timeout' must be extended with a new field keeping track of the process that scheduled the task/timeout. Both aforementioned structures have therefore increased with the size of a pointer on all architectures.
The kernel API is documented in a new kcov_remote_register(9) manual.
Remote coverage is also supported by kcov on NetBSD and Linux.
ok mpi@
|
#
1.17 |
|
08-Jun-2020 |
dlg |
visa points out we don't use or need the TASK_BARRIER flag anymore.
|
Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
|
#
1.16 |
|
23-Jun-2019 |
kettenis |
Make taskq_barrier(9) work for multi-threaded task queues.
ok visa@
|
#
1.15 |
|
28-Apr-2019 |
dlg |
add WITNESS support to barriers modelled on the timeout stuff visa did.
if a taskq takes a lock, and something holding that lock calls taskq_barrier, there's a potential deadlock. detect this as a lock order problem when witness is enable. task_del conditionally followed by taskq_barrier is a common pattern, so add a taskq_del_barrier wrapper for it that unconditionally checks for the deadlock, like timeout_del_barrier.
ok visa@
|
Revision tags: OPENBSD_6_5_BASE
|
#
1.14 |
|
01-Apr-2019 |
dlg |
deprecate TASKQ_CANTSLEEP since nothing uses it anymore
if we ever want it back, it's in the attic.
ok mpi@ visa@ kettenis@
|
#
1.13 |
|
16-Dec-2018 |
dlg |
add task_pending
jsg@ wants this for drm, and i've had a version of it in diffs sine 2016, but obviously havent needed to use it just yet.
task_pending is modelled on timeout_pending, and tells you if the task is on a list waiting to execute.
ok jsg@
|
Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE
|
#
1.12 |
|
13-Nov-2017 |
dlg |
add taskq_barrier
taskq_barrier guarantees that any task that was running on the taskq has finished by the time taskq_barrier returns. it is similar to intr_barrier.
this is needed for use in ifq_barrier as part of an upcoming change.
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
|
#
1.11 |
|
07-Jun-2016 |
mpi |
Move initialization macro outside of #define _KERNEL to use them in ART regression tests.
ok dlg@, jmatthew@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.10 |
|
08-Dec-2015 |
dlg |
_SYS_TASKQ_H_ -> _SYS_TASK_H_
|
#
1.9 |
|
08-Dec-2015 |
dlg |
+TAILQ_HEAD(task_list, task);
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.8 |
|
09-Feb-2015 |
dlg |
we want to defer work traditionally (in openbsd) handled in an interrupt context to a taskq running in a thread. however, there is a concern that if we do that then we allow accidental use of sleeping APIs in this work, which will make it harder to move the work back to interrupts in the future.
guenther and kettenis came up with the idea of marking a proc with CANTSLEEP which the sleep paths can check and panic on.
this builds on that so you create taskqs that run with CANTSLEEP set except when they need to sleep for more tasks to run.
the taskq_create api is changed to take a flags argument so users can specify CANTSLEEP. MPSAFE is also passed via this flags field now. this means archs that defined IPL_MPSAFE to 0 can now create mpsafe taskqs too.
lots of discussion at s2k15 ok guenther@ miod@ mpi@ tedu@ pelikan@
|
#
1.7 |
|
27-Jan-2015 |
dlg |
remove the second void * argument on tasks.
when workqs were introduced, we provided a second argument so you could pass a thing and some context to work on it in. there were very few things that took advantage of the second argument, so when i introduced pools i suggested removing it. since tasks were meant to replace workqs, it was requested that we keep the second argument to make porting from workqs to tasks easier.
now that workqs are gone, i had a look at the use of the second argument again and found only one good use of it (vdsp(4) on sparc64 if you're interested) and a tiny handful of questionable uses. the vast majority of tasks only used a single argument. i have since modified all tasks that used two args to only use one, so now we can remove the second argument.
so this is a mechanical change. all tasks only passed NULL as their second argument, so we can just remove it.
ok krw@
|
Revision tags: OPENBSD_5_6_BASE
|
#
1.6 |
|
11-Jun-2014 |
blambert |
Create system taskq ("systqmp") which runs without the kernel lock; currently unused.
ok dlg@ manpage improvement and ok jmc@
|
Revision tags: OPENBSD_5_5_BASE
|
#
1.5 |
|
23-Dec-2013 |
dlg |
provide a TASK_INITIALIZER() macro.
|
#
1.4 |
|
31-Oct-2013 |
deraadt |
hide kernel protytypes ok dlg
|
#
1.3 |
|
30-Oct-2013 |
dlg |
deprecate taskq_systq() and replace it with extern struct taskq *const systq defined in task.h
this reduces the cost of using the system taskq and looks less ugly.
requested by and ok kettenis@
|
#
1.2 |
|
29-Oct-2013 |
dlg |
use unsigned int instead of u_int to reduce the depend on types.h.
might make jsg a little happier.
|
#
1.1 |
|
29-Oct-2013 |
dlg |
introduce tasks and taskqs as an alternative to workqs.
tasks are modelled on the timeout api, so users familiar with timeout_set, timeout_add, and timeout_del will already know what to expect from task_set, task_add, and task_del.
i wrote this because workq_add_task can fail in the place you actually need it, and there arent any good ways of recovering at that point. workq_queue_task was added to try and help, but required external state to be stored for users of that api to know whether something was already queued or not.
workqs also didnt provide a way to cancel or remove work.
this has been percolating with a bunch of people. putting it in as i wrote it so i can apply their feedback to the code with the history kept in cvs.
|
#
1.17 |
|
08-Jun-2020 |
dlg |
visa points out we don't use or need the TASK_BARRIER flag anymore.
|
Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
|
#
1.16 |
|
23-Jun-2019 |
kettenis |
Make taskq_barrier(9) work for multi-threaded task queues.
ok visa@
|
#
1.15 |
|
28-Apr-2019 |
dlg |
add WITNESS support to barriers modelled on the timeout stuff visa did.
if a taskq takes a lock, and something holding that lock calls taskq_barrier, there's a potential deadlock. detect this as a lock order problem when witness is enable. task_del conditionally followed by taskq_barrier is a common pattern, so add a taskq_del_barrier wrapper for it that unconditionally checks for the deadlock, like timeout_del_barrier.
ok visa@
|
Revision tags: OPENBSD_6_5_BASE
|
#
1.14 |
|
01-Apr-2019 |
dlg |
deprecate TASKQ_CANTSLEEP since nothing uses it anymore
if we ever want it back, it's in the attic.
ok mpi@ visa@ kettenis@
|
#
1.13 |
|
16-Dec-2018 |
dlg |
add task_pending
jsg@ wants this for drm, and i've had a version of it in diffs sine 2016, but obviously havent needed to use it just yet.
task_pending is modelled on timeout_pending, and tells you if the task is on a list waiting to execute.
ok jsg@
|
Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE
|
#
1.12 |
|
13-Nov-2017 |
dlg |
add taskq_barrier
taskq_barrier guarantees that any task that was running on the taskq has finished by the time taskq_barrier returns. it is similar to intr_barrier.
this is needed for use in ifq_barrier as part of an upcoming change.
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
|
#
1.11 |
|
07-Jun-2016 |
mpi |
Move initialization macro outside of #define _KERNEL to use them in ART regression tests.
ok dlg@, jmatthew@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.10 |
|
08-Dec-2015 |
dlg |
_SYS_TASKQ_H_ -> _SYS_TASK_H_
|
#
1.9 |
|
08-Dec-2015 |
dlg |
+TAILQ_HEAD(task_list, task);
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.8 |
|
09-Feb-2015 |
dlg |
we want to defer work traditionally (in openbsd) handled in an interrupt context to a taskq running in a thread. however, there is a concern that if we do that then we allow accidental use of sleeping APIs in this work, which will make it harder to move the work back to interrupts in the future.
guenther and kettenis came up with the idea of marking a proc with CANTSLEEP which the sleep paths can check and panic on.
this builds on that so you create taskqs that run with CANTSLEEP set except when they need to sleep for more tasks to run.
the taskq_create api is changed to take a flags argument so users can specify CANTSLEEP. MPSAFE is also passed via this flags field now. this means archs that defined IPL_MPSAFE to 0 can now create mpsafe taskqs too.
lots of discussion at s2k15 ok guenther@ miod@ mpi@ tedu@ pelikan@
|
#
1.7 |
|
27-Jan-2015 |
dlg |
remove the second void * argument on tasks.
when workqs were introduced, we provided a second argument so you could pass a thing and some context to work on it in. there were very few things that took advantage of the second argument, so when i introduced pools i suggested removing it. since tasks were meant to replace workqs, it was requested that we keep the second argument to make porting from workqs to tasks easier.
now that workqs are gone, i had a look at the use of the second argument again and found only one good use of it (vdsp(4) on sparc64 if you're interested) and a tiny handful of questionable uses. the vast majority of tasks only used a single argument. i have since modified all tasks that used two args to only use one, so now we can remove the second argument.
so this is a mechanical change. all tasks only passed NULL as their second argument, so we can just remove it.
ok krw@
|
Revision tags: OPENBSD_5_6_BASE
|
#
1.6 |
|
11-Jun-2014 |
blambert |
Create system taskq ("systqmp") which runs without the kernel lock; currently unused.
ok dlg@ manpage improvement and ok jmc@
|
Revision tags: OPENBSD_5_5_BASE
|
#
1.5 |
|
23-Dec-2013 |
dlg |
provide a TASK_INITIALIZER() macro.
|
#
1.4 |
|
31-Oct-2013 |
deraadt |
hide kernel protytypes ok dlg
|
#
1.3 |
|
30-Oct-2013 |
dlg |
deprecate taskq_systq() and replace it with extern struct taskq *const systq defined in task.h
this reduces the cost of using the system taskq and looks less ugly.
requested by and ok kettenis@
|
#
1.2 |
|
29-Oct-2013 |
dlg |
use unsigned int instead of u_int to reduce the depend on types.h.
might make jsg a little happier.
|
#
1.1 |
|
29-Oct-2013 |
dlg |
introduce tasks and taskqs as an alternative to workqs.
tasks are modelled on the timeout api, so users familiar with timeout_set, timeout_add, and timeout_del will already know what to expect from task_set, task_add, and task_del.
i wrote this because workq_add_task can fail in the place you actually need it, and there arent any good ways of recovering at that point. workq_queue_task was added to try and help, but required external state to be stored for users of that api to know whether something was already queued or not.
workqs also didnt provide a way to cancel or remove work.
this has been percolating with a bunch of people. putting it in as i wrote it so i can apply their feedback to the code with the history kept in cvs.
|
#
1.16 |
|
23-Jun-2019 |
kettenis |
Make taskq_barrier(9) work for multi-threaded task queues.
ok visa@
|
#
1.15 |
|
28-Apr-2019 |
dlg |
add WITNESS support to barriers modelled on the timeout stuff visa did.
if a taskq takes a lock, and something holding that lock calls taskq_barrier, there's a potential deadlock. detect this as a lock order problem when witness is enable. task_del conditionally followed by taskq_barrier is a common pattern, so add a taskq_del_barrier wrapper for it that unconditionally checks for the deadlock, like timeout_del_barrier.
ok visa@
|
Revision tags: OPENBSD_6_5_BASE
|
#
1.14 |
|
01-Apr-2019 |
dlg |
deprecate TASKQ_CANTSLEEP since nothing uses it anymore
if we ever want it back, it's in the attic.
ok mpi@ visa@ kettenis@
|
#
1.13 |
|
16-Dec-2018 |
dlg |
add task_pending
jsg@ wants this for drm, and i've had a version of it in diffs sine 2016, but obviously havent needed to use it just yet.
task_pending is modelled on timeout_pending, and tells you if the task is on a list waiting to execute.
ok jsg@
|
Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE
|
#
1.12 |
|
13-Nov-2017 |
dlg |
add taskq_barrier
taskq_barrier guarantees that any task that was running on the taskq has finished by the time taskq_barrier returns. it is similar to intr_barrier.
this is needed for use in ifq_barrier as part of an upcoming change.
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
|
#
1.11 |
|
07-Jun-2016 |
mpi |
Move initialization macro outside of #define _KERNEL to use them in ART regression tests.
ok dlg@, jmatthew@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.10 |
|
08-Dec-2015 |
dlg |
_SYS_TASKQ_H_ -> _SYS_TASK_H_
|
#
1.9 |
|
08-Dec-2015 |
dlg |
+TAILQ_HEAD(task_list, task);
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.8 |
|
09-Feb-2015 |
dlg |
we want to defer work traditionally (in openbsd) handled in an interrupt context to a taskq running in a thread. however, there is a concern that if we do that then we allow accidental use of sleeping APIs in this work, which will make it harder to move the work back to interrupts in the future.
guenther and kettenis came up with the idea of marking a proc with CANTSLEEP which the sleep paths can check and panic on.
this builds on that so you create taskqs that run with CANTSLEEP set except when they need to sleep for more tasks to run.
the taskq_create api is changed to take a flags argument so users can specify CANTSLEEP. MPSAFE is also passed via this flags field now. this means archs that defined IPL_MPSAFE to 0 can now create mpsafe taskqs too.
lots of discussion at s2k15 ok guenther@ miod@ mpi@ tedu@ pelikan@
|
#
1.7 |
|
27-Jan-2015 |
dlg |
remove the second void * argument on tasks.
when workqs were introduced, we provided a second argument so you could pass a thing and some context to work on it in. there were very few things that took advantage of the second argument, so when i introduced pools i suggested removing it. since tasks were meant to replace workqs, it was requested that we keep the second argument to make porting from workqs to tasks easier.
now that workqs are gone, i had a look at the use of the second argument again and found only one good use of it (vdsp(4) on sparc64 if you're interested) and a tiny handful of questionable uses. the vast majority of tasks only used a single argument. i have since modified all tasks that used two args to only use one, so now we can remove the second argument.
so this is a mechanical change. all tasks only passed NULL as their second argument, so we can just remove it.
ok krw@
|
Revision tags: OPENBSD_5_6_BASE
|
#
1.6 |
|
11-Jun-2014 |
blambert |
Create system taskq ("systqmp") which runs without the kernel lock; currently unused.
ok dlg@ manpage improvement and ok jmc@
|
Revision tags: OPENBSD_5_5_BASE
|
#
1.5 |
|
23-Dec-2013 |
dlg |
provide a TASK_INITIALIZER() macro.
|
#
1.4 |
|
31-Oct-2013 |
deraadt |
hide kernel protytypes ok dlg
|
#
1.3 |
|
30-Oct-2013 |
dlg |
deprecate taskq_systq() and replace it with extern struct taskq *const systq defined in task.h
this reduces the cost of using the system taskq and looks less ugly.
requested by and ok kettenis@
|
#
1.2 |
|
29-Oct-2013 |
dlg |
use unsigned int instead of u_int to reduce the depend on types.h.
might make jsg a little happier.
|
#
1.1 |
|
29-Oct-2013 |
dlg |
introduce tasks and taskqs as an alternative to workqs.
tasks are modelled on the timeout api, so users familiar with timeout_set, timeout_add, and timeout_del will already know what to expect from task_set, task_add, and task_del.
i wrote this because workq_add_task can fail in the place you actually need it, and there arent any good ways of recovering at that point. workq_queue_task was added to try and help, but required external state to be stored for users of that api to know whether something was already queued or not.
workqs also didnt provide a way to cancel or remove work.
this has been percolating with a bunch of people. putting it in as i wrote it so i can apply their feedback to the code with the history kept in cvs.
|
#
1.15 |
|
28-Apr-2019 |
dlg |
add WITNESS support to barriers modelled on the timeout stuff visa did.
if a taskq takes a lock, and something holding that lock calls taskq_barrier, there's a potential deadlock. detect this as a lock order problem when witness is enable. task_del conditionally followed by taskq_barrier is a common pattern, so add a taskq_del_barrier wrapper for it that unconditionally checks for the deadlock, like timeout_del_barrier.
ok visa@
|
Revision tags: OPENBSD_6_5_BASE
|
#
1.14 |
|
01-Apr-2019 |
dlg |
deprecate TASKQ_CANTSLEEP since nothing uses it anymore
if we ever want it back, it's in the attic.
ok mpi@ visa@ kettenis@
|
#
1.13 |
|
16-Dec-2018 |
dlg |
add task_pending
jsg@ wants this for drm, and i've had a version of it in diffs sine 2016, but obviously havent needed to use it just yet.
task_pending is modelled on timeout_pending, and tells you if the task is on a list waiting to execute.
ok jsg@
|
Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE
|
#
1.12 |
|
13-Nov-2017 |
dlg |
add taskq_barrier
taskq_barrier guarantees that any task that was running on the taskq has finished by the time taskq_barrier returns. it is similar to intr_barrier.
this is needed for use in ifq_barrier as part of an upcoming change.
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
|
#
1.11 |
|
07-Jun-2016 |
mpi |
Move initialization macro outside of #define _KERNEL to use them in ART regression tests.
ok dlg@, jmatthew@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.10 |
|
08-Dec-2015 |
dlg |
_SYS_TASKQ_H_ -> _SYS_TASK_H_
|
#
1.9 |
|
08-Dec-2015 |
dlg |
+TAILQ_HEAD(task_list, task);
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.8 |
|
09-Feb-2015 |
dlg |
we want to defer work traditionally (in openbsd) handled in an interrupt context to a taskq running in a thread. however, there is a concern that if we do that then we allow accidental use of sleeping APIs in this work, which will make it harder to move the work back to interrupts in the future.
guenther and kettenis came up with the idea of marking a proc with CANTSLEEP which the sleep paths can check and panic on.
this builds on that so you create taskqs that run with CANTSLEEP set except when they need to sleep for more tasks to run.
the taskq_create api is changed to take a flags argument so users can specify CANTSLEEP. MPSAFE is also passed via this flags field now. this means archs that defined IPL_MPSAFE to 0 can now create mpsafe taskqs too.
lots of discussion at s2k15 ok guenther@ miod@ mpi@ tedu@ pelikan@
|
#
1.7 |
|
27-Jan-2015 |
dlg |
remove the second void * argument on tasks.
when workqs were introduced, we provided a second argument so you could pass a thing and some context to work on it in. there were very few things that took advantage of the second argument, so when i introduced pools i suggested removing it. since tasks were meant to replace workqs, it was requested that we keep the second argument to make porting from workqs to tasks easier.
now that workqs are gone, i had a look at the use of the second argument again and found only one good use of it (vdsp(4) on sparc64 if you're interested) and a tiny handful of questionable uses. the vast majority of tasks only used a single argument. i have since modified all tasks that used two args to only use one, so now we can remove the second argument.
so this is a mechanical change. all tasks only passed NULL as their second argument, so we can just remove it.
ok krw@
|
Revision tags: OPENBSD_5_6_BASE
|
#
1.6 |
|
11-Jun-2014 |
blambert |
Create system taskq ("systqmp") which runs without the kernel lock; currently unused.
ok dlg@ manpage improvement and ok jmc@
|
Revision tags: OPENBSD_5_5_BASE
|
#
1.5 |
|
23-Dec-2013 |
dlg |
provide a TASK_INITIALIZER() macro.
|
#
1.4 |
|
31-Oct-2013 |
deraadt |
hide kernel protytypes ok dlg
|
#
1.3 |
|
30-Oct-2013 |
dlg |
deprecate taskq_systq() and replace it with extern struct taskq *const systq defined in task.h
this reduces the cost of using the system taskq and looks less ugly.
requested by and ok kettenis@
|
#
1.2 |
|
29-Oct-2013 |
dlg |
use unsigned int instead of u_int to reduce the depend on types.h.
might make jsg a little happier.
|
#
1.1 |
|
29-Oct-2013 |
dlg |
introduce tasks and taskqs as an alternative to workqs.
tasks are modelled on the timeout api, so users familiar with timeout_set, timeout_add, and timeout_del will already know what to expect from task_set, task_add, and task_del.
i wrote this because workq_add_task can fail in the place you actually need it, and there arent any good ways of recovering at that point. workq_queue_task was added to try and help, but required external state to be stored for users of that api to know whether something was already queued or not.
workqs also didnt provide a way to cancel or remove work.
this has been percolating with a bunch of people. putting it in as i wrote it so i can apply their feedback to the code with the history kept in cvs.
|
#
1.13 |
|
16-Dec-2018 |
dlg |
add task_pending
jsg@ wants this for drm, and i've had a version of it in diffs sine 2016, but obviously havent needed to use it just yet.
task_pending is modelled on timeout_pending, and tells you if the task is on a list waiting to execute.
ok jsg@
|
Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE
|
#
1.12 |
|
13-Nov-2017 |
dlg |
add taskq_barrier
taskq_barrier guarantees that any task that was running on the taskq has finished by the time taskq_barrier returns. it is similar to intr_barrier.
this is needed for use in ifq_barrier as part of an upcoming change.
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
|
#
1.11 |
|
07-Jun-2016 |
mpi |
Move initialization macro outside of #define _KERNEL to use them in ART regression tests.
ok dlg@, jmatthew@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.10 |
|
08-Dec-2015 |
dlg |
_SYS_TASKQ_H_ -> _SYS_TASK_H_
|
#
1.9 |
|
08-Dec-2015 |
dlg |
+TAILQ_HEAD(task_list, task);
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.8 |
|
09-Feb-2015 |
dlg |
we want to defer work traditionally (in openbsd) handled in an interrupt context to a taskq running in a thread. however, there is a concern that if we do that then we allow accidental use of sleeping APIs in this work, which will make it harder to move the work back to interrupts in the future.
guenther and kettenis came up with the idea of marking a proc with CANTSLEEP which the sleep paths can check and panic on.
this builds on that so you create taskqs that run with CANTSLEEP set except when they need to sleep for more tasks to run.
the taskq_create api is changed to take a flags argument so users can specify CANTSLEEP. MPSAFE is also passed via this flags field now. this means archs that defined IPL_MPSAFE to 0 can now create mpsafe taskqs too.
lots of discussion at s2k15 ok guenther@ miod@ mpi@ tedu@ pelikan@
|
#
1.7 |
|
27-Jan-2015 |
dlg |
remove the second void * argument on tasks.
when workqs were introduced, we provided a second argument so you could pass a thing and some context to work on it in. there were very few things that took advantage of the second argument, so when i introduced pools i suggested removing it. since tasks were meant to replace workqs, it was requested that we keep the second argument to make porting from workqs to tasks easier.
now that workqs are gone, i had a look at the use of the second argument again and found only one good use of it (vdsp(4) on sparc64 if you're interested) and a tiny handful of questionable uses. the vast majority of tasks only used a single argument. i have since modified all tasks that used two args to only use one, so now we can remove the second argument.
so this is a mechanical change. all tasks only passed NULL as their second argument, so we can just remove it.
ok krw@
|
Revision tags: OPENBSD_5_6_BASE
|
#
1.6 |
|
11-Jun-2014 |
blambert |
Create system taskq ("systqmp") which runs without the kernel lock; currently unused.
ok dlg@ manpage improvement and ok jmc@
|
Revision tags: OPENBSD_5_5_BASE
|
#
1.5 |
|
23-Dec-2013 |
dlg |
provide a TASK_INITIALIZER() macro.
|
#
1.4 |
|
31-Oct-2013 |
deraadt |
hide kernel protytypes ok dlg
|
#
1.3 |
|
30-Oct-2013 |
dlg |
deprecate taskq_systq() and replace it with extern struct taskq *const systq defined in task.h
this reduces the cost of using the system taskq and looks less ugly.
requested by and ok kettenis@
|
#
1.2 |
|
29-Oct-2013 |
dlg |
use unsigned int instead of u_int to reduce the depend on types.h.
might make jsg a little happier.
|
#
1.1 |
|
29-Oct-2013 |
dlg |
introduce tasks and taskqs as an alternative to workqs.
tasks are modelled on the timeout api, so users familiar with timeout_set, timeout_add, and timeout_del will already know what to expect from task_set, task_add, and task_del.
i wrote this because workq_add_task can fail in the place you actually need it, and there arent any good ways of recovering at that point. workq_queue_task was added to try and help, but required external state to be stored for users of that api to know whether something was already queued or not.
workqs also didnt provide a way to cancel or remove work.
this has been percolating with a bunch of people. putting it in as i wrote it so i can apply their feedback to the code with the history kept in cvs.
|
#
1.12 |
|
13-Nov-2017 |
dlg |
add taskq_barrier
taskq_barrier guarantees that any task that was running on the taskq has finished by the time taskq_barrier returns. it is similar to intr_barrier.
this is needed for use in ifq_barrier as part of an upcoming change.
|
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
|
#
1.11 |
|
07-Jun-2016 |
mpi |
Move initialization macro outside of #define _KERNEL to use them in ART regression tests.
ok dlg@, jmatthew@
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.10 |
|
08-Dec-2015 |
dlg |
_SYS_TASKQ_H_ -> _SYS_TASK_H_
|
#
1.9 |
|
08-Dec-2015 |
dlg |
+TAILQ_HEAD(task_list, task);
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.8 |
|
09-Feb-2015 |
dlg |
we want to defer work traditionally (in openbsd) handled in an interrupt context to a taskq running in a thread. however, there is a concern that if we do that then we allow accidental use of sleeping APIs in this work, which will make it harder to move the work back to interrupts in the future.
guenther and kettenis came up with the idea of marking a proc with CANTSLEEP which the sleep paths can check and panic on.
this builds on that so you create taskqs that run with CANTSLEEP set except when they need to sleep for more tasks to run.
the taskq_create api is changed to take a flags argument so users can specify CANTSLEEP. MPSAFE is also passed via this flags field now. this means archs that defined IPL_MPSAFE to 0 can now create mpsafe taskqs too.
lots of discussion at s2k15 ok guenther@ miod@ mpi@ tedu@ pelikan@
|
#
1.7 |
|
27-Jan-2015 |
dlg |
remove the second void * argument on tasks.
when workqs were introduced, we provided a second argument so you could pass a thing and some context to work on it in. there were very few things that took advantage of the second argument, so when i introduced pools i suggested removing it. since tasks were meant to replace workqs, it was requested that we keep the second argument to make porting from workqs to tasks easier.
now that workqs are gone, i had a look at the use of the second argument again and found only one good use of it (vdsp(4) on sparc64 if you're interested) and a tiny handful of questionable uses. the vast majority of tasks only used a single argument. i have since modified all tasks that used two args to only use one, so now we can remove the second argument.
so this is a mechanical change. all tasks only passed NULL as their second argument, so we can just remove it.
ok krw@
|
Revision tags: OPENBSD_5_6_BASE
|
#
1.6 |
|
11-Jun-2014 |
blambert |
Create system taskq ("systqmp") which runs without the kernel lock; currently unused.
ok dlg@ manpage improvement and ok jmc@
|
Revision tags: OPENBSD_5_5_BASE
|
#
1.5 |
|
23-Dec-2013 |
dlg |
provide a TASK_INITIALIZER() macro.
|
#
1.4 |
|
31-Oct-2013 |
deraadt |
hide kernel protytypes ok dlg
|
#
1.3 |
|
30-Oct-2013 |
dlg |
deprecate taskq_systq() and replace it with extern struct taskq *const systq defined in task.h
this reduces the cost of using the system taskq and looks less ugly.
requested by and ok kettenis@
|
#
1.2 |
|
29-Oct-2013 |
dlg |
use unsigned int instead of u_int to reduce the depend on types.h.
might make jsg a little happier.
|
#
1.1 |
|
29-Oct-2013 |
dlg |
introduce tasks and taskqs as an alternative to workqs.
tasks are modelled on the timeout api, so users familiar with timeout_set, timeout_add, and timeout_del will already know what to expect from task_set, task_add, and task_del.
i wrote this because workq_add_task can fail in the place you actually need it, and there arent any good ways of recovering at that point. workq_queue_task was added to try and help, but required external state to be stored for users of that api to know whether something was already queued or not.
workqs also didnt provide a way to cancel or remove work.
this has been percolating with a bunch of people. putting it in as i wrote it so i can apply their feedback to the code with the history kept in cvs.
|