| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Submitted by: bjk
MFC after: 3 days
|
|
|
|
|
|
| |
taskqueue_enqueue_timeout(9).
MFC after: 3 days
|
|
|
|
|
|
| |
PR: 168117
Submitted by: Nobuyuki Koganemaru (kogane&jp!freebsd!org)
MFC after: 3 days
|
|
|
|
|
|
|
| |
Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days
|
|
|
|
|
|
|
| |
initialize a task structure.
Reviewed by: gj
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Approved by: re (hrs)
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
it to run as taskqueue_drain(9) does.
Requested by: hselasky
Original code: jeff
Reviewed by: jhb
MFC after: 2 weeks
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
in at least one 3rd party driver.
Requested by: jhb
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
Reviewed by: dfr
Approved by: re (kib)
|
|
|
|
|
| |
Noticed by: pluknet <pluknet@gmail.com>
Approved by: re (kib, implicit)
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
taskqueue(9) API more then two years ago.
Approved by: cognet (mentor)
|
|
|
|
|
| |
Approved by: re (hrs)
MFC after: 3 days
|
|
|
|
| |
Approved by: re (hrs)
|
|
|
|
| |
Approved by: re
|
| |
|
| |
|
|
|
|
| |
Reviewed by: ru
|
| |
|
| |
|
|
|
|
|
| |
Noticed by: sah at softcardsystems dot com
MFC after: 3 days
|
|
|
|
|
|
|
| |
generic. Introduce a new define TASKQUEUE_DEFINE_THREAD that takes a
single arg, which is the name of the queue.
Document these changes.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Pointed out by: njl
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
.Bd erroneously defaulted to -compact mode in the SYNOPSIS section.
|
|
|
|
|
|
| |
the current state of the system.
Approved by: alfred
|
| |
|
| |
|
| |
|
|
|