summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_task.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* we want to defer work traditionally (in openbsd) handled in andlg2015-02-091-16/+46
| | | | | | | | | | | | | | | | | | | | | 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@
* remove the second void * argument on tasks.dlg2015-01-271-6/+4
| | | | | | | | | | | | | | | | | | | | | 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@
* add a few sizes to freetedu2014-11-011-3/+3
|
* make workq/taskq runner threads yield when they've hogged the cpublambert2014-10-081-2/+4
| | | | ok deraadt@ dlg@ phessler@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-3/+3
| | | | after discussions with beck deraadt kettenis.
* Create system taskq ("systqmp") which runs without the kernel lock;blambert2014-06-111-1/+13
| | | | | | | currently unused. ok dlg@ manpage improvement and ok jmc@
* Fix typo; that teaches me to steal other people's diffs!kettenis2013-12-111-2/+2
|
* Add infrastructure to create un-biglocked task queues. Stolen from blambert@kettenis2013-12-101-1/+15
| | | | | | who is slacking to much. ok dlg@
* simplify kthread_create(). no more stdargderaadt2013-11-181-2/+2
| | | | ok matthew guenther mikeb
* deprecate taskq_systq() and replace it with extern struct taskqdlg2013-10-301-8/+4
| | | | | | | | *const systq defined in task.h this reduces the cost of using the system taskq and looks less ugly. requested by and ok kettenis@
* since taskq_create is only callable from autoconf or process context, itdlg2013-10-291-2/+2
| | | | | | is safe to ask malloc to wait for memory. pointed out by millert@
* sys/task.h includes sys/queue.h, so kern/kern_task.c doesnt needdlg2013-10-291-3/+1
| | | | | | to do that again. kern/kern_task.c doesnt use pools so we dont need sys/pool.h either.
* use unsigned int instead of u_int to reduce the depend on types.h.dlg2013-10-291-4/+4
| | | | might make jsg a little happier.
* introduce tasks and taskqs as an alternative to workqs.dlg2013-10-291-0/+258
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.