summaryrefslogtreecommitdiffstats
path: root/share/man/man9/taskqueue.9
Commit message (Collapse)AuthorAgeFilesLines
* MFC r258713,262062: add taskqueue_drain_allavg2014-02-171-1/+74
|
* Extend taskqueue(9) to enable per-taskqueue callbacks.will2013-03-231-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The scope of these callbacks is primarily to support actions that affect the taskqueue's thread environments. They are entirely optional, and consequently are introduced as a new API: taskqueue_set_callback(). This interface allows the caller to specify that a taskqueue requires a callback and optional context pointer for a given callback type. The callback types included in this commit can be used to register a constructor and destructor for thread-local storage using osd(9). This allows a particular taskqueue to define that its threads require a specific type of TLS, without the need for a specially-orchestrated task-based mechanism for startup and shutdown in order to accomplish it. Two callback types are supported at this point: - TASKQUEUE_CALLBACK_TYPE_INIT, called by every thread when it starts, prior to processing any tasks. - TASKQUEUE_CALLBACK_TYPE_SHUTDOWN, called by every thread when it exits, after it has processed its last task but before the taskqueue is reclaimed. While I'm here: - Add two new macros, TQ_ASSERT_LOCKED and TQ_ASSERT_UNLOCKED, and use them in appropriate locations. - Fix taskqueue.9 to mention taskqueue_start_threads(), which is a required interface for all consumers of taskqueue(9). Reviewed by: kib (all), eadler (taskqueue.9), brd (taskqueue.9) Approved by: ken (mentor) Sponsored by: Spectra Logic MFC after: 1 month
* Fix typo.kib2012-12-041-1/+1
| | | | | Submitted by: bjk MFC after: 3 days
* Document the interpretation of the negative value of ticks forkib2012-12-041-1/+8
| | | | | | taskqueue_enqueue_timeout(9). MFC after: 3 days
* Typo and mdoc(7) style fixes.gjb2012-05-201-2/+2
| | | | | | PR: 168117 Submitted by: Nobuyuki Koganemaru (kogane&jp!freebsd!org) MFC after: 3 days
* Remove trailing whitespace per mdoc lint warningeadler2012-03-291-4/+4
| | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days
* Add a TASK_INITIALIZER() macro that can be used to staticallyjhb2011-12-191-1/+7
| | | | | | | initialize a task structure. Reviewed by: gj MFC after: 2 weeks
* Ensure that ta_pending doesn't overflow u_short by capping its value at ↵adrian2011-09-151-1/+1
| | | | | | | | | | | | | USHRT_MAX. If it overflows before the taskqueue can run, the task will be re-added to the taskqueue and cause a loop in the task list. Reported by: Arnaud Lacombe <lacombar@gmail.com> Submitted by: Ryan Stone <rysto32@gmail.com> Reviewed by: jhb Approved by: re (kib) MFC after: 1 day
* Fix markup.kib2011-08-011-1/+2
| | | | Approved by: re (hrs)
* Document timeout_task.kib2011-04-261-4/+31
| | | | | | | | While there, fix the type of the func argument of INIT_TASK macro, and use the modern name of the analogous facility from Linux kernel. Sponsored by: The FreeBSD Foundation MFC after: 1 month
* Add a taskqueue_cancel(9) to cancel a pending task without waiting formdf2010-11-081-0/+27
| | | | | | | | | it to run as taskqueue_drain(9) does. Requested by: hselasky Original code: jeff Reviewed by: jhb MFC after: 2 weeks
* Use a safer mechanism for determining if a task is currently running,mdf2010-10-131-8/+1
| | | | | | | | that does not rely on the lifetime of pointers being the same. This also restores the task KBI. Suggested by: jhb MFC after: 1 month
* Re-expose and briefly document taskqueue_run(9). The function is usedmdf2010-10-121-0/+15
| | | | | | in at least one 3rd party driver. Requested by: jhb
* Spelling fixes.joel2010-07-311-1/+1
|
* Fix taskqueue_drain(9) to not have false negatives. For threadedmdf2010-07-221-10/+0
| | | | | | | | | | | | | | taskqueues, more than one task can be running simultaneously. Also make taskqueue_run(9) static to the file, since there are no consumers in the base kernel and the function signature needs to change with this fix. Remove mention of taskqueue_run(9) and taskqueue_run_fast(9) from the taskqueue(9) man page. Reviewed by: jhb Approved by: zml (mentor)
* Remove unused taskqueue_find() function.pjd2009-08-181-10/+2
| | | | | Reviewed by: dfr Approved by: re (kib)
* Correct typo in the previous commit.pjd2009-08-171-1/+1
| | | | | Noticed by: pluknet <pluknet@gmail.com> Approved by: re (kib, implicit)
* Remove OpenSolaris taskq port (it performs very poorly in our kernel) andpjd2009-08-171-1/+15
| | | | | | | | replace it with wrappers around our taskqueue(9). To make it possible implement taskqueue_member() function which returns 1 if the given thread was created by the given taskqueue. Approved by: re (kib)
* It's Friday the 13th, not the 10th and I can't travel in time. Yet.gonzo2008-06-131-1/+1
|
* Add "fast" versions of macros and functions to taskqueue(9) APIgonzo2008-06-131-5/+22
| | | | | | | | | description: TASKQUEUE_FAST_DEFINE(9), TASKQUEUE_FAST_DEFINE_THREAD(9), taskqueue_create_fast(9). They deal with taskqueues intended for use in fast interrupt handlers. Approved by: cognet (mentor) Reviewed by: keramida
* Clean out all mentions of struct proc* for it was removed fromgonzo2008-05-221-4/+1
| | | | | | taskqueue(9) API more then two years ago. Approved by: cognet (mentor)
* document the call to wakeup after a task has been run...jmg2007-07-091-0/+6
| | | | | Approved by: re (hrs) MFC after: 3 days
* Use 'manual page' instead of 'man page' for consistency.hmp2005-06-281-1/+1
| | | | Approved by: re (hrs)
* Assorted markup fixes and minor wordsmithing.ru2005-06-151-1/+1
| | | | Approved by: re
* Document taskqueue_drain().glebius2005-05-191-1/+10
|
* update for recent api changessam2005-05-011-11/+25
|
* Document taskqueue_run_fast(). Markup 'Giant' with ".Va".jkoshy2005-04-191-9/+39
| | | | Reviewed by: ru
* Add a 'SEE ALSO' section.jkoshy2005-04-151-0/+4
|
* Scheduled mdoc(7) sweep.ru2005-01-121-7/+6
|
* Correct a misspelling, 'task_fn' -> 'task_fn_t'.bms2004-10-261-2/+2
| | | | | Noticed by: sah at softcardsystems dot com MFC after: 3 days
* rearange some code that handles the thread taskqueue so that it is morejmg2004-08-081-5/+17
| | | | | | | generic. Introduce a new define TASKQUEUE_DEFINE_THREAD that takes a single arg, which is the name of the queue. Document these changes.
* Removed trailing whitespace.ru2004-07-021-1/+1
|
* Assorted markup, spelling, and grammar fixes.ru2004-06-161-2/+1
|
* Document taskqueue_enqueue_fast()scottl2004-01-021-0/+10
|
* Fix typo in the last commit.ken2003-09-031-1/+1
| | | | | Pointed out by: njl MFC after: 3 days
* Move dynamic sysctl(8) variable creation for the cd(4) and da(4) driversken2003-09-031-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | out of cdregister() and daregister(), which are run from interrupt context. The sysctl code does blocking mallocs (M_WAITOK), which causes problems if malloc(9) actually needs to sleep. The eventual fix for this issue will involve moving the CAM probe process inside a kernel thread. For now, though, I have fixed the issue by moving dynamic sysctl variable creation for these two drivers to a task queue running in a kernel thread. The existing task queues (taskqueue_swi and taskqueue_swi_giant) run in software interrupt handlers, which wouldn't fix the problem at hand. So I have created a new task queue, taskqueue_thread, that runs inside a kernel thread. (It also runs outside of Giant -- clients must explicitly acquire and release Giant in their taskqueue functions.) scsi_cd.c: Remove sysctl variable creation code from cdregister(), and move it to a new function, cdsysctlinit(). Queue cdsysctlinit() to the taskqueue_thread taskqueue once we have fully registered the cd(4) driver instance. scsi_da.c: Remove sysctl variable creation code from daregister(), and move it to move it to a new function, dasysctlinit(). Queue dasysctlinit() to the taskqueue_thread taskqueue once we have fully registered the da(4) instance. taskqueue.h: Declare the new taskqueue_thread taskqueue, update some comments. subr_taskqueue.c: Create the new kernel thread taskqueue. This taskqueue runs outside of Giant, so any functions queued to it would need to explicitly acquire/release Giant if they need it. cd.4: Update the cd(4) man page to talk about the minimum command size sysctl/loader tunable. Also note that the changer variables are available as loader tunables as well. da.4: Update the da(4) man page to cover the retry_count, default_timeout and minimum_cmd_size sysctl variables/loader tunables. Remove references to /dev/r???, they aren't used any longer. cd.9: Update the cd(9) man page to describe the CD_Q_10_BYTE_ONLY quirk. taskqueue.9: Update the taskqueue(9) man page to describe the new thread task queue, and the taskqueue_swi_giant queue. MFC after: 3 days
* mdoc(7) police: Kill the (now extraneous) empty line. Previously,ru2002-03-151-1/+0
| | | | .Bd erroneously defaulted to -compact mode in the SYNOPSIS section.
* Update function definitions and required include files to reflectdavidc2001-12-261-2/+4
| | | | | | the current state of the system. Approved by: alfred
* mdoc(7) police: Use the new .In macro for #include statements.ru2001-10-011-3/+3
|
* mdoc(7) police: remove extraneous .Pp before and/or after .Sh.dd2001-07-091-1/+0
|
* mdoc(7) police: Er macro usage cleanup.ru2000-11-221-1/+1
|
* Add documentation for taskqueue apis.dfr2000-05-281-0/+203
OpenPOWER on IntegriCloud